Add some language servers and color

This commit is contained in:
Artemis Tosini 2021-11-17 23:58:51 +00:00
parent ee156a5df6
commit 0fafc95119
Signed by: artemist
GPG key ID: ADFFE553DCBB831E
2 changed files with 19 additions and 11 deletions

View file

@ -1,5 +1,19 @@
{ config, pkgs, ... }:
let
lsp-colors = pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "lsp-colors.nvim";
version = "2021-10-22";
src = pkgs.fetchFromGitHub {
owner = "folke";
repo = "lsp-colors.nvim";
rev = "517fe3ab6b63f9907b093bc9443ef06b56f804f3";
sha256 = "vXX9/5hulIlDwE9ISZlTMxxrl+Jjyquagv5+AHmEA5c=";
fetchSubmodules = false;
};
meta.homepage = "https://github.com/folke/lsp-colors.nvim";
};
in
{
programs.neovim = {
enable = true;
@ -21,6 +35,7 @@
nvim-lspconfig
nvim-compe
lsp-colors
];
};
@ -31,17 +46,8 @@
python3Packages.ipython
python3Packages.pylint
nodePackages.pyright
rust-analyzer
rnix-lsp
];
xdg.configFile."nvim/coc-settings.json".text = builtins.toJSON {
rust-analyzer.serverPath = "${pkgs.rust-analyzer}/bin/rust-analyzer";
clangd = {
path = "${pkgs.clang-tools}/bin/clangd";
semanticHighlighting = true;
};
languageserver.nix = {
command = "${pkgs.rnix-lsp}/bin/rnix-lsp";
filetypes = [ "nix" ];
};
};
}

View file

@ -65,6 +65,8 @@ end
nvim_lsp['pyright'].setup { on_attach = on_attach }
nvim_lsp['clangd'].setup { on_attach = on_attach }
nvim_lsp['rust_analyzer'].setup { on_attach = on_attach }
nvim_lsp['rnix'].setup { on_attach = on_attach }
require'compe'.setup {
enabled = true;