fix shortmess, add trouble toggle function
This commit is contained in:
parent
a4035b5483
commit
65aec821bc
@ -44,11 +44,8 @@ opt.foldlevel = 0
|
|||||||
opt.number = true
|
opt.number = true
|
||||||
opt.hidden = true
|
opt.hidden = true
|
||||||
-- opt.shortmess = add { 'I' } -- Don't pass messages to ins-completion-menu.
|
-- opt.shortmess = add { 'I' } -- Don't pass messages to ins-completion-menu.
|
||||||
opt.shortmess = {
|
opt.shortmess:append('I', 'W', 's')
|
||||||
I = true,
|
opt.cmdheight = 1
|
||||||
o = true,
|
|
||||||
}
|
|
||||||
opt.cmdheight = 0
|
|
||||||
opt.scrolloff = 15
|
opt.scrolloff = 15
|
||||||
opt.iskeyword:prepend { '-' }
|
opt.iskeyword:prepend { '-' }
|
||||||
opt.inccommand = 'nosplit'
|
opt.inccommand = 'nosplit'
|
||||||
@ -72,3 +69,12 @@ vim.api.nvim_create_autocmd({ 'BufReadPost' }, { pattern = { '*' }, command = 's
|
|||||||
vim.api.nvim_create_autocmd({ 'BufWinLeave' }, { pattern = { '?*' }, command = 'mkview' })
|
vim.api.nvim_create_autocmd({ 'BufWinLeave' }, { pattern = { '?*' }, command = 'mkview' })
|
||||||
vim.api.nvim_create_autocmd({ 'BufReadPost' }, { pattern = { '?*' }, command = 'silent! loadview' })
|
vim.api.nvim_create_autocmd({ 'BufReadPost' }, { pattern = { '?*' }, command = 'silent! loadview' })
|
||||||
-- }}}
|
-- }}}
|
||||||
|
function ToggleTroubleAuto()
|
||||||
|
local ok, trouble = pcall(require, 'trouble')
|
||||||
|
if ok then
|
||||||
|
vim.defer_fn(function()
|
||||||
|
vim.cmd 'cclose'
|
||||||
|
trouble.open 'quickfix'
|
||||||
|
end, 0)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user