Skip to content

Commit 6443222

Browse files
committed
feat(print_loc): add support for c, js, powershell, python, vimscript and go
1 parent c230ce5 commit 6443222

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

lua/refactoring/config.lua

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -818,6 +818,24 @@ local print_loc_code_generation = {
818818
lua = function(opts)
819819
return ([[print([==[%s]==])]]):format(opts.debug_path)
820820
end,
821+
c = function(opts)
822+
return ([[printf("%s\n");]]):format(opts.debug_path)
823+
end,
824+
javascript = function(opts)
825+
return ([[console.log("%s")]]):format(opts.debug_path)
826+
end,
827+
powershell = function(opts)
828+
return ([[Write-Host '%s']]):format(opts.debug_path)
829+
end,
830+
python = function(opts)
831+
return ([[print(f"%s")]]):format(opts.debug_path)
832+
end,
833+
vim = function(opts)
834+
return ([[echom '%s'|]]):format(opts.debug_path)
835+
end,
836+
go = function(opts)
837+
return ([[fmt.Println("%s")]]):format(opts.debug_path)
838+
end,
821839
},
822840
}
823841

0 commit comments

Comments
 (0)