unix-config/.config/nvim/plugin/treesitter.lua
2024-08-16 21:55:29 +10:00

32 lines
573 B
Lua

local status, ts = pcall(require, "nvim-treesitter.configs")
if (not status) then return end
ts.setup {
highlight = {
enable = true,
disable = {},
},
indent = {
enable = true,
disable = {},
},
ensure_installed = {
"markdown",
"markdown_inline",
"tsx",
"json",
"yaml",
"css",
"scss",
"html",
"lua",
"vim",
},
autotag = {
enable = true,
},
}
local parser_config = require "nvim-treesitter.parsers".get_parser_configs()
parser_config.tsx.filetype_to_parsername = { "javascript", "typescript.tsx" }