Neovim, go lang, remore rustacean lsp call
This commit is contained in:
parent
17c7fde05f
commit
dfbe5210c4
4 changed files with 13 additions and 5 deletions
|
|
@ -5,6 +5,7 @@
|
||||||
enable = lib.mkEnableOption "Enables neovim";
|
enable = lib.mkEnableOption "Enables neovim";
|
||||||
languages = {
|
languages = {
|
||||||
c.enable = lib.mkEnableOption "Enables c support";
|
c.enable = lib.mkEnableOption "Enables c support";
|
||||||
|
go.enable = lib.mkEnableOption "Enables go support";
|
||||||
nix.enable = lib.mkEnableOption "Enables nix support";
|
nix.enable = lib.mkEnableOption "Enables nix support";
|
||||||
rust.enable = lib.mkEnableOption "Enables rust support";
|
rust.enable = lib.mkEnableOption "Enables rust support";
|
||||||
};
|
};
|
||||||
|
|
@ -48,6 +49,7 @@
|
||||||
|
|
||||||
extraPackages = with pkgs; [
|
extraPackages = with pkgs; [
|
||||||
(lib.mkIf config.neovim.languages.c.enable libclang)
|
(lib.mkIf config.neovim.languages.c.enable libclang)
|
||||||
|
(lib.mkIf config.neovim.languages.go.enable gopls)
|
||||||
(lib.mkIf config.neovim.languages.nix.enable nil)
|
(lib.mkIf config.neovim.languages.nix.enable nil)
|
||||||
(lib.mkIf config.neovim.languages.rust.enable rust-analyzer)
|
(lib.mkIf config.neovim.languages.rust.enable rust-analyzer)
|
||||||
];
|
];
|
||||||
|
|
@ -96,6 +98,10 @@
|
||||||
rust-pkg = lopts cfgl.rust.enable (with pkgs.vimPlugins; [
|
rust-pkg = lopts cfgl.rust.enable (with pkgs.vimPlugins; [
|
||||||
rustaceanvim
|
rustaceanvim
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
go-pkg = lopts cfgl.go.enable (with pkgs.vimPlugins; [
|
||||||
|
go-nvim
|
||||||
|
]);
|
||||||
|
|
||||||
wiki = lopts cfgp.wiki.enable (with pkgs.vimPlugins; [
|
wiki = lopts cfgp.wiki.enable (with pkgs.vimPlugins; [
|
||||||
{
|
{
|
||||||
|
|
@ -114,7 +120,7 @@
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
in comments ++ fugitive ++ luasnip-pkg ++ lualine ++
|
in comments ++ fugitive ++ luasnip-pkg ++ lualine ++
|
||||||
nix-pkg ++ rust-pkg ++ wiki;
|
nix-pkg ++ rust-pkg ++ go-pkg ++ wiki;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,12 +35,12 @@
|
||||||
end
|
end
|
||||||
|
|
||||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
'' + lib.strings.optionalString cfgl.nix.enable ''
|
|
||||||
require('lspconfig').nil_ls.setup {}
|
|
||||||
'' + lib.strings.optionalString cfgl.c.enable ''
|
'' + lib.strings.optionalString cfgl.c.enable ''
|
||||||
require('lspconfig').clangd.setup {}
|
require('lspconfig').clangd.setup {}
|
||||||
'' + lib.strings.optionalString cfgl.rust.enable ''
|
'' + lib.strings.optionalString cfgl.go.enable ''
|
||||||
require('lspconfig').rustaceanvim.setup {}
|
require('lspconfig').gopls.setup {}
|
||||||
|
'' + lib.strings.optionalString cfgl.nix.enable ''
|
||||||
|
require('lspconfig').nil_ls.setup {}
|
||||||
'';
|
'';
|
||||||
in with pkgs.vimPlugins; [
|
in with pkgs.vimPlugins; [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ in {
|
||||||
# dynamically. For not just have them always loaded regardless of config
|
# dynamically. For not just have them always loaded regardless of config
|
||||||
treeplugs = p: [
|
treeplugs = p: [
|
||||||
p.tree-sitter-c
|
p.tree-sitter-c
|
||||||
|
p.tree-sitter-go
|
||||||
p.tree-sitter-nix
|
p.tree-sitter-nix
|
||||||
p.tree-sitter-rust
|
p.tree-sitter-rust
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,7 @@
|
||||||
neovim.enable = true;
|
neovim.enable = true;
|
||||||
neovim.languages = {
|
neovim.languages = {
|
||||||
c.enable = true;
|
c.enable = true;
|
||||||
|
go.enable = true;
|
||||||
nix.enable = true;
|
nix.enable = true;
|
||||||
rust.enable = true;
|
rust.enable = true;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue