neovim: add csharp treesitter and lsp

This commit is contained in:
LavaDesu 2021-09-01 15:48:11 +07:00
parent a7ce9a61ce
commit 89b7afd817
Signed by: cilly
GPG key ID: 6500251E087653C9
2 changed files with 33 additions and 0 deletions

31
overlays/tree-sitter.nix Normal file
View file

@ -0,0 +1,31 @@
# experiment!
self: super:
let
lib = super.lib;
stdenv = super.stdenv;
in {
tree-sitter = super.tree-sitter.overrideAttrs(o: {
passthru = o.passthru // {
withPlugins = grammarFn:
let
grammars = grammarFn o.passthru.builtGrammars;
in
super.linkFarm "grammars"
(map
(drv:
let
name = lib.strings.getName drv;
in
{
name =
(lib.strings.replaceStrings ["-"] ["_"]
(lib.strings.removePrefix "tree-sitter-"
(lib.strings.removeSuffix "-grammar" name)))
+ stdenv.hostPlatform.extensions.sharedLibrary;
path = "${drv}/parser";
}
)
grammars);
};
});
}