trixy/lua/plugins/treesitter.lua

28 lines
839 B
Lua
Raw Permalink Normal View History

2023-07-29 15:00:35 +02:00
require'nvim-treesitter.configs'.setup {
-- A list of parser names, or "all" (the five listed parsers should always be installed)
2024-02-06 00:47:31 +01:00
ensure_installed = { "c", "lua", "vim", "vimdoc", "query", "haskell", "go", "bash", "python" },
2023-07-29 15:00:35 +02:00
-- Install parsers synchronously (only applied to `ensure_installed`)
sync_install = false,
2023-07-29 15:00:35 +02:00
-- Automatically install missing parsers when entering buffer
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
auto_install = true,
2023-07-29 15:00:35 +02:00
highlight = {
enable = true,
},
2023-07-29 15:00:35 +02:00
}
2024-02-04 00:25:41 +01:00
local parser_config = require("nvim-treesitter.parsers").get_parser_configs()
parser_config.hypr = {
install_info = {
url = "https://github.com/luckasRanarison/tree-sitter-hypr",
files = { "src/parser.c" },
branch = "master",
},
filetype = "hypr",
}