Compare commits
No commits in common. "d3c90f93446e38fc5cd6e8a0a3e3133325d1b6cd" and "0ac264264d006dbf4df3111b7d3e9526afbb5fcd" have entirely different histories.
d3c90f9344
...
0ac264264d
1 changed files with 6 additions and 3 deletions
9
init.lua
9
init.lua
|
|
@ -20,7 +20,7 @@ opt.writebackup = false
|
||||||
opt.swapfile = false
|
opt.swapfile = false
|
||||||
opt.shortmess:append({ I = true })
|
opt.shortmess:append({ I = true })
|
||||||
-- whichwrap -- left/right keys can traverse up/down
|
-- whichwrap -- left/right keys can traverse up/down
|
||||||
opt.whichwrap:append("<,>,[,]")
|
--opt.whichwrap = {'<','>','[',']'}
|
||||||
opt.cmdheight = 2
|
opt.cmdheight = 2
|
||||||
opt.showcmd = true
|
opt.showcmd = true
|
||||||
g.mapleader = " "
|
g.mapleader = " "
|
||||||
|
|
@ -166,10 +166,14 @@ local servers = {
|
||||||
-- Auto format on save
|
-- Auto format on save
|
||||||
vim.api.nvim_create_autocmd({ "BufWritePre" }, {
|
vim.api.nvim_create_autocmd({ "BufWritePre" }, {
|
||||||
callback = function()
|
callback = function()
|
||||||
cmd("Format")
|
|
||||||
vim.lsp.buf.format({ async = false })
|
vim.lsp.buf.format({ async = false })
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
|
||||||
|
callback = function()
|
||||||
|
cmd("FormatWriteLock")
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
---- Plugins ----
|
---- Plugins ----
|
||||||
-- Go
|
-- Go
|
||||||
|
|
@ -229,7 +233,6 @@ for ft, ft_linters in pairs(linters) do
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
lint.try_lint(nil, { ignore_errors = true }),
|
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
if on_write then
|
if on_write then
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue