mirror of
https://github.com/josean-dev/dev-environment-files.git
synced 2025-01-09 17:51:20 +01:00
37 lines
746 B
Lua
37 lines
746 B
Lua
-- import nvim-treesitter plugin safely
|
|
local status, treesitter = pcall(require, "nvim-treesitter.configs")
|
|
if not status then
|
|
return
|
|
end
|
|
|
|
-- configure treesitter
|
|
treesitter.setup({
|
|
-- enable syntax highlighting
|
|
highlight = {
|
|
enable = true,
|
|
},
|
|
-- enable indentation
|
|
indent = { enable = true },
|
|
-- enable autotagging (w/ nvim-ts-autotag plugin)
|
|
autotag = { enable = true },
|
|
-- ensure these language parsers are installed
|
|
ensure_installed = {
|
|
"json",
|
|
"javascript",
|
|
"typescript",
|
|
"tsx",
|
|
"yaml",
|
|
"html",
|
|
"css",
|
|
"markdown",
|
|
"svelte",
|
|
"graphql",
|
|
"bash",
|
|
"lua",
|
|
"vim",
|
|
"dockerfile",
|
|
"gitignore",
|
|
},
|
|
-- auto install above language parsers
|
|
auto_install = true,
|
|
})
|