| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
This patch fixes an inprecise `@string.documentation` query introduced
in https://github.com/nvim-treesitter/nvim-treesitter/pull/7391. The
pattern `(string_literal) . (call_expression)` matches also for example
`"hello"` in `foo("hello", bar())`. Similarly to
https://github.com/nvim-treesitter/nvim-treesitter/pull/7436, this patch
limits the pattern to top-level statements.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes an inprecise `@string.documentation` query introduced
in https://github.com/nvim-treesitter/nvim-treesitter/pull/7391.
Specifically, the pattern `(string_literal) . (identifier)` matches also
for example `"hello"` in
```julia
foo("hello", world)
@info "hello" world
```
To fix this, this patch limits the pattern to top-level statements.
|
| |
|
|
|
|
| |
This patch adds `$` to the `@punctuation.special` capture group within
`(string_interpolation)` (e.g. `"hello $name"`) and
`(interpolation_expression)` (e.g. `:(hello $name)`) nodes.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This patch captures `::` as `@operator` within
`(unary_typed_expression)` and `(typed_expression)`. These should be the
only two cases that the parser can emit when encountering `::` in the
source, but as a fallback it is still captured as `@punctuation` in all
other cases.
The reasons for capturing `::` as an operator are i) the close relation
with the other type-operators `<:` and `>:` and ii) the fact that it is
treated as an operator by the Julia parser, just like `<:` and `>:`.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes two issues related to `@type` capturing (split out from
https://github.com/nvim-treesitter/nvim-treesitter/pull/7392):
- Capture the RHS of `<:` and `>:` as `@type` in `(unary_expression)`s
similarly to what is already done for `(binary_expression)`s with
these operators.
- Capture children of `(curly_expression)`s inside of
`(where_expression)`s as `@type` similarly how they are handled in
`(parametrized_type_expression)`.
|
| |
|
|
|
|
|
| |
This fixes the macro identifier highlight query after the breaking
changes in https://github.com/tree-sitter/tree-sitter-julia/pull/153.
See also
https://github.com/tree-sitter/tree-sitter-julia/pull/158/commits/9f2fb3b9a8c73ef0d2ec005c97f91274b492d48d.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch enables `@string.documentation` capturing, and markdown
injection, for strings attached to `(call_expression)` and
`(identifier)` nodes. For example
```julia
"docs"
foo(::Int, ::Float64)
"docs"
bar
```
|
| |
|
|
|
|
|
|
| |
This patch fixes the julia `(string_literal)` injection queries after
the breaking changes in
https://github.com/tree-sitter/tree-sitter-julia/pull/153. The queries
are simplified by the fact that string content is now directly available
as a separate `(content)` child node.
|
| | |
|
| |
|
|
| |
Inject markdown in macro definition docstrings.
|
| |
|
|
| |
prefixed_string_literals
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
Add support for capturing function call after a broadcasted pipe.
Currently works for unbroadcasted pipe.
There might be a better more complicated way to do this, since this will capture the broadcasting dot as part of the `@_pipe` capture.
|
| | |
|
| | |
|
| |
|
| |
"format-ignore".kick()
|
| | |
|
| |
|
|
|
| |
Moving comments, adding `format-ignore` to lines that will be better
with it
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Sharing highlight queries with upstream tree-sitter and
Helix is difficult.
Solution: Where reasonable, use capture names in tree-sitter's standard
list or Helix's Atom-style hierarchy.
Specifically:
* tree-sitter "standard capture names"
(https://github.com/tree-sitter/tree-sitter/blob/3f44b896852eb7daaa6df4fb778c9bb52c70c815/highlight/src/lib.rs#L20-L72):
- `@parameter` -> `@variable.parameter`
- `@field` -> `@variable.member`
- `@namespace` -> `@module`
- `@float` -> `@number.float`
- `@symbol` -> `@string.special.symbol`
- `@string.regex` -> `@string.regexp`
- `@text.*` -> `@markup.*` (`strong`, `italic`, `link`, `strikethrough`; with exceptions; see below)
- `@text.title` -> `@markup.heading`
- `@text.literal` -> `@markup.raw`
- `@text.reference` -> `@markup.link`
- `@text.uri` -> `@markup.link.url` (in markup links)
- `@string.special` -> `@markup.link.label` (non-url links)
- `@punctuation.special` -> `@markup.list` (markdown lists only; move subitems from `@text.todo`)
* Helix captures
(https://docs.helix-editor.com/master/themes.html#syntax-highlighting):
- `@method` -> `@function.method`
- `@method.call` -> `@function.method.call`
- `@text.{todo,warning,note,danger}` -> `@comment.{error,warning,hint,info,todo}`
- `@text.diff.{add,delete,}` -> `@diff.{plus,minus,delta}`
- `@text.uri` -> `@string.special.url` (outside markup)
- `@preproc` -> `@keyword.directive`
- `@define` -> `@keyword.directive`(`.define`?)
- `@storageclass` -> `@keyword.storage`
- `@conditional` -> `@keyword.conditional`
- `@debug` -> `@keyword.debug`
- `@exception` -> `@keyword.exception`
- `@include` -> `@keyword.import`
- `@repeat` -> `@keyword.repeat`
* cleanup
- remove some redundant `@conceal` (but still allow it for conceal-only patterns)
- remove obsolete `@error` (syntax linting is out of scope for this repo)
- sort, cleanup capture list in `CONTRIBUTING.md`
|
| | |
|
| |
|
|
| |
If writing a selected import, e.g. `using BSON: @load`, the colon isn't currently captured.
This change captures it as `@punctuation.delimiter`.
|
| |
|
|
| |
In Julia when piping into a function the function should be highlighted as a function call, and not a variable.
|
| | |
|
| |
|
|
|
| |
This commit improves the indentation in the function declaration,
function call, and in the assignment expressions.
|
| | |
|
| |
|
|
| |
line (#5579)
|
| |
|
|
|
|
|
| |
* feat(julia): added missing String and AbstractString builtin types
* feat(juia): added all public built-in types in Core and Base
* feat(julia): removed private types from built-in type list
|
| | |
|
| |
|
| |
Enable spell checking of docstrings without markdown injections.
|
| |
|
|
|
|
|
|
|
| |
Since 0.9, @lang syntax is still available as fallback but will soon be deprecated.
Because of that, new syntax should be adopted once 0.9 becomes the
baseline requirements for nvim-treesitter
- update health check
- update doc
|
| |
|
|
|
|
|
| |
Update the `@symbol` capture to enable highlighting symbols
differently from variables.
See https://github.com/tree-sitter/tree-sitter-julia/issues/110
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
update CONTRIBUTING.md
adjust indents for bass
fix doc capture comment
|
| | |
|
| |
|
|
| |
`@variable.builtin`
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
* fix(julia/highlights): Add `if_clause`
* Update Julia lockfile revision
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- Update patterns for type definitions:
The grammar was updated to parse `abstract type` and `primitive type`
as a single token.
- Update @symbol capture to highlight quoted operators as symbols.
- Add pattern to highlight adjoint operator.
- Update patterns and captures for:
- "keyword" operators (in, isa, where)
- type operators (<:, >:)
- Parametrized types.
|
| |
|
|
| |
- Replace `scoped_identifier` with `field_expression` in function names
- Replace true and false with `boolean_literal`
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
After https://github.com/nvim-treesitter/nvim-treesitter/issues/470,
we decided to use `@conditional` for ternary operator instead of
operator despite `@conditional` is documented for keywords only.
A sub-scoping can make it easier for people to highlight this operator
group differently.
Also unify the usage of `@conditional...` across languages.
|
| | |
|
| | |
|