neovim: add csharp treesitter and lsp
This commit is contained in:
parent
a7ce9a61ce
commit
89b7afd817
2 changed files with 33 additions and 0 deletions
31
overlays/tree-sitter.nix
Normal file
31
overlays/tree-sitter.nix
Normal 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);
|
||||
};
|
||||
});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue