vim updates for puppet/nvim-tree

This commit is contained in:
2024-03-09 12:39:05 +11:00
parent 14159884fa
commit 8129a8a2f3
3 changed files with 10 additions and 7 deletions
+3 -3
View File
@@ -116,19 +116,19 @@ endfunction
-- open puppet resource
vim.cmd([[
function! OpenPuppetClassOrTemplate()
function! OpenPuppetClassOrTemplate(layout)
" Get the line under the cursor
let line = getline(".")
" Check if it's a template (erb or epp)
if line =~ 'profiles\/.*\.\(erb\|epp\)'
call OpenPuppetTemplate()
call OpenPuppetTemplate(a:layout)
return
endif
" Check if it's an included class (profiles:: or roles::)
if line =~ '\(profiles\|roles\)::'
call OpenPuppetProfileOrRole()
call OpenPuppetProfileOrRole(a:layout)
return
endif