1
0
Fork 0

nvim: Install tree-sitter parsers from nixpkgs; use custom plugin source

This commit is contained in:
Daniel Kempkens 2023-03-27 20:52:26 +02:00
parent a71a0cd958
commit d29da3cfd8
Signed by: daniel
SSH key fingerprint: SHA256:Ks/MyhQYcPRQiwMKLAKquWCdCPe3JXlb1WttgnAoSeM

View file

@ -50,18 +50,56 @@ in
yamllint yamllint
]; ];
extraLuaConfig =
let
treesitter-parsers = pkgs.symlinkJoin {
name = "treesitter-parsers";
paths = (pkgs.vimPlugins.nvim-treesitter.withPlugins (p: [
p.bash
p.comment
p.css
p.dockerfile
p.elixir
p.erlang
p.fennel
p.fish
p.heex
p.html
p.http
p.java
p.javascript
p.jsdoc
p.json
p.lua
p.make
p.markdown
p.markdown-inline
p.nix
p.query
p.regex
p.ruby
p.scss
p.sql
p.svelte
p.toml
p.tsx
p.typescript
p.vim
p.yaml
])).dependencies;
};
in
''
vim.opt.runtimepath:append("${treesitter-parsers}")
require('nifoc.nix')
require('impatient')
require('configuration.init')
'';
plugins = (with customPlugins; [ plugins = (with customPlugins; [
# Fixes # Fixes
{ impatient-nvim
plugin = impatient-nvim;
config = ''
-- Nix init.lua workaround
require('nifoc.nix')
require('impatient')
require('configuration.init')
'';
type = "lua";
}
# Utils # Utils
popup-nvim popup-nvim
@ -107,41 +145,7 @@ in
# Syntax # Syntax
{ {
plugin = nvim-treesitter.withPlugins ( plugin = nvim-treesitter;
plugins: with plugins; [
tree-sitter-bash
tree-sitter-comment
tree-sitter-css
tree-sitter-dockerfile
tree-sitter-elixir
tree-sitter-erlang
tree-sitter-fennel
tree-sitter-fish
tree-sitter-heex
tree-sitter-html
tree-sitter-http
tree-sitter-java
tree-sitter-javascript
tree-sitter-jsdoc
tree-sitter-json
tree-sitter-lua
tree-sitter-make
tree-sitter-markdown
tree-sitter-markdown-inline
tree-sitter-nix
tree-sitter-query
tree-sitter-regex
tree-sitter-ruby
tree-sitter-scss
tree-sitter-sql
tree-sitter-svelte
tree-sitter-toml
tree-sitter-tsx
tree-sitter-typescript
tree-sitter-vim
tree-sitter-yaml
]
);
config = builtins.readFile ../../config/nvim/plugins/treesitter.fnl; config = builtins.readFile ../../config/nvim/plugins/treesitter.fnl;
type = "fennel"; type = "fennel";
} }