| Commit message (Collapse) | Author | Age |
... | |
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A few changes to make TSQ highlights better:
* A parsing error has been fixed in the grammar itself
* Previously tree-sitter-tsq did not parse the variables
in predicates like `(#set! injection.language "javascript")`
* Theme nodes as `tag`
* The newly added node to the parser (from the above fix) is
`variable` which takes over the `variable` capture from nodes
* Highlight known predicates as `function` and unsupported
predicates as `error`
* This may help when translating queries from nvim-treesitter.
For example `#any-of?` is a common one used in nvim-treesitter
queries but not implemented in Helix or tree-sitter-cli.
* Inject tree-sitter-regex into `#match?` predicates
|
| |
|
|
|
|
|
|
|
| |
There's been a lot of complaints about the state of python indentation
and the fallback actually works better until the solution proposed
in https://github.com/helix-editor/helix/issues/763#issuecomment-1137894973=
is implemented.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
You might use a macro like `?MODULE` to name a record:
-record(?MODULE, {a, b, c}).
With this fix, the record fields correctly get `variable.other.member`
highlights.
|
|
|
|
|
|
|
|
|
| |
* branch message with current branch and diverged branch has been
added to the parser
* scissors used in verbose commits are marked as a punctuation
delimiter
* we could use comment instead since they're visually the
same but IMO this works better
|
| |
|
|
|
|
|
|
| |
`module` is undocumented and does not exist in other themes. The
equivalent existing scope based on usage (Elixir for example) is
`namespace`.
|
|
|
|
|
| |
* `/>` as in self-closing tags like `<hr/>`
* `=` as in the separator between attribute name and value `<a href="bar">`
|
|
|
|
|
|
|
| |
Punctuation highlights would show up outside of where they
were valid, for example using parentheses in some text. This
change prevents that by gating the captures to being under
the named nodes in which they are valid.
|
|
|
|
|
|
|
|
|
| |
* add punctuation highlights for commas as in function parameters
* remove stray `variable.parameter` highlight
* I couldn't find any regressions from this and it fixes an
edge case I ran into (but sadly did not record 😓)
* highlight `fn` as `keyword.function`
* the theme docs have `fn` as an example so it seems fitting
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The '#' character may either be interpreted as a map when used
like so:
%% Example 1
#{a => b}
Or as an operator which updates an existing map when the left-hand
side is an expression:
%% Example 2
MyMap#{a => b}
This commit changes the highlight to `punctuation.bracket` when used
as a character in a literal map (example 1) and keeps the `operator`
highlight when used for updating (example 2).
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
Co-authored-by: Mateusz Ledwoń <mateusz.ledwon@iteo.com>
|
| |
|
|
|
| |
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
|
|
|
|
|
|
|
|
|
| |
Closures like
iter.map(|a| a + 1)
Are sort-of functions, so `]f` or `maf` or `mif` can apply to them
as well as named function definitions.
|
| |
|
| |
|
| |
|
|
|
| |
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
* add tree-sitter-edoc
* fix escape character capture in markdown queries
* add field negation operator "!" to tsq highlights
|
|
|
| |
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
|
| |
|
|
|
|
| |
Co-authored-by: pancake <pancake@nopcode.org>
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 '=:='.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
| |
Skipped scm for now :/ it overlaps with tree-sitter-tsq
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
| |
Create type keywords
Allow _CONSTANTS to start with _
Highlight constants before constructors
Move some keywords into @keyword.control
|
|
|
|
| |
textobjects (#2494)
|