aboutsummaryrefslogtreecommitdiff
path: root/test/functional/lua/snippet_spec.lua
diff options
context:
space:
mode:
authorMaria José Solano <majosolano99@gmail.com>2023-10-22 22:38:11 -0700
committerMathias Fußenegger <mfussenegger@users.noreply.github.com>2023-10-23 17:21:41 +0200
commit94127cb5df0a513e66777d18a2c7fa6219404280 (patch)
treea382c4cc0fd5fa9045bc48e918a889c072fd514f /test/functional/lua/snippet_spec.lua
parent370232dbefb91b7ee773ee9a61a9b1ad77d7f1af (diff)
downloadrneovim-94127cb5df0a513e66777d18a2c7fa6219404280.tar.gz
rneovim-94127cb5df0a513e66777d18a2c7fa6219404280.tar.bz2
rneovim-94127cb5df0a513e66777d18a2c7fa6219404280.zip
fix(lsp): do not add extra indentation
Diffstat (limited to 'test/functional/lua/snippet_spec.lua')
-rw-r--r--test/functional/lua/snippet_spec.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/functional/lua/snippet_spec.lua b/test/functional/lua/snippet_spec.lua
index fea9d1e982..738420d87d 100644
--- a/test/functional/lua/snippet_spec.lua
+++ b/test/functional/lua/snippet_spec.lua
@@ -48,6 +48,10 @@ describe('vim.snippet', function()
)
end)
+ it('adds indentation based on the start of snippet lines', function()
+ test_success({ 'if $1 then', ' $0', 'end' }, { 'if then', ' ', 'end' })
+ end)
+
it('replaces tabs with spaces when expandtab is set', function()
test_success(
{ 'function $1($2)', '\t$0', 'end' },