Skip to content

b72u68/tree-sitter-iitran

Repository files navigation

tree-sitter-iitran

(Mini)IITRAN grammar for tree-sitter.

References

Installation

Follow this isntruction to add new parser and this instruction to add queries to nvim-treesitter.

To make Neovim detect iitran filetype and inject queries script, follow the instruction in Neovim's vim.filetype.add() or choose one of the following methods and make edit to your init.vim

  • Add new filetype to Vim/Neovim
lua << EOF
vim.filetype.add({
    extension = {
        iit='iitran'
    }
})
EOF

so Vim/Neovim can detect iitran file type from the file extension .iit.

  • Add autocommand to detect filetype in opening buffer
autocmd BufNewFile,BufRead *.iit set filetype=iitran

to set filetype of the current buffer with .iit file extension to iitran.