Skip to content

Commit

Permalink
Add nvim-treesitter.
Browse files Browse the repository at this point in the history
Haven't enabled almost anything explicitly yet because of [1]; I like
rainbow. Should be simple to fix, just requires some config changes.

Have definitely enabled TS for .tex files though, since the native
syntax highlighting is way too slow.

[1] luochen1990/rainbow#163
  • Loading branch information
ericonr committed May 1, 2022
1 parent 9cb82be commit 60d922c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,6 @@
[submodule "nvim/.config/nvim/pack/plugins/start/telescope-fzf-native.nvim"]
path = nvim/.config/nvim/pack/plugins/start/telescope-fzf-native.nvim
url = https://github.com/nvim-telescope/telescope-fzf-native.nvim.git
[submodule "nvim/.config/nvim/pack/plugins/start/nvim-treesitter"]
path = nvim/.config/nvim/pack/plugins/start/nvim-treesitter
url = https://github.com/nvim-treesitter/nvim-treesitter.git
11 changes: 11 additions & 0 deletions nvim/.config/nvim/init.vim
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,17 @@ require('telescope').load_extension('fzf')
EOF


" TREE-SITTER

" Use tree-sitter to highlight Latex, it's considerably less laggy
fu! LatexUseTS()
:syntax clear
:TSEnableAll highlight
:TSBufEnable highlight
endfunction
autocmd BufNewFile,BufRead *.tex :call LatexUseTS()


" LANGUAGE SERVER

" Partly from https://github.com/neovim/nvim-lspconfig/blob/master/README.md
Expand Down
1 change: 1 addition & 0 deletions nvim/.config/nvim/pack/plugins/start/nvim-treesitter
Submodule nvim-treesitter added at 5b6f6a
2 changes: 1 addition & 1 deletion void/void.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ _device="usbutils"
_monitor="bmon htop"
_net="curl wget git aerc asciinema lynx weechat"
_crypto="gnupg2 outils minisign"
_shell="fish-shell lolcat-c tmux xxd neovim"
_shell="fish-shell lolcat-c tmux xxd neovim tree-sitter-devel"
_tools="bsdtar fd lowdown p7zip parallel ripgrep ugrep stow execline s6 fswatch moreutils"
_boxes="toybox toybox.static busybox"
_void="vsv xtools fuzzypkg graphviz"
Expand Down

0 comments on commit 60d922c

Please sign in to comment.