]> git.r.bdr.sh - rbdr/tree-sitter-api-notation/blame - lua/tree-sitter-api-notation.lua
Update plugin structure
[rbdr/tree-sitter-api-notation] / lua / tree-sitter-api-notation.lua
CommitLineData
7e8e1a0c
RBR
1
2local M = {}
3
4function M.setup()
5 local parser_config = require 'nvim-treesitter.parsers'.get_parser_configs()
6 parser_config.api_notation = {
7 install_info = {
8 url = 'https://git.sr.ht/~rbdr/tree-sitter-api-notation', -- local path or git repo
9 files = {'src/parser.c'},
10 branch = 'main'
11 }
12 }
13 vim.api.nvim_create_autocmd({'BufNewFile', 'BufRead'}, {
14 pattern = {'*.api', '*.apinotation'},
15 callback = function () vim.opt.filetype = 'api_notation' end
16 })
17end
18
19return M