neovim: add csharp treesitter and lsp
This commit is contained in:
parent
a7ce9a61ce
commit
89b7afd817
2 changed files with 33 additions and 0 deletions
|
|
@ -25,6 +25,7 @@
|
||||||
|
|
||||||
(nvim-treesitter.withPlugins (p: with p; [
|
(nvim-treesitter.withPlugins (p: with p; [
|
||||||
tree-sitter-comment
|
tree-sitter-comment
|
||||||
|
tree-sitter-c-sharp
|
||||||
# tree-sitter-javascript
|
# tree-sitter-javascript
|
||||||
tree-sitter-jsdoc
|
tree-sitter-jsdoc
|
||||||
tree-sitter-nix
|
tree-sitter-nix
|
||||||
|
|
@ -127,6 +128,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"eslint.enable" = true;
|
"eslint.enable" = true;
|
||||||
|
"omnisharp.path" = "${pkgs.omnisharp-roslyn}/bin/omnisharp";
|
||||||
"rust-analyzer.lens.enable" = false;
|
"rust-analyzer.lens.enable" = false;
|
||||||
"rust-analyzer.inlayHints.enable" = false;
|
"rust-analyzer.inlayHints.enable" = false;
|
||||||
"rust-analyzer.serverPath" = pkgs.rust-analyzer + "/bin/rust-analyzer";
|
"rust-analyzer.serverPath" = pkgs.rust-analyzer + "/bin/rust-analyzer";
|
||||||
|
|
|
||||||
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