]> git.r.bdr.sh - rbdr/tree-sitter-api-notation/blob - lua/tree-sitter-api-notation/init.lua
d21f441eeeb3513fc9536dfae37fed1060a1a845
[rbdr/tree-sitter-api-notation] / lua / tree-sitter-api-notation / init.lua
1 local parser_config = require 'nvim-treesitter.parsers'.get_parser_configs()
2 parser_config.api_notation = {
3 install_info = {
4 url = 'https://git.sr.ht/~rbdr/tree-sitter-api-notation', -- local path or git repo
5 files = {'src/parser.c'},
6 branch = 'main'
7 }
8 }
9 vim.api.nvim_create_autocmd({'BufNewFile', 'BufRead'}, {
10 pattern = {'*.api', '*.apinotation'},
11 callback = function () vim.opt.filetype = 'api_notation' end
12 })