summaryrefslogtreecommitdiffstats
path: root/after/ftplugin/lua.lua
diff options
context:
space:
mode:
authorThomas Vanbesien <tvanbesi@proton.me>2026-06-24 20:22:19 +0200
committerThomas Vanbesien <tvanbesi@proton.me>2026-06-24 20:22:19 +0200
commitb393c59ad0e3d85616eeb5be3a12042d6f3dbe63 (patch)
tree0aa4f39aa7ffdd4d7d034dea7626cd2516cdfd02 /after/ftplugin/lua.lua
parentc30ca8b6556673e836e312b555f9a63216ec9660 (diff)
downloadnvim-config-b393c59ad0e3d85616eeb5be3a12042d6f3dbe63.tar.gz
nvim-config-b393c59ad0e3d85616eeb5be3a12042d6f3dbe63.zip
refactor(nvim): rewrite the snippet plugin
Diffstat (limited to 'after/ftplugin/lua.lua')
-rw-r--r--after/ftplugin/lua.lua13
1 files changed, 1 insertions, 12 deletions
diff --git a/after/ftplugin/lua.lua b/after/ftplugin/lua.lua
index 2b2f2c5..ac50ee3 100644
--- a/after/ftplugin/lua.lua
+++ b/after/ftplugin/lua.lua
@@ -1,18 +1,7 @@
vim.opt_local.textwidth = vim.g.dotfiles.textwidth.lua -- gw wraps at this value
vim.opt_local.colorcolumn = "+1" -- Highlight one column after 'textwidth'
vim.opt_local.complete = {
- "o", -- 'omnifunc'
- "F", -- 'completefunc' (snippet source, see plugin/50-completion.lua)
+ "o", -- 'omnifunc' (the snippet engine appends "F" for vim.b.snippets, see plugin/50-snippet.lua)
}
vim.b.format = true -- See plugin/50-format.lua
-
-------------------------------------------------------------------------------------------------------------------------
--- Snippets
-------------------------------------------------------------------------------------------------------------------------
--- Trigger word -> LSP snippet body. `$1` mirrors the `${1:X}` placeholder, so the variable is typed once.
--- Surfaced in the completion menu via the "F" source in 'complete' above (see plugin/50-completion.lua).
-vim.b.snippets = {
- ["debug_print"] = 'vim.print("${1:X} = " .. vim.inspect($1))',
-}
-vim.bo.completefunc = "v:lua.dotfiles_snippet_source"