aboutsummaryrefslogtreecommitdiff
path: root/runtime/queries
Commit message (Collapse)AuthorAge
* Add Vlang tree-sitter in the languages.toml (#2526)pancake2022-05-28
| | | | Co-authored-by: pancake <pancake@nopcode.org> Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* update Erlang grammar and queriesMichael Davis2022-05-25
| | | | | | | | | | | | | The update to the grammar itself covers the case where the document is a single expression without a trailing newline such as "min(A, B)". A small change to the parser now parses these expressions correctly which improves the display of the function head in the signature help popup. The update to the queries marks 'andalso', 'orelse', 'not', etc. as `@keyword.operator` which improves the look - it looks odd to see operators that are words highlighted the same as tokens like '->' or '=:='.
* update Gleam grammar and queriesMichael Davis2022-05-25
| | | | | | | | | | | | | | | | | | | | | | | With respect to the queries: The locals scope for functions was not large enough, so a function's parameter could outlive the function body. To fix it, we just widen the scope to the `function` node. See also https://github.com/gleam-lang/tree-sitter-gleam/issues/25 With respect to the parser: An external scanner has been added that fixes the parsing of strings. Previously, a comment inside a string would act like a comment rather than string contents. See also https://github.com/gleam-lang/tree-sitter-gleam/issues/14#issuecomment-1129263640 A new constructor node has been added as well which makes type highlighting more fine grained. See also https://github.com/gleam-lang/tree-sitter-gleam/pull/29
* Add `parameter.around` text object queryAndrey Tkachenko2022-05-25
|
* Basic verilog support (#2552)Andrey Tkachenko2022-05-24
|
* Add Scheme supportBlaž Hrastnik2022-05-21
| | | | Skipped scm for now :/ it overlaps with tree-sitter-tsq
* Python highlight decorator attributePaul Scott2022-05-20
|
* Python highlight keyword argument as parameterPaul Scott2022-05-20
|
* Python handling highlighting parameters with defaultsPaul Scott2022-05-20
|
* Python highlight improvements: type, parameter etcPaul Scott2022-05-20
| | | | | | | | | | | | | * str, list, etc. handled as @function.builtin and @type.builtin * None and non-conforming type indentifiers as @type in type hints * class identifiers treated as @type * @constructor used for constructor definitions and calls rather than as a catch-all for type-like things * Parameters highlighted * self and cls as @variable.builtin * improved decorator highlighting as part of @function Re-ordering of some statements to give more accurate priority.
* Change python highlights.scm to more fully utilize the themes.Zeddicus4142022-05-20
| | | | | | | Create type keywords Allow _CONSTANTS to start with _ Highlight constants before constructors Move some keywords into @keyword.control
* Include macro attributes to impls, structs, enums, functions etc. ↵Andrey Tkachenko2022-05-20
| | | | textobjects (#2494)
* Add tree-sitter ssh client config queries (#2498)midnightexigent2022-05-18
| | | Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* feat(lang): add Meson language support (#2314)unrelentingtech2022-05-11
| | | https://mesonbuild.com/Syntax.html
* fix Markdown list highlighting (#2401)ChrHorn2022-05-07
|
* feat(languages): add odin language (#2399)Robert Walter2022-05-05
|
* feat(languages): git-ignore and git-attributes (#2397)Matthew Toohey2022-05-05
|
* TOML highlight: use variable.other.member instead of string for quoted keys ↵ChrHorn2022-05-05
| | | | (#2391)
* replace constant.number with constant.numeric (#2389)ChrHorn2022-05-04
|
* feat(lang): Cpon lang support (#2355)Fanda Vacek2022-05-01
| | | Co-authored-by: Fanda Vacek <fvacek@elektroline.cz>
* Add Cairo supportBlaž Hrastnik2022-05-01
|
* feat(lang): add devicetree (Flattened Device Tree Source) (#2329)unrelentingtech2022-04-29
|
* feat(lang): Update nickel to include "rec" keyword (#2320)Erin van der Veen2022-04-29
|
* feat(lang): add hare language support (#2289)meak2022-04-26
| | | Co-authored-by: Mehdi Katranji <hello@mek.yt>
* feat(lsp): add vala language support (#2243)ttys32022-04-24
|
* feat(lang): add nushell language support (#2225)Justin Ma2022-04-22
| | | Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* feat(lang): add go.mod and go.work support (#2197)ttys32022-04-20
|
* Add Nickel language (#2173)Erin van der Veen2022-04-20
|
* Fix Golang textobject queries (#2153)Michael Davis2022-04-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * log textobject query construction errors The current behavior is that invalid queries are discarded silently which makes it difficult to debug invalid textobjects (either invalid syntax or an update may have come through that changed the valid set of nodes). * fix golang textobject query `method_spec_list` used to be a named node but was removed (I think for Helix, it was when updated to pull in the support for generics). Instead of a named node for the list of method specs we have a bunch of `method_spec` children nodes now. We can match on the set of them with a `+` wildcard. Example go for this query: type Shape interface { area() float64 perimeter() float64 } Which is parsed as: (source_file (type_declaration (type_spec name: (type_identifier) type: (interface_type (method_spec name: (field_identifier) parameters: (parameter_list) result: (type_identifier)) (method_spec name: (field_identifier) parameters: (parameter_list) result: (type_identifier))))))
* Fixing (in two ways) a small typo (#2156)Ben Lee-Cohen2022-04-18
|
* Ruby TextObjects and more file extensions (#2143)Danillo Melo2022-04-18
|
* Update tree-sitters Erlang and HEEx (#2149)Michael Davis2022-04-17
|
* Add JavaScript control keywords (#2140)Terry Brash2022-04-17
|
* gdscript support (#1985)EmmChriss2022-04-15
|
* feat(languages): SQL (#2097)Jared Ramirez2022-04-14
|
* add tree-sitter-heexMichael Davis2022-04-13
| | | | | | | | | | | | | HEEx is a templating engine on top of Elixir's EEx templating language specific to HTML that is included in Phoenix.LiveView (though I think the plan is to eventually include it in base Phoenix). It's a superset of EEx with some additional features like components and slots. The injections don't work perfectly because the Elixir grammar is newline sensitive (the _terminator rule). See https://github.com/elixir-lang/tree-sitter-elixir/issues/24 for more information.
* add tree-sitter-eexMichael Davis2022-04-13
| | | | | | EEx is an templating language for Elixir. Since the incremental parsing refactor we can used combined injections which allows us to add EEx support.
* remove error highlighting for tree-sitter-elixirMichael Davis2022-04-13
| | | | | | | | | This will become more important with the HEEx grammar being added. Error highlighting with the Elixir grammar is a bit jumpy because in some scenarios, a bit of missing syntax can force tree-sitter to give up on error recovery and mark the entire tree as an error. This ends up looking bad when editing. We don't typically highlight error nodes so I'm inclined to leave it out of the highlights here.
* add tree-sitter-embedded-template (erb & ejs) (#2055)Michael Davis2022-04-09
| | | | | | | | | | After the incremental parsing rewrite for injections (which was released in 22.03 https://helix-editor.com/news/release-22-03-highlights/#incremental-injection-parsing-rewrite), we can now do combined injections which lets us pull in some templating grammars. The most notable of those is embedded-template - a pretty straightforward grammar that covers ERB and EJS. The grammar and highlights queries are shared between the two but they have different injections.
* Add swift language (#2033)Aaron Housh2022-04-08
|
* add languages `r` and `rmarkdown` (#1998)Matthew Toohey2022-04-08
| | | | | | | | | | | * add languages `r` and `rmarkdown` * r: fix highlights * rmarkdown: add eof in queries * rmarkdown: update lang-support.md * r: fix highlight query precedence
* add language `ron` (#1925)VuiMuich2022-04-05
|
* separate JSX queries from javascript (#1921)Michael Davis2022-04-02
| | | | | | | | | | | | | | | It looks like a24fb17b2a978d3165bd6304e9edd69bddb6dd82 (and 855e438f55cb278de8203ac4911561c4c7ad656c) broke the typescript highlights because typescript ; inherits: javascript but it doesn't have those named nodes in its grammar. So instead we can separate out JSX into its own language and copy over everything from javascript and supplement it with the new JSX highlights. Luckily there isn't too much duplication, just the language configuration parts - we can re-use the parser with the languages.toml `grammar` key and most of the queries with `inherits`.
* Update bash tree sitter (#1917)joezak112022-04-01
|
* jsx: Add special highlighting to component namesBlaž Hrastnik2022-04-01
|
* Add JSX highlighting queriesBlaž Hrastnik2022-04-01
|
* Indentation rework (#1562)Triton1712022-03-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * WIP: Rework indentation system * Add ComplexNode for context-aware indentation (including a proof of concept for assignment statements in rust) * Add switch statements to Go indents.toml (fixes the second half of issue #1523) Remove commented-out code * Migrate all existing indentation queries. Add more options to ComplexNode and use them to improve C/C++ indentation. * Add comments & replace Option<Vec<_>> with Vec<_> * Add more detailed documentation for tree-sitter indentation * Improve code style in indent.rs * Use tree-sitter queries for indentation instead of TOML config. Migrate existing indent queries. * Add documentation for the new indent queries. Change xtask docgen to look for indents.scm instead of indents.toml * Improve code style in indent.rs. Fix an issue with the rust indent query. * Move indentation test sources to separate files. Add `#not-kind-eq?`, `#same-line?` and `#not-same-line` custom predicates. Improve the rust and c indent queries. * Fix indent test. Improve rust indent queries. * Move indentation tests to integration test folder. * Improve code style in indent.rs. Reuse tree-sitter cursors for indentation queries. * Migrate HCL indent query * Replace custom loading in indent tests with a designated languages.toml * Update indent query file name for --health command. * Fix single-space formatting in indent queries. * Add explanation for unwrapping. Co-authored-by: Triton171 <triton0171@gmail.com>
* add tree-sitter-gleamMichael Davis2022-03-30
|
* update tree-sitter-elixirMichael Davis2022-03-30
| | | | | | | | | | | | | | | | | | news: - tree-sitter-elixir now powers Elixir syntax highlighting on github.com - GitHub now supports code-navigation for Elixir repos via tree-sitter-elixir changes: - modules now use the `@module` highlight, which was added upstream to tree-sitter - it seems appropriate to use `@namespace` to follow helix convention - added nullary range operator (e.g. `Enum.to_list(..) == []`), a new syntax for elixir 1.14 - a fix for stab clause nodes mis-highlighting when the right hand side of the stab clause contained multiple simple expressions
* update tree-sitter-erlangMichael Davis2022-03-30
| | | | | | | | | changes: - typed fields within records which do not declare a default value are now correctly highlighted as record fields - the EEP49 'maybe' form is now parsed - fixes for highlights for 'begin' and 'after' tokens