Commit graph

60 commits

Author SHA1 Message Date
Christian Degnbol Madsen
65ef62092e fix(julia): add missing capture of ":" in selected import
If writing a selected import, e.g. `using BSON: @load`, the colon isn't currently captured.
This change captures it as `@punctuation.delimiter`.
2024-01-02 11:43:08 +01:00
Christian Degnbol Madsen
454c3a9ba8
fix(julia): pipe function highlight (#5815)
In Julia when piping into a function the function should be highlighted as a function call, and not a variable.
2023-12-22 12:24:04 +02:00
Ronan Arraes Jardim Chagas
a741b5dd0d Improve curly expression alignment 2023-10-29 01:37:31 +02:00
Ronan Arraes Jardim Chagas
639c22c52c Improve indentation in Julia language
This commit improves the indentation in the function declaration,
function call, and in the assignment expressions.
2023-10-29 01:37:31 +02:00
Ronan Arraes Jardim Chagas
a07ce2155b
Fix indent. of curly expressions and of ],} in BOL (#5580) 2023-10-27 21:53:58 +09:00
Ronan Arraes Jardim Chagas
1e58a81450
Fix Julia indentation after end and with parenthesis at the beginning of line (#5579) 2023-10-27 12:28:44 +00:00
Enzo L F
a255654459
feat(julia): added missing String and AbstractString builtin types (#5440)
* 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
2023-09-27 11:50:57 +09:00
Loong
b6492f41c4 fix(julia): fix highlighting end keyword 2023-09-09 22:42:53 +02:00
Sergio A. Vargas
3fbf513829
feat(julia): spell-check docstrings
Enable spell checking of docstrings without markdown injections.
2023-08-16 16:30:59 -04:00
Pham Huy Hoang
78b54eb7f6 chore(injections)!: update injection syntax to 0.9
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
2023-08-12 17:34:15 +02:00
Sergio Alejandro Vargas
5be3ddeadd fix(julia): symbol highlighting
Update the `@symbol` capture to enable highlighting symbols
differently from variables.

See https://github.com/tree-sitter/tree-sitter-julia/issues/110
2023-07-24 21:33:47 +02:00
Long Wang
b4b94ec387 feat(julia): highlight docstrings before short function definitions 2023-07-11 21:40:37 +02:00
Sergio Alejandro Vargas
dcf46d07cc Update Julia queries 2023-07-08 11:24:01 +02:00
Amaan Qureshi
85330918f0 perf: remove match where possible 2023-04-21 18:24:17 -04:00
George Harker
cb568af539 use indent.X syntax for captures and properties of set directives
update CONTRIBUTING.md

adjust indents for bass

fix doc capture comment
2023-03-24 13:07:53 -04:00
Amaan Qureshi
1012dd957e feat(julia): add builtin functions & types 2023-03-10 03:38:23 -05:00
Amaan Qureshi
8886384244 feat(julia): mark begin & end in an index or range expression as @variable.builtin 2023-03-10 03:38:23 -05:00
Amaan Qureshi
9c7fa77f14 fix(julia): refactor some operators and punctuation 2023-03-10 03:38:23 -05:00
Amaan Qureshi
95bcd6a8fa feat: add @string.documentation where applicable 2023-03-05 17:15:32 -05:00
Sergio Alejandro Vargas
4301040bbc feat(julia/highlights): Add as keyword 2023-02-03 14:29:30 -08:00
Sergio A. Vargas
4895c2133f
julia: add if_clause (#4204)
* fix(julia/highlights): Add `if_clause`

* Update Julia lockfile revision
2023-01-23 08:14:30 +00:00
Sergio A. Vargas
0cb637ca9f
julia: update parser and highlights (#4035)
- 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.
2022-12-27 10:27:22 +01:00
Sergio A. Vargas
82cff67988
julia: update parser and highlights (#4016)
- Replace `scoped_identifier` with `field_expression` in function names
- Replace true and false with `boolean_literal`
2022-12-23 10:34:24 +01:00
Sergio A. Vargas
d31c71c959
julia: update queries to parser change (#3956) 2022-12-14 09:06:08 +01:00
Christian Clason
360315540c fix(julia): update queries to parser change 2022-12-03 12:00:27 +01:00
Stephan Seitz
d6a2ecb8b7 highlights: create subscoping for ternary operator
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.
2022-12-02 21:42:11 +01:00
ObserverOfTime
e973a5cbb2 injections(julia): add markdown 2022-11-27 17:35:10 +01:00
ObserverOfTime
9018fb26cc injections: add more regex injections 2022-11-27 17:35:10 +01:00
ObserverOfTime
58940a5589 highlights(julia): use more specific groups 2022-11-26 13:17:51 +02:00
Christian Clason
692432df29 julia: update queries to parser change 2022-11-12 11:06:59 +01:00
Christian Clason
f6bc84dabd fix: update julia queries to parser change 2022-11-06 11:12:20 +01:00
Sergio Alejandro Vargas
a4b10b60c1 refactor julia locals 2022-11-02 23:08:11 +01:00
Sergio Alejandro Vargas
27bbb64f87 refactor(highlights/julia): Update definitions
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
2022-11-02 23:08:11 +01:00
Fredrik Ekre
ef05f00814 fix(julia): remove highlight query for constants
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.
2022-10-12 18:17:21 +02:00
lfenzo
140393cfff Split func/method definition from calls in julia highlighting query 2022-08-03 12:05:30 -07:00
Stephan Seitz
aabae39294 highlights(julia): add "mutable" keyword 2022-07-16 13:37:59 +02:00
Sergio Alejandro Vargas
6a4eb4e1c3 feat(highlights/julia): make operators visible
See tree-sitter/tree-sitter-julia#34
2022-06-01 09:26:50 +02:00
Sergio Alejandro Vargas
394e7f8048 highlights(julia): Update literals
Add queries for:
- Character literals
- Escape sequences
- NaNs, Infs and missing

Remove highlight to identifiers in coefficient expressions.

Update other literals to match grammar.
2022-04-16 00:28:00 +02:00
Christian Clason
b2807559e3 julia: update queries to parser changes 2022-04-15 12:15:18 +02:00
Sergio A. Vargas
3914267577
feat(highlights/julia): Add missing highlights (#2464)
- Add highlights for:
    + command strings
    + abstract type definitions
    + module `end` delimiters

- Distinguish `:` in quotes and ranges (it's already highlighted
  differently in ternary expressions).
2022-02-07 22:16:58 +01:00
koalp
c6afb729b9 highlights(julia): add highlight for block comments 2022-01-13 17:56:06 +01:00
Santos Gallegos
56634f49ab Update queries
- Don't use the old form for predicates
- Update some invalid queries
2021-12-22 21:17:28 +01:00
Dundar Göc
6a4fdb317d chore: fix typos 2021-11-02 23:47:48 +01:00
Sergio Alejandro Vargas
f3fab7498f Add exception handling branches 2021-07-07 21:37:18 +02:00
Sergio Alejandro Vargas
a890c81a6b Update Julia fold queries 2021-07-07 21:37:18 +02:00
Sergio Alejandro Vargas
6ec7516d3d Add Julia indent queries 2021-07-07 21:37:18 +02:00
antonk52
90f15d9bf7 feat(keywords) merge return and yield into keyword.return group 2021-07-04 21:49:17 +02:00
antonk52
bd9095e969 feat(keywords) add keyword.return & keyword.yield 2021-07-04 21:49:17 +02:00
Joakker
c699cc2e47 Use #any-of? instead of #match? where posible 2021-06-25 00:22:48 +02:00
Santos Gallegos
c1f61d4ca1
Improve check-queries (#1253)
- Add checks for injections.
- Allow queries that start with [A-Z] for highlights only.
- Don't stop on the first error, finish checking all queries.
2021-05-31 17:03:27 +00:00