1
0
Fork 0

neovim: Fix formatoptions after ftplugins

This commit is contained in:
Jeremy Kaplan 2024-04-10 11:58:51 -07:00
commit 0caa9a44e1

View file

@ -28,10 +28,14 @@ vim.o.tabstop = 4
vim.o.softtabstop = 4 vim.o.softtabstop = 4
vim.o.shiftwidth = 4 vim.o.shiftwidth = 4
vim.o.smartindent = true vim.o.smartindent = true
vim.opt.formatoptions = "crqnlj"
vim.o.foldenable = false vim.o.foldenable = false
vim.o.joinspaces = false vim.o.joinspaces = false
-- Some ftplugin files will add 'o' back in again, so remove it again after the
-- filetype has been determined.
vim.opt.formatoptions = "crqnlj"
vim.cmd([[ autocmd Filetype * setlocal formatoptions-=o ]])
vim.o.wrap = true vim.o.wrap = true
vim.o.linebreak = true vim.o.linebreak = true
vim.keymap.set("", "j", "gj", { silent = true }) vim.keymap.set("", "j", "gj", { silent = true })