Neovim: fixed comments on newlines issue
This commit is contained in:
@@ -6,13 +6,11 @@ vim.api.nvim_create_autocmd('TextYankPost', {
|
||||
end,
|
||||
})
|
||||
|
||||
-- vim.api.nvim_create_autocmd('FileType', {
|
||||
-- group = vim.api.nvim_create_augroup('disable-auto-comment', { clear = true }),
|
||||
-- pattern = '*',
|
||||
-- callback = function()
|
||||
-- -- c - autowrap using textwidth | r - enter in insert mode | o - o/O in normal mode
|
||||
-- -- vim.opt.formatoptions:remove({ 'c', 'r', 'o' })
|
||||
-- vim.opt.formatoptions:remove('o')
|
||||
-- -- vim.cmd('set formatoptions-=o')
|
||||
-- end,
|
||||
-- })
|
||||
vim.api.nvim_create_autocmd('BufEnter', {
|
||||
desc = 'Disable newlines on commented lines from continuing the comment',
|
||||
group = vim.api.nvim_create_augroup('disable-comments-continuation', { clear = true }),
|
||||
callback = function()
|
||||
-- vim.opt_local.formatoptions:remove('r') -- no comments on enter
|
||||
vim.opt_local.formatoptions:remove('o') -- no comments on `o` or `O`
|
||||
end,
|
||||
})
|
||||
|
||||
@@ -35,7 +35,6 @@ vim.opt.termguicolors = true
|
||||
vim.opt.laststatus = 3 -- views can only be fully collapsed with the global statusline
|
||||
vim.opt.splitkeep = 'screen' -- for edgy.nvim
|
||||
vim.opt.inccommand = 'split' -- shows preview for commands like :%s/from/to
|
||||
vim.opt.formatoptions:remove('o') -- don't have `o` add a comment
|
||||
|
||||
-- Disable warnings for missing language providers
|
||||
vim.g.loaded_node_provider = 0
|
||||
|
||||
Reference in New Issue
Block a user