I have finished a grammar for a language I use recently, and said language isn’t available in Neovim/Vim currently already (I do have runtime files available). I’m kind of confused as to how I should proceed with getting the filetype support merged into Neovim and Vim with conjunction with the grammar I need to get merged into nvim-treesitter
I have never contributed to Neovim or Vim and not sure where to start with a filetype addition that applies to both editors
The procedure is still the same as it has always been: (almost all) runtime files are “owned” by Vim, so the correct approach is to make a PR to vim/vim first. Filetype detection is fairly trivial (if it only requires looking at the filename instead of the contents):
add a line to runtime/filetype.vim
add a line to src/testdir/test_filetype.vim
You can look at previous commits for Vim that have a description like “Problem: not recognized”.
Once the PR is merged (which usually happens quickly), Neovim will port it without you having to do anything.
It’s similar with other runtime (syntax, indent, ftplugin) files: make a PR to Vim. These changes get bundled into one of the infrequent “runtime file updates” commits, which Neovim also ports.