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 181 additions and 108 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
]);
} }
]); ]);
}; };

View file

@ -7,11 +7,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1703084405, "lastModified": 1703290233,
"narHash": "sha256-kmpns3mc7IzDYRIvyK+ZubaUJKqp869siRlsc1bMrGg=", "narHash": "sha256-QQjBp7VVDQzydlelmAjnnuA/3gyPlo0fObzGFytLEE4=",
"owner": "Aylur", "owner": "Aylur",
"repo": "ags", "repo": "ags",
"rev": "f6dd934744f496731c2d857b03a7e1c7456e2757", "rev": "d1835cad79868cab3154d673e6d37b6b46624611",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -215,11 +215,11 @@
"systems": "systems_4" "systems": "systems_4"
}, },
"locked": { "locked": {
"lastModified": 1694529238, "lastModified": 1701680307,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384", "rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -314,11 +314,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1703178811, "lastModified": 1703265279,
"narHash": "sha256-Orbqa8DvszYZ38XGWAs43hVs++czt2N6/Y0sFRLhJms=", "narHash": "sha256-5jVtOwyMH1FzclxHrsFWzBdB+VyjUUSu1wyZhZlR6WU=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "fb5ac0c870a1b3ffea70e02ab1720d991ce812ae", "rev": "07c322a7cff03267fd881adae1afe63367c5d608",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -358,11 +358,11 @@
"xdph": "xdph" "xdph": "xdph"
}, },
"locked": { "locked": {
"lastModified": 1703194032, "lastModified": 1703287262,
"narHash": "sha256-ynsyO+BacfysxWm3R9owGPZfsClLXWEXNEfqMD6mBic=", "narHash": "sha256-gvSACF7FRNkSZ2s1pXlqeK/qw6QF7gn1gHTt6I1dwA4=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "Hyprland", "repo": "Hyprland",
"rev": "bd952dcef2ead3b0b7e2d730930a3fc528813ee0", "rev": "6c8e0f9863d86755d7931a9d6ad920b2049cf6a6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -426,11 +426,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1703117360, "lastModified": 1703290449,
"narHash": "sha256-hny5sw/gmO3Rl1I+8sCIgKY1hRLg/L68cVCZVndug24=", "narHash": "sha256-Pmi8rLEUZfbBT/vsRq86PqEbZp/OKqoA7kG2prMWMpA=",
"owner": "nix-community", "owner": "nix-community",
"repo": "neovim-nightly-overlay", "repo": "neovim-nightly-overlay",
"rev": "5c08a5966b296b2f208a4050fbe22509d56ce669", "rev": "12691c4ab966caf6b1c28bcd540104f5478d7829",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -449,11 +449,11 @@
}, },
"locked": { "locked": {
"dir": "contrib", "dir": "contrib",
"lastModified": 1703098322, "lastModified": 1703289024,
"narHash": "sha256-atHwBC/dzCWR7tc5B0mpmiKEkGNJhp39eteQlfzerTg=", "narHash": "sha256-8lhYdgoytyJbX7q0eQvNwfkoLnvG8t4E1dNml4rv7OI=",
"owner": "neovim", "owner": "neovim",
"repo": "neovim", "repo": "neovim",
"rev": "0c120307ca1ab613e63865c634d7e10ad67fb0ba", "rev": "0c3d2a7fd99d6171fad81cc8b010281b1cd1c3e0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -531,11 +531,11 @@
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_2"
}, },
"locked": { "locked": {
"lastModified": 1703121193, "lastModified": 1703293829,
"narHash": "sha256-ZxiqYr9+KSeRUpdXSY+kN4Jep4rKJSW85aakdGNapC0=", "narHash": "sha256-WoKwe5AeiuhxLFn5dM/ddC7dC6rnEgZWfpLSeWNmOCg=",
"owner": "fufexan", "owner": "fufexan",
"repo": "nix-gaming", "repo": "nix-gaming",
"rev": "df28ff973371ca1f0b296adaadf0714af6f4f226", "rev": "97060d449346cc39bd5da8e190be0528c5bb3251",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -719,11 +719,11 @@
"nixpkgs": "nixpkgs_6" "nixpkgs": "nixpkgs_6"
}, },
"locked": { "locked": {
"lastModified": 1703193381, "lastModified": 1703269123,
"narHash": "sha256-ene7BogLot9jn/xTAP2W1hm8HxPAmW1j0LsSbsraTdI=", "narHash": "sha256-GWIDaBkJXN3i+LZL5rN1lKib3Ie4RZDQnTgz0zwh/Wk=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixpkgs-wayland", "repo": "nixpkgs-wayland",
"rev": "8e05204779246147cdcf501ac97e63ee19d6eba7", "rev": "465aa369972263f144d72e42b254e3299eb9fdea",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -878,11 +878,11 @@
}, },
"nur": { "nur": {
"locked": { "locked": {
"lastModified": 1703187919, "lastModified": 1703293508,
"narHash": "sha256-r28tTx9xuc2h3tCA1zmotrLnJDffaFHMMSy5hDpkegU=", "narHash": "sha256-UOqBwltrbt7N4NTt+jhXnSRctnKMfaaMCwZKbKHOw/4=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "aa77c3b4f6b8dba86c5e75269b1f6a123168d4df", "rev": "d0b69ff035bd06125e018c4f78c4964a9479ffcd",
"type": "github" "type": "github"
}, },
"original": { "original": {