enable nvim treesitter

enable hcl treesitter
This commit is contained in:
Pim Kunis 2023-01-23 13:55:03 +01:00
parent 9100bfe06d
commit c0ee34bb94
2 changed files with 22 additions and 0 deletions

View file

@ -30,4 +30,13 @@ return require('packer').startup(function()
"MunifTanjim/nui.nvim",
}
}
-- Syntax highlighting
use {
'nvim-treesitter/nvim-treesitter',
run = function()
local ts_update = require('nvim-treesitter.install').update({ with_sync = true })
ts_update()
end,
}
end)

View file

@ -0,0 +1,13 @@
require'nvim-treesitter.configs'.setup {
-- A list of parser names, or "all" (the four listed parsers should always be installed)
ensure_installed = { "c", "lua", "vim", "help", "hcl" },
-- Automatically install missing parsers when entering buffer
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
auto_install = false,
highlight = {
-- `false` will disable the whole extension
enable = true,
},
}