Tracking issue: language support requests
clason opened this issue · comments
This is a tracking issue collecting requests for new languages to add to nvim-treesitter. If you would like to add a language to the list, comment on this issue with the following information:
- name of the language
- link to an existing tree-sitter parser (if available)
- link to a repository containing queries (if available)
- language grammar description, vim syntax plugin etc. if none of the above exist.
Note: having a language on this list does not mean a maintainer will do the work for adding it; rather this list is meant as guidance for community contributions.
Languages needing a PR
(Parsers and simple queries exist already and just need to be included in our list and tested.)
- Proto (#2307)
- Solidity (#1168)
- SQL (#2511)
- org (#2841)
- TJ's Neovim-specific Lua parser (#543)
- ReScript
- gotmpl
Languages needing queries
(A parser exists, but queries for highlights, indent, injections, folds, and/or locals are still missing. Some guidance for writing these can be found in CONTRIBUTING.md and the tree-sitter documentation.)
Languages needing parsers
(Not even a parser exists yet; if you are familiar with the language and tree-sitter, consider contributing one. You can also help by searching for new parsers in case someone has created by now.)
Hello, great thanks for maintaining this repo! I’d like to promote a new language grammar that is battle-tested enough to this repo, so that programmers who use ReScript can just :TSInstall rescript
if they would like to get its support without extra plugin dependencies.
- name of the language: ReScript
- link to an existing tree-sitter parser: https://github.com/nkrkv/nvim-treesitter-rescript/tree/main/tree-sitter-rescript
- link to a repository containing queries: https://github.com/nkrkv/nvim-treesitter-rescript/tree/main/queries/rescript
I’m the maintainer of the nvim-treesitter-rescript
repo, and would kindly apply any necessary changes to be applied for nvim-treesitter
upstream.
Hi @nkrkv! Do you want to create PR?
Sure. What points should this PR affect? I see:
- https://github.com/nvim-treesitter/nvim-treesitter/blob/master/lua/nvim-treesitter/parsers.lua
- https://github.com/nvim-treesitter/nvim-treesitter/tree/master/queries
- https://github.com/nvim-treesitter/nvim-treesitter/tree/master/tests/query/highlights
Will it be enough?
Also indents
tests might be useful (but not required). Maybe take a look at earlier PRs adding parsers.
(Fair warning: I'll hide and/or delete the comments in the near future to keep this tracking issue tidy.)
Hello, by working with Kubernetes and Helm templates, I would like to request support for the templates used in the workflow.
There is already some implementation of it, all praise to ngalaiko for creating it.
- name of the language
gotmpl - link to an existing tree-sitter parser (if available)
https://github.com/ngalaiko/tree-sitter-go-template - link to a repository containing queries (if available)
https://github.com/ngalaiko/tree-sitter-go-template/tree/master/queries - language grammar description, vim syntax plugin etc. if none of the above exist.
Golang template documentation
it looks like the sql pr linked at the top of this issue is closed and outdated. This repo https://github.com/m-novikov/tree-sitter-sql is the language parser shown for SQL on the official treesitter website https://tree-sitter.github.io/tree-sitter/ (at least I think this is the official site). What would it take to integrate this parser into nvim-treesitter?
@andykais not much. A small addition to lua/parsers.lua
and an adaption of https://github.com/m-novikov/tree-sitter-sql/blob/main/queries/highlights.scm to according to our CONTRIBUTING.md
@theHamsta is this sufficient? #2511
Jinja
Docs (v3): https://jinja.palletsprojects.com/en/3.1.x/
Implementations (WIP, v2):
Sample Vim plugins (likely v2):
Elsa
- Syntax: https://github.com/ucsd-progsys/elsa
- Repository: https://github.com/glapa-grossklag/tree-sitter-elsa
The syntax specification is a little informal, so let me know if any more information is needed. :)
Haxe
- Syntax (described with OCaml): https://github.com/HaxeFoundation/haxe/tree/development/src/syntax
- Vim syntax plugin: https://github.com/jdonaldson/vaxe
- LSP: https://github.com/vshaxe/haxe-language-server
- Official site: https://haxe.org/
Haxe also has a tree-sitter implementation here:
https://github.com/vantreeseba/tree-sitter-haxe
FSharp
EDIT: @baronfel 's parser is now archived, points to this one instead
Current Parser
It doesn't appear that anyone has done any queries
Language spec's
I would love to contribute, but frankly all of this is WAAAAY over my head.
Jenkinsfile
In addition to groovy's syntax, there are additional keywords added by jenkins that would be common on a Jenkinsfile
:
https://github.com/martinda/Jenkinsfile-vim-syntax
Antlr4 , Antlr3
vim syntax plugins:
https://github.com/Joakker/vim-antlr4
https://github.com/dylon/vim-antlr
vim syntax file:
https://github.com/vim/vim/blob/master/runtime/syntax/antlr.vim
OpenSCAD
My parser for this seems to be feature complete: https://github.com/bollian/tree-sitter-openscad
I'm willing to maintain support for my parser. Currently I'm looking for guidance on how to write the queries and modules for supporting highlighting, folding, and indentation.
QML
I found a plugin for it here https://github.com/peterhoeg/vim-qml
However having it in treesitter would be nice
Edit: Found this pr in treesitter repo: tree-sitter/tree-sitter@38ff9e3
That links to this https://github.com/yuja/tree-sitter-qmljs
Nim lang
Maybe this,no test: https://github.com/haxscramper/tree-sitter-nim
Neovim plugin: https://github.com/alaviss/nim.nvim
LUAP
Parser for lua patterns.
This improved readability of patterns a lot in my opinion.
https://github.com/vhyrro/tree-sitter-luap
Mesonbuild
Parse for mesonbuild
I think we need the highlight for meson build also..
https://mesonbuild.com/
No gammer so far
Ansible
This exists for VSCode: https://github.com/ansible/ansible-language-server
This exists as a CoC extension for vim/nvim: https://github.com/yaegassy/coc-ansible
I think however that a lot of work needs to be done to convert this into treesitter syntax. I would like to help, but need some guidance.
I have now seen the light (and the errors of my ways). Note that Nvim tree is just a parser of a filetype, meaning that a Ansible LSP can use the YAML backend written by Treesitter. Hence, my comment was not really interesting.
Still a Jinja parser has my vote.
Move
There's a plugin for VSCode: https://github.com/damirka/vscode-move-syntax
But there may be considerable work involved in producing what treesitter requires. I'm happy to help since I'd like to use treesitter on move programs, but like the fellow above, I'd need a bit of guidance for getting started.
XQuery
I built, maintain and use this tree-sitter-xquery
which can be seen in web tree-sitter playground
- has highlight query scm
- tests for grammar.
- loads of XQuery examples which don't error
Stylus
- TS parser: N/A
- Documentation: https://stylus-docs.netlify.app/docs/
- Vim plugin: https://github.com/vio/vim-stylus
Less
- TS parser: N/A
- Documentation: https://lesscss.org/#overview
- Vim plugin: https://github.com/groenewege/vim-less
CoffeeScript
- TS parser: N/A
- Documentation: https://coffeescript.org/#language
- Vim plugin: https://github.com/kchmck/vim-coffee-script
LiveScript
- TS parser: N/A
- Documentation: https://livescript.net/#introduction
- Vim plugin: https://github.com/wsdjeg/vim-livescript
qmake
- TS parser: N/A
- Documentation: https://doc.qt.io/qt-5/qmake-language.html
- Vim plugin: https://github.com/MartinDelille/vim-qmake
Inno Setup Script
- TS parser: N/A
- Documentation: https://jrsoftware.org/ishelp/index.php
- Vim plugin: built-in
PlantUML
- TS parser:
- Documentation: https://plantuml.com/
- Vim plugin: https://github.com/aklt/plantuml-syntax
✓ NASM
- TS parser: https://github.com/PictElm/tree-sitter-nasm
- Documentation: https://www.nasm.us/xdoc/2.16/html/nasmdoc3.html
- Vim plugin: built-in
Crystal
- TS parser:
- Documentation: https://crystal-lang.org/reference/1.8/syntax_and_semantics/index.html
- Vim plugin: https://github.com/jlcrochet/vim-crystal
✓ Smali
- TS parser: https://git.sr.ht/~yotam/tree-sitter-smali
- Documentation: https://github.com/JesusFreke/smali
- Vim plugin: https://github.com/dieterplex/vim-smali
✓ Groovy
- TS parser:
- Documentation: https://groovy-lang.org/documentation.html#languagespecification
- Vim plugin: built-in
✓ jq
- TS parser: https://github.com/flurie/tree-sitter-jq
- Documentation: https://stedolan.github.io/jq/manual/#Basicfilters
- Vim plugin: https://github.com/vito-c/jq.vim
Nushell
- Grammar: https://github.com/LhKipp/tree-sitter-nu
- Documentation: https://www.nushell.sh/book/command_reference.html
Plugins for vim are already an nushell/nushell#3728
Nim lang
Maybe this,no test: https://github.com/haxscramper/tree-sitter-nim Neovim plugin: https://github.com/alaviss/nim.nvim
@tomasky These treesitter projects for Nim exist as well, and looks like they may be may be slightly more mature:
gitignore
Was looking for this and couldn't find it except in this issue, which referenced a repo with a grammar/some patterns.
@andy2mrqz do you want to create a PR? I think you can create highlights similar to regex
EDIT: I will try an attempt at this...
@ElDifinitivo I Tried to add https://github.com/nushell/nushell.git but it failed to parse a simple test file without errors
@ElDifinitivo I Tried to add https://github.com/nushell/nushell.git but it failed to parse a simple test file without errors
Maybe because that isn't a tree-sitter parser? The parser grammar is here.
@enderger I meant to link https://github.com/LhKipp/tree-sitter-nu . https://github.com/LhKipp/tree-sitter-nu didn't work well for me
@enderger I meant to link https://github.com/LhKipp/tree-sitter-nu . https://github.com/LhKipp/tree-sitter-nu didn't work well for me
Ah, alright. We seem to have got it working using the latest version rather than the one used by the Neovim plugin, if it helps.
Mesonbuild
Parse for mesonbuild I think we need the highlight for meson build also.. https://mesonbuild.com/ No gammer so far
Now I create one, can it be used?
https://github.com/Decodetalkers/tree-sitter-meson
make a PR for it
awk
Queries and existing parser can be found here: https://github.com/Beaglefoot/tree-sitter-awk
Powershell
Official existing parser can be found here: https://github.com/powershell/tree-sitter-powershell
TODO list is huge, though, so I searched for a few materials, hope It helps:
- existing vim syntax files (seems like most of the keywords from todo list are done): https://github.com/PProvost/vim-ps1
- official lanaguage specification: https://docs.microsoft.com/en-us/powershell/scripting/lang-spec/chapter-02?view=powershell-7.2
I don't really know how parsers work so I have troubles adding it to nvim-treesitter. However, I have written some custom queries so feel free to mention me in a PR, I will try to help with improving them.
Bitbake
User manual for bitbake:
https://docs.yoctoproject.org/1.6/bitbake-user-manual/bitbake-user-manual.html
https://yal.cc/bb-code-syntax-highlighting-for-notepad/
Links to highlighting:
https://github.com/kergoth/vim-bitbake
https://github.com/ikoveshnik/bitbake-syntax-highlighter
Dhall
Homepage: https://dhall-lang.org/
Vim syntax plugin: https://github.com/vmchale/dhall-vim
There is no parser nor queries yet AFAIK.
Apache Velocity Template Language (VTL)
Homepage: https://velocity.apache.org/engine/1.7/user-guide.html
Vim syntax plugin:
There is no parser nor queries yet AFAIK. FYI This templating language is not bind only to HTML as it's used by AWS with JSON: https://docs.aws.amazon.com/appsync/latest/devguide/resolver-mapping-template-reference-programming-guide.html.
What is preventing the rescript tree-sitter grammar to be integrated?
What is preventing the rescript tree-sitter grammar to be integrated?
Somebody making a PR.
git-commit
Helix uses a treesitter parser also for git-commit filetype.
Grammar: https://github.com/the-mikedavis/tree-sitter-git-commit
It is somewhat complete but needs testing and highlight queries.
Luckily, Helix has already implemented some queries: https://github.com/helix-editor/helix/tree/master/runtime/queries/git-commit
git-commit
Helix uses a treesitter parser also for git-commit filetype.
Grammar: https://github.com/the-mikedavis/tree-sitter-git-commit
It is somewhat complete but needs testing and highlight queries.
Luckily, Helix has already implemented some queries: https://github.com/helix-editor/helix/tree/master/runtime/queries/git-commit
I've looked at this parser in order to add this in nvim-treesitter but I have a mixed opinion. I'm french and I use git in french and this parser doesn't works at all in this case, I've notice this to the author the-mikedavis/tree-sitter-git-commit#4 and I don't think he will fix that.
So, I'm thinking about implementing myself a gitcommit parser that will works with all languages (I hope)...
Tcl / Tk
- Homepage: https://www.tcl.tk/
- "Grammar": https://wiki.tcl-lang.org/page/BNF+for+Tcl
Yuck
Yuck is used to configure Elkowar's Wacky Widgets (EWW).
- EWW's website (contains some Yuck syntax)
- Vim plugin for Yuck
- It seems like someone started to work on a parser, but deleted it
I don't know how to write TS grammars, so I'm unsure how much I can actually help here, but any work on this is appreciated!
T32
TRACE32 is a debugger for embedded software development. PRACTICE is its scripting language.
Parser & Queries: https://codeberg.org/xasc/tree-sitter-t32
Pull request: #3779
It would be great if this parser could be supported by nvim-treesitter.
git-commit
Helix uses a treesitter parser also for git-commit filetype.
Grammar: https://github.com/the-mikedavis/tree-sitter-git-commit
It is somewhat complete but needs testing and highlight queries.
Luckily, Helix has already implemented some queries: https://github.com/helix-editor/helix/tree/master/runtime/queries/git-commitI've looked at this parser in order to add this in nvim-treesitter but I have a mixed opinion. I'm french and I use git in french and this parser doesn't works at all in this case, I've notice this to the author the-mikedavis/tree-sitter-git-commit#4 and I don't think he will fix that.
So, I'm thinking about implementing myself a gitcommit parser that will works with all languages (I hope)...
I'm working on this parser here and I'm looking for testers (and maybe reviewers) gbprod/tree-sitter-gitcommit#1 before submiting a PR here. 🙏
Cap'n Proto
- Homepage: https://capnproto.org
- Vim highlights: https://github.com/cstrahan/vim-capnp
- Name: KDL
- Haven't found any tree-sitter parsers yet
- Grammar description: https://kdl.dev/ (https://github.com/kdl-org/kdl/blob/main/SPEC.md)
Thrift
TreeSitter: https://github.com/duskmoon314/tree-sitter-thrift
VIM Plugin: https://github.com/solarnz/thrift.vim
Bitbake
User manual for bitbake: [OUTDATED URL]
I also desire support for BitBake files (.bb and .bbappend), used by the Yocto Project (https://www.yoctoproject.org/) and OpenEmbedded (http://www.openembedded.org/) for building Linux distributions. However, the initial request from @Fildo7525 above referenced a very old version of its documentation. The current documentation is: https://docs.yoctoproject.org/bitbake/ . In particular, this section describes the syntax in good detail: https://docs.yoctoproject.org/bitbake/bitbake-user-manual/bitbake-user-manual-metadata.html
- Name of the language: FunC
- Parser: akifoq/tree-sitter-func: FunC grammar for tree-sitter
- Queries: tree-sitter-func/queries at master · akifoq/tree-sitter-func
- Documentation: FunC Programming Language - Overview
D2 – Declarative Diagramming
D2 is a diagram scripting language that turns text to diagrams, similar to PlantUML or Mermaid.js
- Existing tree-sitter parser: https://github.com/pleshevskiy/tree-sitter-d2/tree/main/src
- Existing tree-sitter queries: https://github.com/pleshevskiy/tree-sitter-d2/tree/main/queries
- Official language repository: https://github.com/terrastruct/d2
- Official language parser: https://github.com/terrastruct/d2/tree/master/d2parser
- Official website: https://d2lang.com
SML - Standard ML
csv and tsv
See #4102
nginx
nginx is an HTTP and reverse proxy server, a mail proxy server, and a generic TCP/UDP proxy server, originally written by Igor Sysoev. (Taken from their About page)
- No existing tree-sitter parsers/queries available, afaik
- Existing vim syntax: https://github.com/vim/vim/blob/870cd76283e003a0fa57449aa077f0d01a6a2d80/runtime/syntax/nginx.vim
- Vim plugin for nginx: https://github.com/chr4/nginx.vim
Moonscript
MoonScript is a language that compiles into Lua.
- No existing tree-sitter parsers/queries available afaik
- Vim syntax plugin: https://github.com/leafo/moonscript-vim
Moonscript
MoonScript is a language that compiles into Lua.
- No existing tree-sitter parsers/queries available afaik
- Vim syntax plugin: https://github.com/leafo/moonscript-vim
want to work on this with me @PhosCity?
want to work on this with me @PhosCity?
Unfortunately, I have absolutely no knowledge of treesitter grammar. I'd not be of much help to you.
QMLDIr
qmldir is the config for qmlproject, and I write one
It may not used much, and I think maybe just regex can handle such highlight, but I still write one, if one of you need it ..
Prolog
Couldn't find much due to prolog's preference for emacs, but I found an (unmaintained) vim syntax plugin
https://github.com/mxw/vim-prolog
Common implementation is SWI-Prolog and GNU Prolog. Specified by ISO standard https://www.iso.org/standard/21413.html along with supporting standards and a separate "modules" standard from 2000.
Robotframework
I'm working on a parser for Vespa schemas. It's still a work in progress, but sharing here in case anyone CTRL+F's Vespa here :-) https://github.com/bartek/tree-sitter-vespa
Hurl
VSCode tree-sitter plugin: https://github.com/pfeiferj/vscode-hurl
Grammar: https://hurl.dev/docs/grammar.html
Starlark
A configuration dialect of Python, used mainly for Bazel build system.
Expect
Expect is a superset of TCL.
A standalone Treesitter for TCL which it could be built upon already exists: https://github.com/lewis6991/tree-sitter-tcl
Languages in Helix but not here
bass https://github.com/vito/basscairo https://www.cairo-lang.org- crystal https://crystal-lang.org
- esdl https://energytransition.gitbook.io/esdl/
hare https://harelang.org- lean https://leanprover.github.io
matlab https://www.mathworks.com/products/matlab.html- nu https://www.nushell.sh
odin https://odin-lang.orgpasswdpo https://www.gnu.org/software/gettext/manual/html_node/PO-Files.htmlpony https://www.ponylang.io- purescript https://www.purescript.org
- sage https://www.sagemath.org
tablegen https://llvm.org/docs/TableGen- task https://taskwarrior.org
- tfvars? (could be Terraform which we have)
uxntal https://wiki.xxiivv.com/site/uxntal_reference.html- wast https://webassembly.js.org/docs/contrib-wat-vs-wast.html
- wat https://www.webassemblyman.com/wat_webassembly_text_format.html
- wit https://github.com/WebAssembly/component-model/blob/main/design/mvp/WIT.md
- xit https://xit.jotaen.net/
Cython
ABAP
https://community.sap.com/topics/abap
AutoHotkey
COBOL
No official site? https://en.wikipedia.org/wiki/COBOL
ColdFusion Markup Language (CFML)
https://www.adobe.com/products/coldfusion-family.html
Forth
Logo
https://el.media.mit.edu/logo-foundation/what_is_logo/logo_programming.html
REXX
https://www.ibm.com/docs/en/zos/2.4.0?topic=guide-learning-rexx-language
RPG (IBM)
https://www.ibm.com/docs/en/i/7.3?topic=introduction-overview-rpg-iv-programming-language
Visual Basic/Visual Basic Advanced
rmarkdown https://rmarkdown.rstudio.com/
That just uses the markdown grammar. Same as here.
Squirrel
LilyPond
LilyPond is a plaintext language used for engraving music.
COBOL
No official site? https://en.wikipedia.org/wiki/COBOL
There is TS grammar now:
ConTeXt
ConTeXt is a macro system for TeX, similar to LaTeX.
@amaanq I think your list of languages from Helix misses gotmpl
: https://github.com/helix-editor/helix/tree/master/runtime/queries/gotmpl. The parser is here: https://github.com/dannylongeuay/tree-sitter-go-template. I did try it for a few Go templates, but since my theme, Nord, uses the same color for Normal
and @punctuation.bracket
they don't look distinguishable.
tfvars
can be removed, as it is just HCL but limited to <key> = <value>
only.
Odin
Thanks to @ap29600 for the work.
tree-sitter-odin
FSharp
EDIT: @baronfel 's parser is now archived, points to this one instead Current Parser It doesn't appear that anyone has done any queries Language spec's
I would love to contribute, but frankly all of this is WAAAAY over my head.
any update?
If you need an extra pair of hands, count me in.
there aren't any queries yet, so that would be great if you have any experience writing those :)
Groovy dsl
Not groovy, just a simple one for android project
https://docs.gradle.org/current/userguide/groovy_build_script_primer.html
parse is here: https://github.com/Decodetalkers/tree-sitter-groovyscript
Hope will be of help
update: Now is renamed to tree-sittrr-groovy, now support groovy both
Blade
The syntax highlight :
https://github.com/jwalton512/vim-blade
https://github.com/haringsrob/laravel-dev-tools
Papyrus
Papyrus is an entirely new scripting system created specifically for the Creation Kit.
Official documentation: https://www.creationkit.com/index.php?title=Category:Papyrus
Vim plugin: https://github.com/sirtaj/vim-papyrus
VSCode Extension: https://github.com/joelday/papyrus-lang
Notepad++ syntax: https://www.nexusmods.com/skyrimspecialedition/mods/32375?tab=files
Sublime Text Package: https://github.com/Kapiainen/SublimePapyrus
Plantuml
link: https://github.com/Decodetalkers/tree_sitter_plantuml
it is almost finished. but there is something to improve
Typst
Typst: Typst Docs
Parser: tree-sitter-parser
Grammar can be found in the readme of the parser
Don't know if there's a repository containing queries
EDIT from @theHamsta:
- WIP repo https://github.com/SeniorMars/typst.nvim
- alternative grammar https://github.com/frozolotl/tree-sitter-typst
- Helix issue helix-editor/helix#6688
Puppet
The only treesitter parser available at the moment that I could find:
UPDATE:
Puppet language support was added within nvim-treesitter
: #4715
Formatting and diagnostics have nothing to do with treesitter.
Nextflow
Nextflow is a workflow management system used heavily in bioinformatics, and is an extension of Groovy. A request for Groovy is also in this list of language requests, which includes a parser at Decodetalkers/tree-sitter-groovy.
- VSCode extension for Nextflow
- Vim syntax plugin
nushell
it is already in the list of helix
queries above but now we have nushell/nu-treesitter
and a start on some queries 🥳
i was wondering if it's as simple as putting these queries into queries/nu/
and updating them regularly 😮 😋
Fountain
A screenplay markup-inspired syntax format. See the wikipedia entry for history and the Fountain Project for spec and known implementations.
- syntax spec
- Vim syntax plugin
- BetterFountain: A VSCode syntax and PDF rendering plugin
afterwriting
: An JavaScript CLI PDF rendering engine
I just finished my MATLAB parser. I would like you to consider replacing the existing one, since mine implements more of the grammar (all of it?) and has queries for highlights, folds, tags, context, textobjects and locals. As I say in the README, I work with MATLAB on a daily basis (research) and it's my personal interest to maintain and improve it.
@acristoffers if the new parser is demonstrably better, just open a PR with that information. (This issue is about adding new languages.)