mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
feat(swift): add will/didSet indent
Fixes CI error in PR.6237
This commit is contained in:
parent
3d08cdd741
commit
63ca90eaa3
4 changed files with 10 additions and 3 deletions
|
|
@ -663,7 +663,7 @@
|
|||
"revision": "04a126d9210def99f06d9ab84a255110b862d47c"
|
||||
},
|
||||
"swift": {
|
||||
"revision": "fc00cbb460b40228b30f322b5a34ea0e8f35a9f8"
|
||||
"revision": "8a87eebcc3ca249e1eeb65b226e81b7e711eea7a"
|
||||
},
|
||||
"sxhkdrc": {
|
||||
"revision": "440d5f913d9465c9c776a1bd92334d32febcf065"
|
||||
|
|
|
|||
|
|
@ -32,6 +32,9 @@
|
|||
(array_literal) ; [ foo, bar ]
|
||||
(dictionary_literal) ; [ foo: bar, x: y ]
|
||||
(lambda_literal)
|
||||
(willset_didset_block)
|
||||
(willset_clause)
|
||||
(didset_clause)
|
||||
] @indent.begin
|
||||
|
||||
; @something(...)
|
||||
|
|
|
|||
|
|
@ -16,6 +16,9 @@ class EquilateralTriangle: NamedShape {
|
|||
var perimeter: Double {
|
||||
willSet {
|
||||
}
|
||||
didSet {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@funcattr
|
||||
|
|
|
|||
|
|
@ -15,7 +15,8 @@ describe("indent Swift:", function()
|
|||
run:new_line("declarations.swift", { on_line = 6, text = "var x = 1", indent = 2 })
|
||||
run:new_line("declarations.swift", { on_line = 12, text = "var textInsideInit = true", indent = 4 })
|
||||
run:new_line("declarations.swift", { on_line = 17, text = "var textInsideWillSet = 1", indent = 6 })
|
||||
run:new_line("declarations.swift", { on_line = 22, text = "var textInsideOverrideFunc", indent = 4 })
|
||||
run:new_line("declarations.swift", { on_line = 28, text = "var InsideProtocol: String { get }", indent = 2 })
|
||||
run:new_line("declarations.swift", { on_line = 20, text = "var textInsideDidSet = 1", indent = 6 })
|
||||
run:new_line("declarations.swift", { on_line = 25, text = "var textInsideOverrideFunc", indent = 4 })
|
||||
run:new_line("declarations.swift", { on_line = 31, text = "var InsideProtocol: String { get }", indent = 2 })
|
||||
end)
|
||||
end)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue