chore: disable autoformat on save
Add terminal autocommand to enter insert mode
This commit is contained in:
parent
8f7240f3f3
commit
ac13b40808
1 changed files with 15 additions and 5 deletions
|
|
@ -5,9 +5,19 @@
|
|||
-- command = [[%s/\s\+$//e]],
|
||||
-- })
|
||||
|
||||
-- LSP Auto format on save
|
||||
vim.api.nvim_create_autocmd({ "BufWritePre" }, {
|
||||
group = vim.api.nvim_create_augroup("Default", {}),
|
||||
pattern = "*",
|
||||
command = [[lua vim.lsp.buf.format()]],
|
||||
-- Go into insert mode when opening a terminal pane
|
||||
vim.api.nvim_create_autocmd({ "TermOpen", "BufEnter" }, {
|
||||
pattern = { "*" },
|
||||
callback = function()
|
||||
if vim.opt.buftype:get() == "terminal" then
|
||||
vim.cmd(":startinsert")
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
-- LSP Auto format on save
|
||||
-- vim.api.nvim_create_autocmd({ "BufWritePre" }, {
|
||||
-- group = vim.api.nvim_create_augroup("Default", {}),
|
||||
-- pattern = "*",
|
||||
-- command = [[lua vim.lsp.buf.format()]],
|
||||
-- })
|
||||
|
|
|
|||
Loading…
Reference in a new issue