1
0
Fork 0

nvim: do not install tree-sitter parsers via nix anymore

This commit is contained in:
Daniel Kempkens 2024-02-15 18:20:47 +01:00
parent 7620362fd5
commit ce6c3a1d49
Signed by: daniel
SSH key fingerprint: SHA256:Ks/MyhQYcPRQiwMKLAKquWCdCPe3JXlb1WttgnAoSeM
2 changed files with 48 additions and 53 deletions

View file

@ -2,8 +2,47 @@
nifoc-treesitter (require :nifoc.treesitter) nifoc-treesitter (require :nifoc.treesitter)
disable-parsers []] disable-parsers []]
(nifoc-treesitter.setup) (nifoc-treesitter.setup)
(treesitter-config.setup {:ensure_installed [] (treesitter-config.setup {:parser_install_dir _G.nvim_treesitter_parser_directory
:sync_install true :ensure_installed [:angular
:bash
:css
:diff
:dockerfile
:eex
:elixir
:erlang
:fennel
:fish
:git_config
:git_rebase
:gitattributes
:gitcommit
:gitignore
:graphql
:heex
:html
:http
:java
:javascript
:jsdoc
:json
:lua
:make
:markdown
:markdown_inline
:nix
:python
:query
:regex
:ruby
:scss
:sql
:svelte
:toml
:tsx
:typescript
:vim]
:sync_install false
:auto_install false :auto_install false
:highlight {:enable true :disable disable-parsers} :highlight {:enable true :disable disable-parsers}
:indent {:enable true :disable disable-parsers} :indent {:enable true :disable disable-parsers}

View file

@ -51,54 +51,10 @@ in
xcbuild xcbuild
]; ];
extraLuaConfig = extraLuaConfig = /* lua */ ''
let
treesitter-parsers = pkgs.symlinkJoin {
name = "treesitter-parsers";
paths = (pkgs.vimPlugins.nvim-treesitter.withPlugins (p: [
p.angular
p.bash
#p.comment # slow
p.css
p.diff
p.dockerfile
p.eex
p.elixir
p.erlang
p.fennel
p.fish
p.graphql
p.heex
p.html
p.http
p.java
p.javascript
p.jsdoc
p.json
p.kotlin
p.lua
p.make
p.markdown
p.markdown_inline
p.nix
p.python
p.query
p.regex
p.ruby
p.scss
p.sql
p.svelte
p.toml
p.tsx
p.typescript
p.vim
p.yaml
])).dependencies;
};
in
/* lua */ ''
vim.loader.enable() vim.loader.enable()
vim.opt.runtimepath:prepend("${treesitter-parsers}") _G.nvim_treesitter_parser_directory = os.getenv("HOME") .. "/.local/share/nvim/nvim-treesitter_parser"
vim.opt.runtimepath:prepend(_G.nvim_treesitter_parser_directory)
require('nifoc.nix') require('nifoc.nix')
require('configuration.init') require('configuration.init')