aboutsummaryrefslogtreecommitdiffstats
path: root/tests/indent
diff options
context:
space:
mode:
author再生花 <hoangtun0810@gmail.com>2024-03-11 18:20:10 +0900
committerChristian Clason <c.clason@uni-graz.at>2024-03-13 11:09:42 +0800
commite73c775aa9d540f0c33585ed1b5ea572a64bdac1 (patch)
tree1964ca36c7c01ad3e5ef38016566f48aebee8293 /tests/indent
parentfix(scripts): actually skip lockfile updates (diff)
downloadnvim-treesitter-e73c775aa9d540f0c33585ed1b5ea572a64bdac1.tar
nvim-treesitter-e73c775aa9d540f0c33585ed1b5ea572a64bdac1.tar.gz
nvim-treesitter-e73c775aa9d540f0c33585ed1b5ea572a64bdac1.tar.bz2
nvim-treesitter-e73c775aa9d540f0c33585ed1b5ea572a64bdac1.tar.lz
nvim-treesitter-e73c775aa9d540f0c33585ed1b5ea572a64bdac1.tar.xz
nvim-treesitter-e73c775aa9d540f0c33585ed1b5ea572a64bdac1.tar.zst
nvim-treesitter-e73c775aa9d540f0c33585ed1b5ea572a64bdac1.zip
feat(swift): add init/deinit indents
Signed-off-by: Phạm Huy Hoàng <hoangtun0810@gmail.com>
Diffstat (limited to 'tests/indent')
-rw-r--r--tests/indent/swift/declarations.swift2
-rw-r--r--tests/indent/swift_spec.lua8
2 files changed, 6 insertions, 4 deletions
diff --git a/tests/indent/swift/declarations.swift b/tests/indent/swift/declarations.swift
index d4bc6e054..67a7e5544 100644
--- a/tests/indent/swift/declarations.swift
+++ b/tests/indent/swift/declarations.swift
@@ -12,6 +12,8 @@ class EquilateralTriangle: NamedShape {
) {
self.sideLength = sideLength
}
+ deinit {
+ }
var perimeter: Double {
willSet {
diff --git a/tests/indent/swift_spec.lua b/tests/indent/swift_spec.lua
index 5f07ee825..501cbfa81 100644
--- a/tests/indent/swift_spec.lua
+++ b/tests/indent/swift_spec.lua
@@ -14,9 +14,9 @@ describe("indent Swift:", function()
describe("new line:", 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 = 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 })
+ run:new_line("declarations.swift", { on_line = 19, text = "var textInsideWillSet = 1", indent = 6 })
+ run:new_line("declarations.swift", { on_line = 22, text = "var textInsideDidSet = 1", indent = 6 })
+ run:new_line("declarations.swift", { on_line = 27, text = "var textInsideOverrideFunc", indent = 4 })
+ run:new_line("declarations.swift", { on_line = 33, text = "var InsideProtocol: String { get }", indent = 2 })
end)
end)