Commit Graph

620 Commits (cfca30887cd4df53af3086c51ab5480cdb3604d5)

Author SHA1 Message Date
Matthew Toohey e3c6c82828
add linker script language (#9835) 8 months ago
Alexander Brevig fd89c3c833
fix: close #9771 fix comments with `(` and `)` (#9800)
* fix: close #9771 update OCaml

* fix: no longer match on ( ) as the underlying grammar handles these

* fix: implement excellent corrections from review

* fix: module -> namespace to match theme scopes
8 months ago
Chris 301dfb07cc
Add PowerShell highlighting (#9827) 8 months ago
Michael Davis d769fadde0
Fix precedence of svelte typescript injection (#9777) 8 months ago
JJ e51a1e4e2a
Switch Nim tree-sitter queries to alaviss/tree-sitter-nim (#9722) 8 months ago
Brian Dorsey f03b91d1b7
update languages.toml: tree-sitter-lua grammar (#9727)
* update languages.toml: tree-sitter-lua grammar

repo has moved, use new URL and the rev of the latest release (v0.0.19)

* update highlight queries

a novice attempt to port query updates from the
source repo to Helix captures and ordering

* Apply suggestions from code review

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>

---------

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
8 months ago
巢鹏 358ac6bc1f
add fidl support (#9713) 9 months ago
DS/Charlie ec9efdef3b
Bump tree-sitter-sql (#9634) 9 months ago
Volodymyr Chernetskyi 990378a46b
Add Groovy grammar (#9350)
* Add Groovy grammar

* Rewrite Neovim captures into Helix for Groovy

* Simplify Groovy injections

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>

* Remove Neovim's spell from Groovy highlights

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>

* Apply suggestions to languages.toml

* Escape backslash in groovy highlights.scm

---------

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
9 months ago
Jaakko Paju ebf155d635
Add textobject queries for HCL (#9658)
* Add textobject queries for HCL

* Add to lang-support.md
9 months ago
Jaakko Paju 2dc9ce68ec
Add textobject queries for Nix (#9659)
* Add textobject queries for Nix

* Add to lang-support.md
9 months ago
Malpha c72426cc87
Add docker-compose language (#9661)
* languages: add docker-compose language

it uses docker-compose-langserver as lsp
And yaml for syntax highlighting, indents and injections

* languages: add luajit as a shebang of lua

This helps to provide syntax highlighting and
other lua goodies when writing luajit

* book(update): run cargo xtask docgen

* since #8006 full filenames uses glob
9 months ago
melted-brownie 78c34194b5
Improve textobjects for parameter/argument for Dart (#9644)
Co-authored-by: Sébastien Blondiau <sebastien.blondiau@iot-d.com>
9 months ago
Vivek Kethineni 3e963b3c1b
Add Rust fields as argument textobject (#9637)
* added field_declaration_list and field_initializer_list as parameter textobjects

* removed field_declaration_listt from textobjects.scm
9 months ago
Michael Davis 59369d99e2
Bump tree-sitter-erlang, add `*.app.src` file-type (#9627) 9 months ago
iko d7c7589fd5
Add Hoon (#9190)
* Added Hoon

* Added highlights.scm

* Updated docs

* Update runtime/queries/hoon/highlights.scm

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>

---------

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
9 months ago
Jimmy Zelinskie d9f7aaacaf
languages: add CEL, SpiceDB schema language (#9296)
* languages: add CEL language and grammar

* languages: add spicedb schema language

* chore: docgen

* runtime/queries: refine spicedb & cel highlights

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>

* languages: update spicedb

---------

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
9 months ago
7ombie 204c3707b0
Updated Swift grammar, adding 'any' and 'await' keywords. (#9586) 9 months ago
Matouš Dzivjak d137a08231
feat(languages): pkl (#9515)
* feat(languages): pkl

Add [pkl](https://github.com/apple/pkl) language.
Official documentation: https://pkl-lang.org/

* remove branch indent
9 months ago
Tobias Hunger a1272bdb17
slint: Update treesitter parser and queries (#9551)
* slint: Update treesitter parser and queries

* slint: Port over suggestions from nvim review
9 months ago
Matouš Dzivjak 0975d9c5e7
feat(languages): golang comments and numeric types (#9525) 9 months ago
zetashift 6e3ed7f0fa
Update Unison tree-sitter grammar for type changes and add indent queries (#9505)
* Update Unison tree-sitter grammar for type changes

* Add indent queries for Unison

* Improve Unison indent queries
9 months ago
Jaakko Paju 75d61d8149
Improve tree-sitter queries for Scala (#9475)
- Simplify function highlighting
- Highlight extension methods
- Textobject query (mia/maa) for class/trait constructor parameters/arguments
- Textobject query (mif/maf) for Scala 3 braceless lambdas
9 months ago
Novus Nota d1054de3ce
feat: Add `Tact` language support (#9512)
Re-submitting
9 months ago
Devyn Cairns 3f380722fb
Update grammars for Nushell to rev 358c4f50 (#9502) 9 months ago
Matouš Dzivjak d545452819
feat(queries): regex injection for golang (#9510) 9 months ago
sogaiu f5b67d9acb
Use janet-simple grammar for Janet (#9247)
* Use janet-simple grammar for Janet

* Update book

* Tweak language name and related

* Rename janet-simple to janet in book

* Remove spurious language section for janet

* Drop quote_lit and qq_lit related highlighting

---------

Co-authored-by: sogaiu <983021772@users.noreply.github.com>
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
10 months ago
Ryan Roden-Corrent fe44391016
Add argument to textobject in gdscript. (#9288)
Currently `maa` only selects parameters in a function definition.
Allow it to also select arguments inside a function call.
10 months ago
Jaakko Paju ee68fd09ac
highlight(scala): highlight abstract methods in traits and classes (#9340) 10 months ago
Jaakko Paju 9978d421fe
Include interpolated SQL strings in Scala injection queries (#9428)
* Change Scala injection queries to include SQL strings

* Include block comments in comment injection

* Change #match predicate to #any-of

Co-authored-by: Kirawi <67773714+kirawi@users.noreply.github.com>

---------

Co-authored-by: Kirawi <67773714+kirawi@users.noreply.github.com>
10 months ago
blinxen 2661e05b34
Update some grammars to a commit where the license file is included (#9279)
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
10 months ago
Idobenhamo 299bcce481
Update Typst Tree-Sitter grammar (#9403)
Co-authored-by: Idobenhamo <idobenhamo@users.noreply.github.com>
10 months ago
melted-brownie 2058b3732c
Add text object queries for dart (#9411)
* Add text object queries for dart

* Update runtime/queries/dart/textobjects.scm

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>

* Clean up internal capture name

---------

Co-authored-by: Sébastien Blondiau <sebastien.blondiau@iot-d.com>
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
10 months ago
Jaakko Paju 9ed3dc52e0
Update Scala tree-sitter grammar (#9348)
* Update Scala tree-sitter grammar

* Support block comments

Modify comment handling in textobjects and highlights to support new TS-scala node type 'block_comment'
10 months ago
woojiq 52a43bcdfc
bash, make, css: highlight and indent queries improvement (#9393)
* highlights(bash): rework keywords section

* Use more specified scope when possible for keywords like @keyword.repeat.
* Add more keywords like "local" or "unsetenv".

Limitation:
* Bash doesn't allow you to have a local variable outside of a function, so maybe we need to have better queries to not highlight the local in this case.
* If we name a function with a keyword (such as unset or local), it will use the highlight scope "keyword" instead of "function".

* indents(css, make): add basic queries

* Despite the fact that queries look simple, they improve indentation in some edge cases that helix couldn't handle correctly by default.
10 months ago
Michael Davis 3011df4f35
Bump tree-sitter to latest master (#9317)
* query capture names now return `&str`s rather than `String`s
* the `#any-of?` predicate is now supported
10 months ago
Kirawi 7af78c7788
update comment grammar (#9253) 10 months ago
Ryan Roden-Corrent c8e58304bf
Add textobject queries for protobuf grammar. (#9184)
Given `message Foo {string s = 1;}`
- `mat` selects `message Foo {string s = 1}`
- `mit` selects `{string s = 1;}`

Given `service SearchService { rpc Search(Req) returns (Resp); }
- `mit` or `mat` selects `Req` or `Resp`
- `mif` or `maf` selects `rpc Search(Req) returns (Resp);`
- `mit` selects { rpc Search(Req) returns (Resp); }`
- `mat` selects `service SearchService { rpc Search(Req) returns (Resp); }`
10 months ago
Jaakko Paju 73deba7044
Add textobject queries for Scala (#9191) 10 months ago
Jaakko Paju a32d537d0a
Add HOCON language support (#9203)
* Add HOCON language support

* Remove error query

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>

* Change include query

* Fix query error

---------

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
10 months ago
Rose Hudson a680b2e409
rust highlights: clean up constructor logic (#8957)
Enum variants and (tuple) structs are indistinguishable in general, so we
mark any PascalCase pattern or expression as a "constructor", which
covers all three.
10 months ago
Evan Richter a98b8ddd1a
add smali language support (#9089) 11 months ago
JJ c56cd6ee8b
Add support for Agda (#8285)
* agda language support (wip)

* improve highlights

* disable agda-language-server

* minor addendum to documentation

* cargo xtask docgen

* oh i can just do this neat

* minor comment cleanup

* upstream updated

* imports: missed a spot

---------

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
11 months ago
Daniel Ebert 33d85606cf Add alignment indent queries for binary & ternary expressions in C. 11 months ago
Daniel Ebert 3e79a35656 Align arguments in a function call in C.
Since the tree-sitter grammar is not very good
at parsing function calls while they're being written,
this is not yet super useful.
However, it prevents the new `hybrid` indent heuristic
from choosing these lines as a baseline, making it
more robust.
11 months ago
Susheel Thapa 23fd145a56
fix: typo in scm files inside runtime/queries/ (#8630) 11 months ago
Phil b4571c292e
Add initial support for janet-lang (#9081)
* Add initial support for janet-lang

* Use default roots for janet-lang
11 months ago
Frederick Schwalbe c3cb1795bf
Update gleam grammar and queries (#9003) 11 months ago
Skyler Hawthorne fcd564fddf
upgrade tree-sitter-python (#8976)
supports new syntaxes from Python 3.12
11 months ago
Tudyx f8d261cd20
add log tree-sitter (#8916)
* add log tree-sitter

* better highlight queries
12 months ago
ghashy ff095ebd9b
DBML Language support (#8860)
* DBML language support

* DBML language support, highlights.scm added

* DBML support

* Update runtime/queries/dbml/highlights.scm

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>

* Update runtime/queries/dbml/highlights.scm

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>

* Update runtime/queries/dbml/highlights.scm

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>

* remove unnecessary block highlight

* remove unnecessary line

* remove index_block query

---------

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
12 months ago
Dan Field b306b25e82
GN language support (#6969)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
12 months ago
blinxen 39aa6fa646
Update some grammars to a commit where the license file is included (#8691) 12 months ago
Triton171 cb0bc25a9f
Add indent queries for scheme (and reuse them for common-lisp & racket). (#8720) 1 year ago
Joey Hain f73e9a8d15
highlights: add type.parameter scope to several more languages (#8718)
* typescript

* go

* haskell

* ocaml

* kotlin (+ bugfix)
1 year ago
postsolar a98ad137f9
Update PureScript grammar (#8712) 1 year ago
cgahr 5c325fe342
replace kdl tree-sitter to fix highlighting (#8652)
* replace kdl tree-sitter

* kdl: adopt highlights for new tree-sitter

* kdl: add indent queries

* kdl: add textobjects

* kdl: improve syntax highlighting

* kdl: update lang-support

* kdl: make indents more concise

---------

Co-authored-by: Constantin Gahr <constantin.gahr@ipp.mpg.de>
1 year ago
Joey Hain 70bbbd7d19
add highlight scope for type parameters (#8660)
* rust: add highlight scope for type parameters

* handle optional type parameters
1 year ago
RoloEdits f992c3b597
feat(highlights): add more comment highlights (#8564) 1 year ago
Gabriel Dinner-David 4f1d414d9c
switch to tree-sitter-ron (#8624) 1 year ago
Frans Skarman 9eec9adb8f
Add LPF tree sitter (#8536)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
1 year ago
Alexander Brevig 2906660119
Add typst language and lsp (#7474)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
1 year ago
Ryan Mehri c24a67c0e4
Add rust html injection query (#8603) 1 year ago
rsteube 764715a6c0
languages: add templ (#8540) 1 year ago
Ryan Mehri 814cf177d4
bump tree-sitter-haskell and update queries (#8558) 1 year ago
Petr Gajdůšek 9f6e9a1512
Add 'while_statement' to bash indents (#8528) 1 year ago
NomisIV 1ef7f24dae
Update purescript-tree-sitter grammar (#8527) 1 year ago
DS/Charlie 96bbfb7c2e
bump tree-sitter-sql (#8464)
* bump tree-sitter-sql

* update highlights classes to helix flavour

* replace lua-match with match
1 year ago
DS/Charlie 93e54fa0c8
add support for json5 (#8473)
* add json5 language

* docgen
1 year ago
Ben Haines 2776233a6f
update go highlight queries (#8399) 1 year ago
postsolar 651fd1ca72
Add Unicode support to PureScript's highlight queries (#8338) 1 year ago
zetashift 7fa5f341e9
Update Unison highlights (#8315) 1 year ago
NomisIV cb39242783
Use Maskhjarnas tree-sitter-purescript (#8306) 1 year ago
pacien 37e48f4307 queries/nix: align match start for language comments
This rule failed to override other ones because it started its
matching later.
1 year ago
pacien b4494e1dc5 queries/nix: add injection rule for python test scripts 1 year ago
Cyrill Schenkel 941dc6c614
add GNU assembler (gas) support #8291) 1 year ago
Blaž Hrastnik ef23847957
scheme: Highlight abbreviations 1 year ago
Galen Abell acef759a5e
Add additional YAML injections (#8217) 1 year ago
Jesse Luehrs 81d6d3ff0e
re-add indent and textobject queries for perl (#7947)
* bump tree-sitter-perl version

need some grammar tweaks for the indent queries to function properly

* add indent queries for perl

* add textobject queries for perl
1 year ago
Ivan Molodetskikh 9d7f66574d
Update tree-sitter-blueprint (#8161) 1 year ago
Sol Fisher Romanoff aeaeb09f48
add gemini language support (#8070) 1 year ago
arslee07 75c5a33028
Highlight Dart 3 `sealed` and `base` keywords (#7974) 1 year ago
kaashyapan 75342968e2
update fsharp tree-sitter (#8024) 1 year ago
Tomas Sandven 18a79aa3bf
Update tree-sitter-robot (#7970)
* Update tree-sitter-robot

* Update Robot highlights query for Helix

* Change @comment.single to @comment

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>

---------

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
1 year ago
Pham Huy Hoang 56ccaedffb
markdown.inline: Add `injection.combined` to html tag (#7960)
Problem: Closing tags for markdown is sometimes not highlighted
Solution: Add `injection.combined` to create a valid syntax tree for
highlighting
1 year ago
sigmaSd cbfe8eef89
add strace highlighting (#7928)
* feat: add strace tree sitter

* f
1 year ago
Jesse Luehrs d56638ba9a fix formatting in the rust textobject query file
looks like two lines were unintentionally joined - it doesn't appear to
affect the functionality, but it's confusing to read
1 year ago
Erasin Wang 19dff5c3a4
Update slint grammar (#7893) 1 year ago
Jesse Luehrs 2caca1c4e9
Add pod highlighting (#7907) 1 year ago
Daniel Ebert 36a59e4482 Improve C, Rust & Python indent queries & add @align captures. 1 year ago
Skyler Hawthorne 7078e84007 Fix YAML auto indent
YAML indents queries are tweaked to fix auto indent behavior.

A new capture type `indent.always` is introduced to address use cases
where combining indent captures on a single line is desired.

Fixes #6661
1 year ago
Ivan Isekeev 57f093d836
Jinja language family syntax support (#7233)
* feat: add jinja language support

* feat: add nunjucks language support

* feat: add to lang support book jinja and nunjucks languages
1 year ago
Jan9103 c0eae84073
feat: add todo.txt tree-sitter (#7835) 1 year ago
Artemiy 1077630834
Update tree-sitter grammar for nu (#7873)
* Update tree-sitter grammar for nu

Change tree-sitter grammar for nushell to 'officially' maintained
by nushell project https://github.com/nushell/tree-sitter-nu. Update
to the latest version. Replace queries with supported

* Restore injection queries for nu

Restore injection.scm queries for nushell tree-sitter grammar
1 year ago
zetashift 294aa669a2
Add Unison support (#7724) 1 year ago
woojiq 7cda5b8592
build(tree-sitter): update javascript, typescript and tsx (#7852)
* build(tree-sitter): update javascript, typescript and tsx

* update revision of tree-sitter parsers for these languages.
* rename `?.` to `optional_chain`, introduced in tree-sitter/tree-sitter-javascript@186f2adbf7.

* fix(highlight): change jsx queries to match latest tree-sitter

Latest tree-sitter/tree-sitter-javascript@bb1f97b643 added some breaking changes that broke highlighting.
* Remove some queries with `nested_identifier`.
* Remove deprecated `jsx_fragment` from indent query.
* Count `</` and `/>` as a single token.
1 year ago
Petr Gajdůšek 7af37bb3b9
Add tree-sitter textobjects queries for bash (#7764)
This implements function, (calling) argument and comment captures for use
in the textobject selections in bash.

This also updates the generated docs after adding the textobjects for bash.
1 year ago
woojiq 1d189820a1
feat(indent): add basic java indentation queries (#7844) 1 year ago
Jummit f19793c2f8
Improve wren support (#7819) 1 year ago
Christoph Sax 5a51036bc1
Update t32 language queries to version 2.2.1 (#7811)
Version 2.2.1 of the grammar adds extended support for HLL (C, C++,..)
expressions. Quite a few node types were added, renamed or removed in
the process.

This change brings the highlight queries in sync with the ones found in
the repository of the grammar. The highlighting tests "look" okay after
updating the queries.

Recently, Codeberg had some reliability issues. That is why the language
is now using the mirror repository on GitLab as source instead.

Co-authored-by: Christoph Sax <christoph.sax@mailbox.org>
1 year ago