extra: nvim: Add nvim-treesitter
plugin
Signed-off-by: Christoph Heiss <christoph@c8h4.io>
This commit is contained in:
parent
4c2bc93fe8
commit
2a7a1bbc91
|
@ -299,6 +299,8 @@ require('lazy').setup({
|
|||
vim.opt.shortmess:append('c')
|
||||
end,
|
||||
},
|
||||
|
||||
{ 'nvim-treesitter/nvim-treesitter', build = ':TSUpdate' },
|
||||
})
|
||||
|
||||
-- Basic things first
|
||||
|
@ -311,3 +313,12 @@ vim.cmd.highlight('comment', 'ctermfg=7')
|
|||
-- Bring modified buffers to attention
|
||||
vim.cmd['highlight!']('BufferInactiveMod', 'cterm=bold')
|
||||
vim.cmd['highlight!']('BufferCurrentMod', 'cterm=bold')
|
||||
|
||||
-- Install wanted treesitter parsers
|
||||
local ts_parsers = require('nvim-treesitter.parsers')
|
||||
local ts_install = require('nvim-treesitter.install')
|
||||
for _, p in ipairs(utils.WANTED_TREESITTER_PARSERS) do
|
||||
if not ts_parsers.has_parser(p) then
|
||||
ts_install.update(p)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -19,4 +19,9 @@ return {
|
|||
'*/node_modules/*',
|
||||
'*/tmp/*',
|
||||
},
|
||||
WANTED_TREESITTER_PARSERS = {
|
||||
'lua',
|
||||
'haskell',
|
||||
'rust',
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue