refactor(neovim): use only needed grammars

This commit is contained in:
matt1432 2023-12-22 21:50:58 -05:00
parent f8b0d3232e
commit e8197651d9
2 changed files with 154 additions and 81 deletions

View file

@ -150,94 +150,167 @@ in {
extraConfig = fileContents ./base.vim; extraConfig = fileContents ./base.vim;
extraLuaConfig = fileContents ./base.lua; extraLuaConfig = fileContents ./base.lua;
plugins = with pkgs.vimPlugins; ([ plugins = with pkgs.vimPlugins;
fzfWrapper ([
fzf-vim fzfWrapper
fugitive fzf-vim
fugitive
{ {
plugin = dracula-nvim; plugin = dracula-nvim;
type = "viml"; type = "viml";
config = fileContents ./plugins/dracula.vim; config = fileContents ./plugins/dracula.vim;
} }
{ {
plugin = lualine-nvim; plugin = lualine-nvim;
type = "lua"; type = "lua";
config = fileContents ./plugins/lualine.lua; config = fileContents ./plugins/lualine.lua;
} }
{ {
plugin = todo-comments-nvim; plugin = todo-comments-nvim;
type = "lua"; type = "lua";
config = "require('todo-comments').setup()"; config = "require('todo-comments').setup()";
} }
{ {
plugin = gitsigns-nvim; plugin = gitsigns-nvim;
type = "lua"; type = "lua";
config = fileContents ./plugins/gitsigns.lua; config = fileContents ./plugins/gitsigns.lua;
} }
{ {
plugin = nvim-autopairs; plugin = nvim-autopairs;
type = "lua"; type = "lua";
config = fileContents ./plugins/autopairs.lua; config = fileContents ./plugins/autopairs.lua;
} }
{
plugin = indent-blankline-nvim;
type = "lua";
config = fileContents ./plugins/indent.lua;
}
{
plugin = mini-nvim;
type = "lua";
config = fileContents ./plugins/mini.lua;
}
]
++ optionals nvimIde [
# Coc configured
coc-css
coc-eslint
coc-java
coc-sh
coc-stylelintplus
{
plugin = coc-snippets;
type = "viml";
config = fileContents ./plugins/snippets.vim;
}
## Lua
coc-sumneko-lua
neodev-nvim
## Fzf
coc-fzf
coc-highlight
coc-json
coc-pyright
coc-vimlsp
coc-yaml
coc-toml
coc-markdownlint
coc-tsserver
{
plugin = neo-tree-nvim;
type = "viml";
config = ''
${fileContents ./plugins/neotree.vim}
lua << EOF
${fileContents ./plugins/neotree.lua}
EOF
'';
}
])
# Treesitter
++ (with pkgs.vimPlugins; [
nvim-treesitter-context nvim-treesitter-context
nvim-treesitter-textobjects nvim-treesitter-textobjects
nvim-treesitter-hypr nvim-treesitter-hypr
{ {
plugin = nvim-treesitter.withAllGrammars;
type = "viml"; type = "viml";
config = fileContents ./plugins/treesitter.vim; config = fileContents ./plugins/treesitter.vim;
} plugin = nvim-treesitter.withPlugins (p: [
{ p.awk
plugin = indent-blankline-nvim; p.bash
type = "lua"; p.c
config = fileContents ./plugins/indent.lua; p.c_sharp
} p.cairo
{ p.cmake
plugin = mini-nvim; p.comment
type = "lua"; p.cpp
config = fileContents ./plugins/mini.lua; p.css
} p.csv
] p.cuda
++ optionals nvimIde [ p.diff
# Coc configured p.dockerfile
coc-css p.dot
coc-eslint p.git_config
coc-java p.git_rebase
coc-sh p.gitattributes
coc-stylelintplus p.gitcommit
{ p.gitignore
plugin = coc-snippets; p.go
type = "viml"; p.gomod
config = fileContents ./plugins/snippets.vim; p.gosum
} p.groovy
p.haskell
## Lua p.haskell_persistent
coc-sumneko-lua p.html
neodev-nvim p.ini
p.java
## Fzf p.javascript
coc-fzf p.jq
p.jsdoc
coc-highlight p.json
coc-json p.json5
coc-pyright p.jsonc
coc-vimlsp p.jsonnet
coc-yaml p.kotlin
coc-toml p.latex
coc-markdownlint p.lua
coc-tsserver p.luadoc
p.make
{ p.markdown
plugin = neo-tree-nvim; p.meson
type = "viml"; p.ninja
config = '' p.nix
${fileContents ./plugins/neotree.vim} p.passwd
p.perl
lua << EOF p.php
${fileContents ./plugins/neotree.lua} p.phpdoc
EOF p.properties
''; p.python
p.rasi
p.regex
p.requirements
p.ruby
p.rust
p.scss
p.sql
p.ssh_config
p.toml
p.todotxt
p.typescript
p.udev
p.vim
p.vimdoc
p.vue
p.xml
p.yaml
]);
} }
]); ]);
}; };

Binary file not shown.