mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 11:06:54 -04:00
fix(cpp): incorrect indent of class with opening { on new line (#5811)
This commit is contained in:
parent
d2d3df8613
commit
d496c5e08e
2 changed files with 9 additions and 2 deletions
|
|
@ -1,11 +1,9 @@
|
|||
; inherits: c
|
||||
|
||||
[
|
||||
(class_specifier)
|
||||
(condition_clause)
|
||||
] @indent.begin
|
||||
|
||||
((field_initializer_list) @indent.begin
|
||||
(#set! indent.start_at_same_line 1))
|
||||
(access_specifier) @indent.branch
|
||||
|
||||
|
|
|
|||
9
tests/indent/cpp/class_newline.cpp
Normal file
9
tests/indent/cpp/class_newline.cpp
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
class Foo
|
||||
{
|
||||
int x;
|
||||
class Bar
|
||||
{
|
||||
int y;
|
||||
};
|
||||
Bar z;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue