Commit graph

61 commits

Author SHA1 Message Date
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
Daniel Woznicki
7947a2ccf1
fix: Java indent for multiple line arguments (#4449)
* fix Java indent for multiple line arguments, fixes #4448, add an additional test for methods with arguments on multiple lines

* Satisfy StyLua check

---------

Co-authored-by: Daniel Woznicki <danwoz@nettoolkit.com>
2023-03-06 18:10:31 -05:00
Amaan Qureshi
5a87bc98da feat: add @comment.documentation where applicable 2023-03-05 17:15:32 -05:00
Amaan Qureshi
f8595b13bf feat(java): some instances of definition.var should be definition.parameter 2023-02-23 15:41:26 -08:00
Amaan Qureshi
7dfaa60a85 feat(java): distinguish escape sequences, move certain keywords to more appropriate places 2023-02-23 15:41:26 -08:00
Josef Litoš
a75aded7ae highlights(java): fix '!',param,global group 2022-12-19 00:03:18 +02: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
d0b9afe9f6 highlights(java): use more specific groups 2022-11-26 13:17:51 +02:00
Lewis Russell
37398c7d68 feat(spell): support more languages 2022-09-26 13:47:12 +01:00
Stephan Seitz
a59e6e0ef0 highlights(java): add "non-sealed" keyword 2022-08-23 22:20:46 -07:00
anthony-S93
bc9792298c Modified queries/java/highlights.scm 2022-08-22 07:40:51 -07:00
lfenzo
c784720917 Split func/method definition from calls in several programming language queries 2022-08-03 12:05:30 -07:00
Stephan Seitz
4542402e34 highlights(java): add support for text_blocks 2022-04-16 23:23:19 +02:00
Daniel Woznicki
e1f8a8a6f8 Fixed incorrect Java indentation for method chaining 2022-04-04 06:58:26 +02:00
Daniel Woznicki
3d6f2637a2 Made block comment indent @auto so that new lines line up nicely with existing comment block
Previous indentation:
    /**
    *
    */

    New indentation:
    /**
     *
     */
2022-03-01 21:12:14 +01:00
Daniel Woznicki
d71da4f63e Added catchall (ERROR) @auto rule for Java to at least attempt something reasonable when the tree is in a broken state 2022-03-01 21:12:14 +01:00
Daniel Woznicki
e23f5d48be Modified Java indent rules to stop ignoring block comments because javadoc blocks were defaulting to indent 0 2022-03-01 21:12:14 +01:00
Daniel Woznicki
bf2493f5e1 Added fix for Java interfaces not being indented properly 2022-03-01 21:12:14 +01:00
Daniel Woznicki
18c558fd92 Fixed a bug where indentation was not correct for class/enum bodies that had an annotation 2022-02-25 08:03:43 +01:00
Daniel Woznicki
1b47af43ce Fixed a bug where Java enum body indentation was not correct
Added test for Java enum indentation
2022-02-25 08:03:43 +01:00
Daniel Woznicki
b425a9c813 Added fix for incorrect Java indentation after a closing "}" in a method declaration
Added tests for Java indentation, including one for issue 2571
2022-02-25 00:58:59 +01:00
captainko
b42de97339 feat(java)(highlights): add missing highlights for @type 2022-01-18 21:59:36 +01:00
Stephan Seitz
152af07ecf highlights/injections/indents(java): comment -> line_comment,block_comment
Ref https://github.com/tree-sitter/tree-sitter-java/pull/93
2022-01-16 14:24:20 +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
Lewis Russell
011ac894ec Prefer lua-match over match
as string.find is much quicker than vim.regex:match*
2021-11-23 10:02:06 +01: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
Santos Gallegos
67f0857015 Revert "Comment: use @combined to create just one tree per buffer (#1252)"
This reverts commit 4a7a713c52.
2021-05-07 16:51:57 +02:00
Santos Gallegos
4a7a713c52
Comment: use @combined to create just one tree per buffer (#1252)
* Comment: use `@combined` to create just one tree per buffer

There is no need to create a tree per line/block for comments.
Should fix https://github.com/nvim-treesitter/nvim-treesitter/issues/1251

* Add injections for scss

* Fix jsonc

* Combine jsdoc
2021-04-28 07:19:07 -05:00
Stephan Seitz
1d5f928279 highlights(java): add new keyword "yield"
https://github.com/tree-sitter/tree-sitter-java/pull/78 added support
for enhanced switch statements
2021-04-17 20:58:41 +02:00
Stephan Seitz
7e9e8f2af9 Add support for Java records
Ref: https://github.com/tree-sitter/tree-sitter-java/pull/73
2021-04-10 12:27:54 +02:00
Stephan Seitz
2331a36693
highlights(java): Highlight fields (members and member access) (#1107) 2021-03-26 13:25:28 -05:00
Santos Gallegos
e4083fc8e1
Add comment parser to highlight comment tags (#893)
Closes #236
2021-03-12 11:21:46 -05:00
elianiva
0bf8f58cd2 feat: use @ignore for comments and multiline strings 2021-03-01 23:28:53 +01:00
elianiva
1ab424d384 add formal_parameters
as suggested by p00f

Co-authored-by: Chinmay Dalal <chinmay.dalal.22012001@gmail.com>
2021-02-21 15:08:50 +01:00
elianiva
a1b51a67d5 feat: add java indent 2021-02-21 15:08:50 +01:00
Stephan Seitz
eaca722783 highlights(java): Highlight spread parameters 2021-02-19 23:41:42 +01:00
Stephan Seitz
5033d3668a highlights(java): fix constant highlighting (only UPPERCASE_LETTERS) 2021-02-19 23:41:42 +01:00
Chinmay Dalal
d2b8b49ce5 Ternary 2020-11-19 12:45:10 +01:00
Stephan Seitz
624a6896b5 chore(java): remove duplicate line 2020-09-19 10:42:30 -05:00
Stephan Seitz
7e3c4f8089 Add @keyword.operator for operators that are English words and add @exception for Java/JS 2020-09-19 07:30:49 +02:00
Stephan Seitz
bcf421b4e7 Fix #307: Use and document TSVariable/TSVariableBuiltin in all languages 2020-09-14 18:27:20 +02:00
Thomas Vigouroux
b90e520ccd ci: fix wrong queries 2020-09-11 12:02:35 +02:00
Steven Sojka
ce43dbf54c fix(queries): use vim-match for non lua regexes 2020-08-16 18:31:56 +02:00
Chinmay Dalal
64df3e1791 [java] Add label highlight 2020-08-16 09:58:33 +02:00
Steven Sojka
7806b16cc2 fix(java): add lambdas as a scope 2020-08-12 21:20:54 +02:00
Stephan Seitz
4f4c4ff6ef Java locals: use has-ancestor? to match imports 2020-07-27 11:08:13 +02:00
Stephan Seitz
4a77ac78d0 Java highlights/locals: Add catch_formal_parameter 2020-07-27 11:08:13 +02:00
Stephan Seitz
35837b069b Java highlights: Add highlight for this 2020-07-27 11:08:13 +02:00
Chinmay Dalal
656a5c4064 Add Java locals
Co-authored: @PitcherTear22
2020-07-27 11:08:13 +02:00