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
return 'k'
end
local function wrap_down()
if vim.v.count == 0 then return 'gj' end
return 'j'
end
map.n.nore.expr['k'] = wrap_up
map.n.nore.expr['j'] = wrap_down

View file

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