Skip to content

Investigate existing tree-sitter grammars #207416

Closed
@alexr00

Description

@alexr00

Currently, we use textmate grammars for syntax highlighting. We get these grammars from other OSS projects, which let's us avoid becoming experts in every programming language that we support. Many of these OSS projects are no longer supported though, and we've had to take ownership of at least one of the grammars (css).

Tree-sitter appears to be popular right now for syntax highlight grammars, but before we consider adding support for tree-sitter grammars in VS Code, we should understand what grammars already have good tree-sitter support. In particular, the following textmate grammars have reached a dead-end and are particularly important to have support for in whatever syntax highlighting solution we support next:

Key:
✅ repo is very active
⚠️ limited repo activity
❌ no repo or no activity

  • HTML ✅
  • YAML ⚠️
  • XML ✅, but unclear how much use the grammar gets
  • Groovy ✅, but unclear how much use the grammar gets
  • Ini ⚠️
  • SCSS ❌
  • Perl ✅
All other textmate languages

Summary:

10 will be more supported
5 will be less supported
5 will be equivalently unsupported

Language Textmate maintained? Tree-sitter maintained?
bat
clojure https://github.com/sogaiu/tree-sitter-clojure
coffeescript
cpp ❌ license changed https://github.com/tree-sitter/tree-sitter-cpp
csharp https://github.com/tree-sitter/tree-sitter-c-sharp
css ⚠️ we maintain https://github.com/tree-sitter/tree-sitter-css
dart https://github.com/UserNobody14/tree-sitter-dart
diff https://github.com/the-mikedavis/tree-sitter-diff
docker https://github.com/camdencheek/tree-sitter-dockerfile
fsharp ⚠️ https://github.com/Nsidorenco/tree-sitter-fsharp
git https://github.com/gbprod/tree-sitter-gitcommit
go https://github.com/tree-sitter/tree-sitter-go
handlebars ⚠️ unclear if maintained
hlsl ⚠️ unmaintained, 0 issues https://github.com/tree-sitter-grammars/tree-sitter-hlsl
java https://github.com/tree-sitter/tree-sitter-java
javascript https://github.com/tree-sitter/tree-sitter-javascript
json https://github.com/tree-sitter/tree-sitter-json
julia https://github.com/tree-sitter/tree-sitter-julia
latex https://github.com/latex-lsp/tree-sitter-latex
less
log
lua https://github.com/tree-sitter-grammars/tree-sitter-lua
make ⚠️ ⚠️ https://github.com/tree-sitter-grammars/tree-sitter-make
markdown https://github.com/tree-sitter-grammars/tree-sitter-markdown
objective c ⚠️ ⚠️ https://github.com/tree-sitter-grammars/tree-sitter-objc
perl https://github.com/tree-sitter-perl/tree-sitter-perl
php ⚠️ https://github.com/tree-sitter/tree-sitter-php
powershell
pug https://github.com/zealot128/tree-sitter-pug
python https://github.com/tree-sitter/tree-sitter-python
razor
ruby https://github.com/tree-sitter/tree-sitter-ruby
rust https://github.com/tree-sitter/tree-sitter-rust
shellscript https://github.com/tree-sitter/tree-sitter-bash
sql https://github.com/derekstride/tree-sitter-sql
swift https://github.com/alex-pinkus/tree-sitter-swift
typscript https://github.com/tree-sitter/tree-sitter-typescript
vb

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions