nvim-treesitter / nvim-treesitter

Nvim Treesitter configurations and abstraction layer
Apache License 2.0
10.06k stars 855 forks source link

Tracking issue: language support requests #2282

Closed clason closed 6 months ago

clason commented 2 years ago

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:

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.)

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.)

nkrkv commented 2 years ago

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.

I’m the maintainer of the nvim-treesitter-rescript repo, and would kindly apply any necessary changes to be applied for nvim-treesitter upstream.

theHamsta commented 2 years ago

Hi @nkrkv! Do you want to create PR?

nkrkv commented 2 years ago

Sure. What points should this PR affect? I see:

Will it be enough?

clason commented 2 years ago

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.)

dapc11 commented 2 years ago

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.

andykais commented 2 years ago

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?

theHamsta commented 2 years ago

@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

andykais commented 2 years ago

@theHamsta is this sufficient? https://github.com/nvim-treesitter/nvim-treesitter/pull/2511

illotum commented 2 years ago

Jinja

Docs (v3): https://jinja.palletsprojects.com/en/3.1.x/

Implementations (WIP, v2):

Sample Vim plugins (likely v2):

glapa-grossklag commented 2 years ago

Elsa

The syntax specification is a little informal, so let me know if any more information is needed. :)

ajukraine commented 2 years ago

Haxe

tobil4sk commented 2 years ago

Haxe also has a tree-sitter implementation here: https://github.com/vantreeseba/tree-sitter-haxe

WillEhrendreich commented 2 years ago

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.

mosheavni commented 2 years ago

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

nwotero commented 2 years ago

VHDL

https://github.com/alemuller/tree-sitter-vhdl

erfanara commented 2 years ago

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

psliwka commented 2 years ago

Cue

https://github.com/eonpatapon/tree-sitter-cue

bollian commented 2 years ago

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.

Akselmo commented 2 years ago

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: https://github.com/tree-sitter/tree-sitter/pull/1672/commits/38ff9e37fd24402bf2f8f27e9fe64ee7a670d909

That links to this https://github.com/yuja/tree-sitter-qmljs

tomasky commented 2 years ago

Nim lang

Maybe this,no test: https://github.com/haxscramper/tree-sitter-nim Neovim plugin: https://github.com/alaviss/nim.nvim

mirryi commented 2 years ago

ReasonML

max397574 commented 2 years ago

LUAP

Parser for lua patterns. This improved readability of patterns a lot in my opinion. https://github.com/vhyrro/tree-sitter-luap

Decodetalkers commented 2 years ago

Mesonbuild

Parse for mesonbuild I think we need the highlight for meson build also.. https://mesonbuild.com/ No gammer so far

pimvh commented 1 year ago

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.

roomtin commented 1 year ago

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.

grantmacken commented 1 year ago

XQuery

I built, maintain and use this tree-sitter-xquery which can be seen in web tree-sitter playground

ObserverOfTime commented 1 year ago

Stylus

Less

CoffeeScript

LiveScript

qmake

Inno Setup Script

PlantUML

✓ NASM

Crystal

✓ Smali

✓ Groovy

✓ jq

ElDifinitivo commented 1 year ago

Nushell

Plugins for vim are already an https://github.com/nushell/nushell/issues/3728

rosshadden commented 1 year ago

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:

andy2mrqz commented 1 year ago

gitignore

Was looking for this and couldn't find it except in this issue, which referenced a repo with a grammar/some patterns.

theHamsta commented 1 year ago

@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...

theHamsta commented 1 year ago

@ElDifinitivo I Tried to add https://github.com/nushell/nushell.git but it failed to parse a simple test file without errors

enderger commented 1 year ago

@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.

theHamsta commented 1 year ago

@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 commented 1 year ago

@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.

LeviticusNelson commented 1 year ago

Apex https://github.com/forcedotcom/salesforcedx-vscode/blob/develop/packages/salesforcedx-vscode-apex/syntaxes/apex.configuration.json

Decodetalkers commented 1 year ago

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

clason commented 1 year ago

make a PR for it

Popkornium18 commented 1 year ago

awk

Queries and existing parser can be found here: https://github.com/Beaglefoot/tree-sitter-awk

DeadlySquad13 commented 1 year ago

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:

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.

Fildo7525 commented 1 year ago

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

folliehiyuki commented 1 year ago

Dhall

Homepage: https://dhall-lang.org/ Vim syntax plugin: https://github.com/vmchale/dhall-vim

There is no parser nor queries yet AFAIK.

Nargonath commented 1 year ago

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.

danielo515 commented 1 year ago

What is preventing the rescript tree-sitter grammar to be integrated?

clason commented 1 year ago

What is preventing the rescript tree-sitter grammar to be integrated?

Somebody making a PR.

f3fora commented 1 year ago

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

gbprod commented 1 year ago

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 https://github.com/the-mikedavis/tree-sitter-git-commit/issues/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)...

nat-418 commented 1 year ago

Tcl / Tk

clason commented 1 year ago

https://github.com/lewis6991/tree-sitter-tcl

colin-heffernan commented 1 year ago

Yuck

Yuck is used to configure Elkowar's Wacky Widgets (EWW).

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!