Manage nvim-treesitter grammars with Nix

This commit is contained in:
2023-01-04 01:09:44 +00:00
parent fc2dcbe0f8
commit 2a74031fa2
2 changed files with 51 additions and 41 deletions

View File

@ -10,7 +10,57 @@ in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
user.packages = with pkgs; [ user.packages = with pkgs; [
neovim (neovim.override {
configure = {
packages.myPlugins = with pkgs.vimPlugins; {
start = [
(nvim-treesitter.withPlugins (
plugins: with plugins; [
bash
c
cmake
cpp
css
dockerfile
elm
glsl
graphql
haskell
http
html
java
javascript
jsdoc
json
json5
latex
lua
markdown
ninja
nix
org
perl
php
pug
python
regex
rst
ruby
rust
scala
scss
toml
tsx
typescript
vim
yaml
zig
]
))
];
};
};
})
]; ];
home.configFile = { home.configFile = {

View File

@ -1,44 +1,4 @@
require("nvim-treesitter.configs").setup({ require("nvim-treesitter.configs").setup({
ensure_installed = {
"bash",
"c",
"cmake",
"cpp",
"css",
"dockerfile",
"glsl",
"graphql",
"haskell",
"http",
"html",
"java",
"javascript",
"jsdoc",
"json",
"json5",
"latex",
"lua",
"markdown",
"ninja",
"nix",
"org",
"perl",
"php",
"pug",
"python",
"regex",
"rst",
"ruby",
"rust",
"scala",
"scss",
"toml",
"tsx",
"typescript",
"vim",
"yaml",
"zig"
},
ignore_install = {}, ignore_install = {},
highlight = { highlight = {
enable = true, enable = true,