aboutsummaryrefslogtreecommitdiffstats
path: root/queries/julia/highlights.scm
Commit message (Collapse)AuthorAgeFilesLines
* feat!: drop modules, general refactor and cleanupChristian Clason2025-05-121-372/+0
|
* fix(julia): fix incorrect documentation queryFredrik Ekre2024-12-051-2/+4
| | | | | | | | | 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.
* fix(julia): fix incorrect documentation queryFredrik Ekre2024-12-041-1/+5
| | | | | | | | | | | | | | 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.
* feat(julia): highlight interpolation operatorFredrik Ekre2024-11-291-0/+9
| | | | | | This patch adds `$` to the `@punctuation.special` capture group within `(string_interpolation)` (e.g. `"hello $name"`) and `(interpolation_expression)` (e.g. `:(hello $name)`) nodes.
* fix(julia): treat :: as operator in type contextsFredrik Ekre2024-11-231-0/+8
| | | | | | | | | | | | 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 `>:`.
* fix(julia): misc fixes to type highlightingFredrik Ekre2024-11-231-1/+10
| | | | | | | | | | | | 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)`.
* fix(julia): fix macro identifier highlight queryFredrik Ekre2024-11-221-1/+3
| | | | | | | 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.
* fix(julia): capture docstrings in more casesFredrik Ekre2024-11-221-0/+2
| | | | | | | | | | | | | | 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 ```
* feat(julia): update parser and queriesChristian Clason2024-11-111-150/+121
|
* feat: more `@keyword.type` capturesRiley Bruins2024-05-011-1/+1
|
* Julia outer keyword (#6461)Sergio A. Vargas2024-04-171-0/+3
|
* fix(julia): adapt queries to grammar changes (#6429)Sergio A. Vargas2024-04-141-49/+13
|
* feat(julia): broadcast pipeChristian Degnbol Madsen2024-03-261-1/+1
| | | | | 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.
* refactor(format): drop extra indentation for fieldPhạm Huy Hoàng2024-03-211-6/+4
|
* feat(highlights)!: keyword `@type.qualifier` → `@keyword.modifier`Jaehwang Jung2024-03-161-1/+1
|
* feat(format-scripts): linewrap predicates再生花2024-02-231-211/+36
| | | "format-ignore".kick()
* chore: query formattingPham Huy Hoang2024-01-191-92/+170
|
* refactor: manual pre-cleanupPham Huy Hoang2024-01-191-210/+211
| | | | | Moving comments, adding `format-ignore` to lines that will be better with it
* feat!: align standard captures with upstreamChristian Clason2024-01-191-27/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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`
* fix(julia): add missing capture of ":" in selected importChristian Degnbol Madsen2024-01-021-0/+2
| | | | If writing a selected import, e.g. `using BSON: @load`, the colon isn't currently captured. This change captures it as `@punctuation.delimiter`.
* fix(julia): pipe function highlight (#5815)Christian Degnbol Madsen2023-12-221-0/+6
| | | | In Julia when piping into a function the function should be highlighted as a function call, and not a variable.
* feat(julia): added missing String and AbstractString builtin types (#5440)Enzo L F2023-09-271-27/+215
| | | | | | | * 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
* fix(julia): fix highlighting `end` keywordLoong2023-09-091-4/+4
|
* feat(julia): spell-check docstringsSergio A. Vargas2023-08-161-1/+1
| | | Enable spell checking of docstrings without markdown injections.
* fix(julia): symbol highlightingSergio Alejandro Vargas2023-07-241-1/+3
| | | | | | | Update the `@symbol` capture to enable highlighting symbols differently from variables. See https://github.com/tree-sitter/tree-sitter-julia/issues/110
* feat(julia): highlight docstrings before short function definitionsLong Wang2023-07-111-0/+1
|
* Update Julia queriesSergio Alejandro Vargas2023-07-081-3/+2
|
* feat(julia): add builtin functions & typesAmaan Qureshi2023-03-101-0/+41
|
* feat(julia): mark begin & end in an index or range expression as ↵Amaan Qureshi2023-03-101-0/+9
| | | | `@variable.builtin`
* fix(julia): refactor some operators and punctuationAmaan Qureshi2023-03-101-16/+21
|
* feat: add `@string.documentation` where applicableAmaan Qureshi2023-03-051-1/+11
|
* feat(julia/highlights): Add `as` keywordSergio Alejandro Vargas2023-02-031-0/+2
|
* julia: add `if_clause` (#4204)Sergio A. Vargas2023-01-231-0/+2
| | | | | * fix(julia/highlights): Add `if_clause` * Update Julia lockfile revision
* julia: update parser and highlights (#4035)Sergio A. Vargas2022-12-271-16/+25
| | | | | | | | | | | | - 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.
* julia: update parser and highlights (#4016)Sergio A. Vargas2022-12-231-7/+3
| | | | - Replace `scoped_identifier` with `field_expression` in function names - Replace true and false with `boolean_literal`
* julia: update queries to parser change (#3956)Sergio A. Vargas2022-12-141-17/+8
|
* highlights: create subscoping for ternary operatorStephan Seitz2022-12-021-1/+1
| | | | | | | | | | 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.
* highlights(julia): use more specific groupsObserverOfTime2022-11-261-7/+13
|
* julia: update queries to parser changeChristian Clason2022-11-121-5/+2
|
* fix: update julia queries to parser changeChristian Clason2022-11-061-1/+1
|
* refactor(highlights/julia): Update definitionsSergio Alejandro Vargas2022-11-021-95/+134
| | | | | | | | | | | | | | | See https://github.com/tree-sitter/tree-sitter-julia/pull/54 Remove a bunch of patterns with `argument_list`. No longer necessary with `short_function_definition`. Other minor changes including: - Add boolean literals See https://github.com/tree-sitter/tree-sitter-julia/pull/44 - Update highlights for operators (for bindings, type operators, etc) - Update lockfile
* fix(julia): remove highlight query for constantsFredrik Ekre2022-10-121-2/+0
| | | | | | | | | This patch removes the highlight query for constant identifiers based on capitalization. This led to inconsistent highlighting since e.g. `AA` would be a regular identifier, but `AAA` a constant. It is indeed true that some constants are uppercase only identifiers, but there are also constants which doesn't follow this pattern. Since there are no rules about this it seems better to not try to guess.
* Split func/method definition from calls in julia highlighting querylfenzo2022-08-031-4/+4
|
* highlights(julia): add "mutable" keywordStephan Seitz2022-07-161-0/+1
|
* feat(highlights/julia): make operators visibleSergio Alejandro Vargas2022-06-011-23/+13
| | | | See tree-sitter/tree-sitter-julia#34
* highlights(julia): Update literalsSergio Alejandro Vargas2022-04-161-25/+33
| | | | | | | | | | | Add queries for: - Character literals - Escape sequences - NaNs, Infs and missing Remove highlight to identifiers in coefficient expressions. Update other literals to match grammar.
* julia: update queries to parser changesChristian Clason2022-04-151-9/+13
|
* feat(highlights/julia): Add missing highlights (#2464)Sergio A. Vargas2022-02-071-7/+13
| | | | | | | | | - Add highlights for: + command strings + abstract type definitions + module `end` delimiters - Distinguish `:` in quotes and ranges (it's already highlighted differently in ternary expressions).
* highlights(julia): add highlight for block commentskoalp2022-01-131-2/+5
|
* Update queriesSantos Gallegos2021-12-221-6/+6
| | | | | - Don't use the old form for predicates - Update some invalid queries