refactor(nvim): move config out of module

This commit is contained in:
2026-09-28 21:18:11 +02:00
parent 178a51d75e
commit aee9682d64
82 changed files with 3 additions and 3 deletions
@@ -0,0 +1,16 @@
local json_newline = function()
local line = vim.api.nvim_get_current_line()
if line == "" then
return "o"
elseif string.byte(line, -1) == string.byte(",") then
return "o"
elseif string.byte(line, -1) == string.byte("{") then
return "o"
elseif string.byte(line, -1) == string.byte("}") then
return "o"
else
return "A,<CR>"
end
end
vim.keymap.set("n", "o", json_newline, { buffer = true, expr = true })