Commit Graph

650 Commits

Author SHA1 Message Date
Eloi Torrents
88f2931153
Add tcl highlighting (#9837)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2024-04-04 03:31:00 +02:00
Angus Dippenaar
e0ec34421b
languages: update templ (#10114) 2024-04-03 10:31:44 +09:00
Gaëtan Lehmann
226b2755fb
add earthfile language configuration (#10111) 2024-04-03 10:30:15 +09:00
Manuel Mendez
4b236f30db
Add Buildkite command/commands support to yaml injections (#10090)
* Use any-of instead of match in yaml injections

Go back to original intent when this code was first written now that the
tree-sitter version used supports any-of?.

* yaml/injections: Add injection for Buildkite

Buildkite uses `command` (`commands` is an alias) to define the
command(s) to run for the step.
2024-04-02 02:48:08 +02:00
Daniel S Poulin
1abb64e48d
Add textobject for entries/elements of list-like things (#8150) 2024-03-31 11:53:15 -05:00
Ni
0c3bc46ac4
added ../gleam/injections.scm (#10062)
Co-authored-by: Ni <ni@superboring.net>
2024-03-31 14:48:29 +02:00
Pascal Eberhard
9a80f7203d
add initial support for bitbake language (#10010)
Signed-off-by: Pascal Eberhard <pascal.eberhard@se.com>
2024-03-31 14:16:19 +02:00
Joe
7ec509e2f9
Add injections for GraphQL and ERB in Ruby (#10036) 2024-03-29 10:45:17 +09:00
Vladyslav Karasov
f21efc7a2f
fix: don't highlight colons (:) in comments (#10014) 2024-03-27 14:31:35 +01:00
Novus Nota
2d9e336f64
feat: Add Ohm language support (#9991)
* feat: Add `Ohm` language support

Hope this commit makes it into release :)

* Update runtime/queries/ohm/highlights.scm

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

* chore: final newline

---------

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2024-03-24 23:30:59 +01:00
Michael Davis
f5d95de227 C++: Improve parameter highlighting
This adds parameter highlighting for reference parameters and defaulted
parameters. For example:

```cpp
auto strip_prefix_only(std::string& s,
                       Hidden_Homonym skip_hidden_homonym = {}) const
    -> Affixing_Result<Prefix>;
```

Previously both parameters were only highlighted as variables.
2024-03-22 00:20:29 +09:00
Michael Davis
c099dde2a7 Rust: Highlight extern crate aliases
For example `extern crate alloc as myalloc;`
2024-03-22 00:20:29 +09:00
Michael Davis
9ceeea5a83 Update tree-sitter-gleam and highlights
This contains a few syntax fixes. The highlights have been updated as
well for reserved identifiers and escape sequences
2024-03-22 00:20:29 +09:00
Michael Davis
fdcd461e65 Update tree-sitter-erlang and highlights
A few changes:

* 0-arity type specs like the following previously would not have the
  expected 'variable.parameter' highlighting for the return type:

    -spec foo() -> Value when Value :: term().

* Highlight module, type and function docs as documentation comments
  and inject markdown into them.

* Replace `#match?` predicates with `#any-of?` where possible.

* Remove custom auto-pairs. Now that Erlang uses markdown for
  documentation, the asciidoc-style backtick-singlequote pair is no
  longer useful.
2024-03-22 00:20:29 +09:00
Michael Davis
961025433d Update tree-sitter-git-commit
This commit has partial support for escapes within strings.
2024-03-22 00:20:29 +09:00
Arthur Deierlein
427dd2f383
Add support for ember.js templates (#9902)
* feat: add support for ember .hbs (glimmer) templates

* adjust highlights to helix

* highlight this correctly in block statements

* correctly highlight attributes

* correctly highlight hash_pair

* add newline to highlights.scm

* refactor: use #any-of and #eq instead of #match

* chore: add newline to languages.toml
2024-03-19 17:26:50 +01:00
Arthur Deierlein
4b4947639a
feat: add suport for helm charts (#9900) 2024-03-19 15:07:44 +01:00
Damian Zaręba
485c5cf0b8
Initial Ada language support (after stale) (#9908)
* Adding initial support for ada language, based off #7790 PR from tomekw

* More translation to helix-specific tree-sitter scm labels, add ada gpr switch to ada LSP

* Generate ada in lang-support.md using cargo xtask docgen

* Update tree-sitter definitions according to comments

* Remove .gpr glob from languages.toml

* Fix unit in languages.toml for ada, update locals.scm to helix needs
2024-03-19 13:28:15 +01:00
Arthur Deierlein
0b6dea6dc2
Enhance support for PKGBUILDS (#9909)
* enhance support for PKGBUILDS

* run cargo xtask docgen
2024-03-19 13:27:46 +01:00
Matthew Toohey
2e4653ea31
add koka language support (#8727)
Co-authored-by: Pascal Kuthe <pascal.kuthe@semimod.de>
2024-03-18 13:14:10 +01:00
Phil
94d210c9bf
Add initial support for SuperCollider (#9329) 2024-03-18 13:13:23 +01:00
Michael Davis
4ffe993533 Fix malformed predicates in highlighting queries 2024-03-18 10:34:53 +09:00
Joey Hain
476e6baf8f
Add textobject queries for vala (#8541) 2024-03-18 00:11:28 +01:00
Leonardo Eugênio
d99b6177c2
Add blade support (#9513)
* Add php-only language config and queries

php-only is required enabling php injections like in blade templates

* Add blade templates support
2024-03-18 00:07:09 +01:00
Erasin Wang
64389f97fe
Updated grammar for hurl 4 (#9775) 2024-03-18 00:01:25 +01:00
Benedikt Ritter
f7913c1a3b
Extend groovy support (#9677)
* Extend groovy support

Use more complete parser introduced in nvm-treesitter in
d4dac523d2

* Update runtime/queries/groovy/locals.scm

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

* Drop indent.scm for groovy

It was copied from the tree-sitter repository but is not
compatiblw with the way indent queries are implemented
in Helix.

* Adapt groovy highlights to helix syntax

* Update documentation

---------

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2024-03-18 00:01:11 +01:00
George "Riye" Hollister
e36774c2c8
Add Support for JSONC (#9906)
* Added `jsonc` language with support for comments

The `vscode-json-language-server` accepts `jsonc` as a language id.
Allowing the use of comments within JSON files.

* fix: Update `injdection-rejex` to be unique

* fix: use includes to remove redundant queries

* ci: Generate language-support docs
2024-03-17 23:54:05 +01:00
Arthur Deierlein
9ec0271873
Add support for hyprland config (#9899)
* feat: add hyprland config language

* adjust indents to helix

* adjust highlights to helix
2024-03-17 23:53:30 +01:00
Arthur Deierlein
61f7d9ce2f
fix typo "braket" in jsx highlights (#9910) 2024-03-17 17:36:54 -05:00
Kalpaj Chaudhari
c145999bff
treesitter: Add textobjects for native funcs and constructors (#9806)
This allows native functions and constructors to be accessible as part
of goto_{next,prev}_func.

Change-Id: Ia1234004e8b38e1c5871331a38fcf4f267da935e
2024-03-10 12:23:33 +09:00
Matthew Toohey
e3c6c82828
add linker script language (#9835) 2024-03-09 16:59:56 +09:00
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
2024-03-08 10:54:17 +09:00
Chris
301dfb07cc
Add PowerShell highlighting (#9827) 2024-03-07 23:39:00 +01:00
Michael Davis
d769fadde0
Fix precedence of svelte typescript injection (#9777) 2024-03-02 16:47:24 +09:00
JJ
e51a1e4e2a
Switch Nim tree-sitter queries to alaviss/tree-sitter-nim (#9722) 2024-02-29 10:49:10 +09:00
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>
2024-02-28 20:55:17 +01:00
巢鹏
358ac6bc1f
add fidl support (#9713) 2024-02-27 01:41:50 +01:00
DS/Charlie
ec9efdef3b
Bump tree-sitter-sql (#9634) 2024-02-24 12:28:25 +09:00
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>
2024-02-19 18:37:02 +01:00
Jaakko Paju
ebf155d635
Add textobject queries for HCL (#9658)
* Add textobject queries for HCL

* Add to lang-support.md
2024-02-19 00:46:32 +01:00
Jaakko Paju
2dc9ce68ec
Add textobject queries for Nix (#9659)
* Add textobject queries for Nix

* Add to lang-support.md
2024-02-19 00:46:13 +01:00
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
2024-02-19 00:19:44 +01:00
melted-brownie
78c34194b5
Improve textobjects for parameter/argument for Dart (#9644)
Co-authored-by: Sébastien Blondiau <sebastien.blondiau@iot-d.com>
2024-02-17 17:09:21 +01:00
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
2024-02-17 17:08:44 +01:00
Michael Davis
59369d99e2
Bump tree-sitter-erlang, add *.app.src file-type (#9627) 2024-02-15 01:55:55 +09:00
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>
2024-02-12 16:36:14 +01:00
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>
2024-02-12 02:28:52 +01:00
7ombie
204c3707b0
Updated Swift grammar, adding 'any' and 'await' keywords. (#9586) 2024-02-12 02:17:44 +01:00
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
2024-02-09 11:44:46 +01:00
Tobias Hunger
a1272bdb17
slint: Update treesitter parser and queries (#9551)
* slint: Update treesitter parser and queries

* slint: Port over suggestions from nvim review
2024-02-07 19:36:29 +01:00
Matouš Dzivjak
0975d9c5e7
feat(languages): golang comments and numeric types (#9525) 2024-02-06 09:55:56 +09:00
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
2024-02-04 02:10:20 +01:00
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
2024-02-04 02:09:42 +01:00
Novus Nota
d1054de3ce
feat: Add Tact language support (#9512)
Re-submitting
2024-02-04 02:09:11 +01:00
Devyn Cairns
3f380722fb
Update grammars for Nushell to rev 358c4f50 (#9502) 2024-02-04 02:04:51 +01:00
Matouš Dzivjak
d545452819
feat(queries): regex injection for golang (#9510) 2024-02-04 00:27:40 +01:00
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>
2024-01-28 19:17:46 +09:00
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.
2024-01-28 18:19:25 +09:00
Jaakko Paju
ee68fd09ac
highlight(scala): highlight abstract methods in traits and classes (#9340) 2024-01-28 18:18:35 +09:00
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>
2024-01-28 18:12:07 +09:00
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>
2024-01-25 14:12:17 +09:00
Idobenhamo
299bcce481
Update Typst Tree-Sitter grammar (#9403)
Co-authored-by: Idobenhamo <idobenhamo@users.noreply.github.com>
2024-01-23 18:27:46 +01:00
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>
2024-01-23 18:27:09 +01:00
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'
2024-01-22 19:51:56 +01:00
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.
2024-01-22 19:51:12 +01:00
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
2024-01-15 15:33:26 +09:00
Kirawi
7af78c7788
update comment grammar (#9253) 2024-01-09 09:56:51 +09:00
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); }`
2024-01-08 03:08:41 +01:00
Jaakko Paju
73deba7044
Add textobject queries for Scala (#9191) 2024-01-08 03:05:10 +01:00
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>
2024-01-08 03:04:43 +01:00
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.
2024-01-02 16:38:13 +01:00
Evan Richter
a98b8ddd1a
add smali language support (#9089) 2023-12-20 00:31:27 +01:00
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>
2023-12-16 05:29:26 +01:00
Daniel Ebert
33d85606cf Add alignment indent queries for binary & ternary expressions in C. 2023-12-15 15:59:54 +09:00
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.
2023-12-15 15:59:54 +09:00
Susheel Thapa
23fd145a56
fix: typo in scm files inside runtime/queries/ (#8630) 2023-12-15 15:58:27 +09:00
Phil
b4571c292e
Add initial support for janet-lang (#9081)
* Add initial support for janet-lang

* Use default roots for janet-lang
2023-12-15 15:54:25 +09:00
Frederick Schwalbe
c3cb1795bf
Update gleam grammar and queries (#9003) 2023-12-05 22:54:00 +09:00
Skyler Hawthorne
fcd564fddf
upgrade tree-sitter-python (#8976)
supports new syntaxes from Python 3.12
2023-12-04 17:26:11 +09:00
Tudyx
f8d261cd20
add log tree-sitter (#8916)
* add log tree-sitter

* better highlight queries
2023-11-29 02:42:59 +01:00
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>
2023-11-22 18:27:25 +01:00
Dan Field
b306b25e82
GN language support (#6969)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2023-11-18 17:11:18 +09:00
blinxen
39aa6fa646
Update some grammars to a commit where the license file is included (#8691) 2023-11-18 10:24:59 +09:00
Triton171
cb0bc25a9f
Add indent queries for scheme (and reuse them for common-lisp & racket). (#8720) 2023-11-08 20:53:07 +01:00
Joey Hain
f73e9a8d15
highlights: add type.parameter scope to several more languages (#8718)
* typescript

* go

* haskell

* ocaml

* kotlin (+ bugfix)
2023-11-06 02:54:25 +01:00
postsolar
a98ad137f9
Update PureScript grammar (#8712) 2023-11-05 14:16:25 +01:00
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>
2023-11-03 22:21:54 +01:00
Joey Hain
70bbbd7d19
add highlight scope for type parameters (#8660)
* rust: add highlight scope for type parameters

* handle optional type parameters
2023-11-03 22:21:01 +01:00
RoloEdits
f992c3b597
feat(highlights): add more comment highlights (#8564) 2023-10-27 01:41:09 +02:00
Gabriel Dinner-David
4f1d414d9c
switch to tree-sitter-ron (#8624) 2023-10-27 01:40:16 +02:00
Frans Skarman
9eec9adb8f
Add LPF tree sitter (#8536)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2023-10-27 01:32:49 +02:00
Alexander Brevig
2906660119
Add typst language and lsp (#7474)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2023-10-27 01:27:42 +02:00
Ryan Mehri
c24a67c0e4
Add rust html injection query (#8603) 2023-10-26 11:39:22 +09:00
rsteube
764715a6c0
languages: add templ (#8540) 2023-10-21 14:15:18 +02:00
Ryan Mehri
814cf177d4
bump tree-sitter-haskell and update queries (#8558) 2023-10-17 12:19:57 +02:00
Petr Gajdůšek
9f6e9a1512
Add 'while_statement' to bash indents (#8528) 2023-10-13 17:08:56 +02:00
NomisIV
1ef7f24dae
Update purescript-tree-sitter grammar (#8527) 2023-10-13 17:08:27 +02:00
DS/Charlie
96bbfb7c2e
bump tree-sitter-sql (#8464)
* bump tree-sitter-sql

* update highlights classes to helix flavour

* replace lua-match with match
2023-10-09 17:29:30 +02:00
DS/Charlie
93e54fa0c8
add support for json5 (#8473)
* add json5 language

* docgen
2023-10-07 00:29:42 +02:00
Ben Haines
2776233a6f
update go highlight queries (#8399) 2023-09-26 18:05:42 +02:00