Pham Huy Hoang
864b4171de
feat: add swift indents ( #4756 )
2023-05-08 14:53:31 +09:00
Amaan Qureshi
12453e0e3d
Update Capnp ( #4713 )
...
* feat(capnp): update queries from upstream changes
* test: add tests for capnp
* fix indent queries
* ci: fix capnp indent tests
---------
Co-authored-by: Pham Huy Hoang <hoangtun0810@gmail.com>
2023-05-07 00:12:49 +09:00
Stephan Seitz
39a78192fb
ci: add tests for #4632
...
Issue #4632 might be fixed by
https://github.com/UserNobody14/tree-sitter-dart/pull/41
2023-05-05 14:57:51 +02:00
Pham Huy Hoang
1ca9b938c1
Add Python else elif dedent ( #4618 )
...
* feat(python): add interactive else/elif dedent
* fixup
* add test
2023-04-29 10:35:35 +02:00
Amaan Qureshi
b39e6bd615
chore(smali): add tests
2023-04-25 02:37:31 -04:00
Pham Huy Hoang
36d4deb294
fix(dart_indent): Fix dart case/default indent
...
add tests
add tests for fallthrough case
add more tests
keep functional tests
2023-04-14 02:28:42 -07:00
Robert Brunhage
ba6c55b203
chore(dart): remove tests for switch
2023-04-13 02:31:49 -07:00
Robert Brunhage
e9de9cedf0
test(dart): add test cases for open issues
2023-04-13 02:31:49 -07:00
Robert Brunhage
e68b81e7fd
fix(dart): review comment
2023-04-13 02:31:49 -07:00
Robert Brunhage
49f6962da4
test(dart): add expected failure file to test
2023-04-13 02:31:49 -07:00
Robert Brunhage
95055abadd
chore: fix formatting issue for dart test
2023-04-13 02:31:49 -07:00
Robert Brunhage
34d1e0e360
Update tests/indent/dart_spec.lua
...
Co-authored-by: Pham Huy Hoang <hoangtun0810@gmail.com>
2023-04-13 02:31:49 -07:00
Robert Brunhage
978fb2b7be
test(dart): Add an expected failure test
2023-04-13 02:31:49 -07:00
Robert Brunhage
ce3ea7aebe
Revert "fix(dart): function argument indents is inconsistent"
...
This reverts commit ac4020c707 .
2023-04-13 02:31:49 -07:00
Robert Brunhage
ac4020c707
fix(dart): function argument indents is inconsistent
2023-04-11 03:09:53 -07:00
Robert Brunhage
2fe7f969c1
fix(dart): try statement wouldn't indent ( #4623 )
2023-04-10 06:52:50 +00:00
Pham Huy Hoang
9161093fc7
fix(c_indents): fix expression leaking indents
2023-04-08 09:59:21 -07:00
Pham Huy Hoang
474c59dcf1
add test
2023-04-08 09:56:06 -07:00
Pham Huy Hoang
c9ef5e58f7
feat(python): add break/continue dedent
2023-03-25 00:31:57 -04:00
Pham Huy Hoang
1ffa019856
feat(python): add match-case indents
2023-03-25 00:31:57 -04:00
George Harker
d1333dd7e5
refactor(indent)!: Rework indent, aligned indent
...
indents now use @indent.X style captures, and indent.PROP for properties to set on those captures, as documented in the help.
Captures are:
indent.auto
indent.begin
indent.end
indent.dedent
indent.branch
indent.ignore
indent.align
indent.zero
Properties are:
indent.immediate
indent.start_at_same_line
indent.open_delimiter
indent.close_delimiter
indent.increment
indent.avoid_last_matching_next
Multiple opening delims on one line and multiple closing on a line are collapsed so as not to over indent,
The final line of @indent.align blocks which must in some cases be treated specially to avoid clashing with the next line is treated the same regardless of whether the @indent.align capture actually uses aligned indentation or just normal indentation. The indent.avoid_last_matching_next property controls this.
Adjust python to use these.
List, set, dict and tuple all use @indent.align which permits both hanging and aligned styles.
Finally, try: on it’s own will indent when typing live but make no guaranteeds about whole-file formatting.
Includes lucario387:fix-align-indent
2023-03-24 13:07:53 -04:00
Pham Huy Hoang
01e8a51451
feat(python): add "return" patterns to @indent_end
...
`return ...` is usually the last line of a
function/statement, so mark some possible patterns of `return` with
`@indent_end` to dedent the line after it
2023-03-16 13:41:19 +01:00
Pham Huy Hoang
f5ddd8f92e
fix(python): add missing @indent_end
2023-03-16 03:46:01 -04:00
George Harker
fa0644667e
fix: change folding algorithm to fix Python indents
2023-03-15 22:44:59 +01: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
Pham Huy Hoang
5ac39d10cc
indents(vue): fix indents on new line after <template>
2023-03-06 02:32:45 -05:00
Evan Phoenix
28f84d69e3
fix(go): Indent on type switch case properly
2023-03-03 23:36:51 -05:00
Tomas Sandven
061ee1b98f
Fix broken YANG indent tests
2023-02-24 16:39:33 -05:00
Tomas Sandven
06e8a91ce2
Add YANG indentation tests
2023-02-24 16:39:33 -05:00
SzeLamC
68ab44277c
fix(dart): add @indent_end to } ( #4167 )
...
* fix dart indentation after }
* add some simple test case
2023-02-24 16:06:31 -05:00
Amaan Qureshi
a3213e3dd7
fix(go): apply indents in a communication case in a select statement
2023-02-24 01:37:58 -08:00
dundargoc
4612212c72
docs: fix typos
2023-02-23 11:39:43 -08:00
Alvaro Muñoz
f6531e27fd
simplify tests
2023-01-31 12:23:13 +01:00
Alvaro Muñoz
d335c39bff
update tests
2023-01-31 12:23:13 +01:00
Alvaro Muñoz
c433b3c232
fix tests
2023-01-31 12:23:13 +01:00
Alvaro Muñoz
9d6d348418
add ql indent tests
2023-01-31 12:23:13 +01:00
Pham Huy Hoang
f669924df2
indents(c): update if cases
2023-01-14 04:52:21 -08:00
Pham Huy Hoang
2f5deed456
indents(c): Refactor indent queries
2023-01-14 04:52:21 -08:00
Cameron
5fb315df12
Update indent-square-brackets.rb
2023-01-09 22:17:50 +01:00
Cameron
bb24f483ca
Create indent-square-brackets.rb
2023-01-09 22:17:50 +01:00
Cameron
2d8e6b6662
Add tests correctly for ruby rescue/ensure indentation
2023-01-06 19:48:42 +01:00
Cameron
14bdbef468
Create indent-ensure.rb
2023-01-06 19:48:42 +01:00
Cameron
7eb76dc290
Create indent-rescue.rb
2023-01-06 19:48:42 +01:00
Pham Huy Hoang
2cd89b4bc3
fix(jsx): add missing indent end mark to elements
2023-01-04 12:14:03 +01:00
Pham Huy Hoang
8c71c6c5ed
fix(html): fix wrong indents for script/style tags
2023-01-03 17:50:44 +01:00
Michael Hoffmann
ee3e9f4dc0
feat(hcl,terraform): split terraform from hcl, add specialized queries for tf
...
This enables us to have different queries for
terraform and general hcl. It solve the situation
where other dialects of hcl (nomad, packer, etc)
might use a terraform keyword and get highlighted
out of place.
2022-12-29 22:18:41 +01:00
Raymond Ha
6c4772f7b6
indents(ecma): Fix switch default indent
2022-12-07 18:05:33 +01:00
Pedro Castro
161576dde2
indents(r): support special operator
...
Close #3879
2022-11-29 19:23:09 +01:00
gbprod
3096e637c8
fix(php): add indent for enums
2022-10-10 23:01:22 +02:00
gbprod
84e23bd979
Fix php indent for short array declaration
2022-10-06 08:55:11 -04:00