diff options
| author | Fredrik Ekre <ekrefredrik@gmail.com> | 2024-12-04 11:50:49 +0100 |
|---|---|---|
| committer | Christian Clason <ch.clason+github@icloud.com> | 2024-12-04 11:59:55 +0100 |
| commit | b0fc560c758eeaa53b099c0843f82bcd762a9235 (patch) | |
| tree | f62ea2351ddd43225436badf8b12e0e62d1242af /queries/julia | |
| parent | bot(lockfile): update dtd, inko, powershell, xml, yaml (diff) | |
| download | nvim-treesitter-b0fc560c758eeaa53b099c0843f82bcd762a9235.tar nvim-treesitter-b0fc560c758eeaa53b099c0843f82bcd762a9235.tar.gz nvim-treesitter-b0fc560c758eeaa53b099c0843f82bcd762a9235.tar.bz2 nvim-treesitter-b0fc560c758eeaa53b099c0843f82bcd762a9235.tar.lz nvim-treesitter-b0fc560c758eeaa53b099c0843f82bcd762a9235.tar.xz nvim-treesitter-b0fc560c758eeaa53b099c0843f82bcd762a9235.tar.zst nvim-treesitter-b0fc560c758eeaa53b099c0843f82bcd762a9235.zip | |
fix(julia): fix incorrect documentation query
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.
Diffstat (limited to 'queries/julia')
| -rw-r--r-- | queries/julia/highlights.scm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/queries/julia/highlights.scm b/queries/julia/highlights.scm index 1d1191862..876fa72af 100644 --- a/queries/julia/highlights.scm +++ b/queries/julia/highlights.scm @@ -357,9 +357,13 @@ (module_definition) (struct_definition) (call_expression) - (identifier) ]) +(source_file + (string_literal) @string.documentation + . + (identifier)) + [ (line_comment) (block_comment) |
