nvim: File formatting

This commit is contained in:
Marty Oehme 2022-11-25 16:53:40 +01:00
parent 2b9981482f
commit 8f6e1994df
Signed by: Marty
GPG key ID: 73BA40D5AFAF49C9
2 changed files with 20 additions and 19 deletions

View file

@ -38,10 +38,12 @@ local function wrap_up()
if vim.v.count == 0 then return 'gk' end if vim.v.count == 0 then return 'gk' end
return 'k' return 'k'
end end
local function wrap_down() local function wrap_down()
if vim.v.count == 0 then return 'gj' end if vim.v.count == 0 then return 'gj' end
return 'j' return 'j'
end end
map.n.nore.expr['k'] = wrap_up map.n.nore.expr['k'] = wrap_up
map.n.nore.expr['j'] = wrap_down map.n.nore.expr['j'] = wrap_down

View file

@ -35,8 +35,7 @@ local formatters = {
json = prettierfmt, json = prettierfmt,
lua = { lua = {
function() function()
return return { exe = "lua-format", args = { "--indent-width", 4 }, stdin = true }
{exe = "lua-format", args = {"--indent-width", 4}, stdin = true}
end end
}, },
python = { function() return { exe = "black", args = { "-" }, stdin = true } end }, python = { function() return { exe = "black", args = { "-" }, stdin = true } end },