31 lines
578 B
Markdown
31 lines
578 B
Markdown
# Treesitter grammars
|
|
|
|
```lua
|
|
local parser_config = require("nvim-treesitter.parsers").get_parser_configs()
|
|
|
|
parser_config.html_eex = {
|
|
install_info = {
|
|
url = "https://github.com/rockerBOO/tree-sitter-html-eex",
|
|
files = { "src/parser.c", "src/scanner.cc" },
|
|
},
|
|
maintainers = { "@rockerBOO" },
|
|
}
|
|
```
|
|
|
|
```lua
|
|
{
|
|
"nvim-treesitter/nvim-treesitter",
|
|
---@param opts TSConfig
|
|
config = function(\_, opts)
|
|
require("nvim-treesitter.configs").setup(opts)
|
|
-- you can add your code here
|
|
end,
|
|
},
|
|
```
|
|
|
|
```lua
|
|
vim.filetype.add({
|
|
pattern = { [".*/hypr/.*%.conf"] = "hyprlang" },
|
|
})
|
|
```
|