aboutsummaryrefslogtreecommitdiffstats
path: root/queries/julia
Commit message (Collapse)AuthorAgeFilesLines
* 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-222-0/+4
| | | | | | | | | | | | | | 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 ```
* fix(julia): fix injection queriesFredrik Ekre2024-11-221-16/+16
| | | | | | | | 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.
* feat(julia): update parser and queriesChristian Clason2024-11-112-163/+143
|
* fix(julia): macro definition docstringsSergio Alejandro Vargas2024-08-071-0/+1
| | | | Inject markdown in macro definition docstrings.
* feat(julia): Add syntax highlighting for markdown and bash ↵Dheepak Krishnamurthy2024-07-241-0/+13
| | | | prefixed_string_literals
* 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-144-79/+21
|
* 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-195-132/+207
|
* refactor: manual pre-cleanupPham Huy Hoang2024-01-192-211/+213
| | | | | 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`
* feat(locals)!: switch to upstream capturesChristian Clason2024-01-191-21/+21
|
* 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.
* Improve curly expression alignmentRonan Arraes Jardim Chagas2023-10-291-1/+4
|
* Improve indentation in Julia languageRonan Arraes Jardim Chagas2023-10-291-1/+8
| | | | | This commit improves the indentation in the function declaration, function call, and in the assignment expressions.
* Fix indent. of curly expressions and of ],} in BOL (#5580)Ronan Arraes Jardim Chagas2023-10-271-0/+5
|
* Fix Julia indentation after end and with parenthesis at the beginning of ↵Ronan Arraes Jardim Chagas2023-10-271-2/+4
| | | | line (#5579)
* 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.
* chore(injections)!: update injection syntax to 0.9Pham Huy Hoang2023-08-121-7/+10
| | | | | | | | | 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
* 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-112-0/+2
|
* Update Julia queriesSergio Alejandro Vargas2023-07-082-4/+3
|
* perf: remove match where possibleAmaan Qureshi2023-04-211-1/+1
|
* use indent.X syntax for captures and properties of set directivesGeorge Harker2023-03-241-3/+3
| | | | | | | | update CONTRIBUTING.md adjust indents for bass fix doc capture comment
* 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-143-20/+21
|
* fix(julia): update queries to parser changeChristian Clason2022-12-032-5/+6
|
* 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.
* injections(julia): add markdownObserverOfTime2022-11-271-3/+3
|
* injections: add more regex injectionsObserverOfTime2022-11-271-0/+5
|