mirror of
https://github.com/LunarVim/LunarVim.git
synced 2024-09-20 18:45:08 +02:00
QuickFix quality of life (#435)
* Exclude the quickfix buffer from the barbar buffer list * Add mapping and function to toggle the quickfix window
This commit is contained in:
parent
12b5dc796f
commit
d0f87322f9
3 changed files with 13 additions and 1 deletions
|
@ -63,3 +63,6 @@ vim.api.nvim_set_keymap('n', 'gx', ":call netrw#BrowseX(expand((exists('g:netrw_
|
|||
-- map <leader>n <Plug>(miniyank-cycle)
|
||||
-- map <leader>N <Plug>(miniyank-cycleback)
|
||||
-- ]])
|
||||
|
||||
-- Toggle the QuickFix window
|
||||
vim.api.nvim_set_keymap('', '<C-q>', ':call QuickFixToggle()<CR>', {noremap = true, silent = true})
|
||||
|
|
|
@ -34,7 +34,8 @@ utils.define_augroups({
|
|||
{'BufWinEnter', '*', 'setlocal formatoptions-=c formatoptions-=r formatoptions-=o'},
|
||||
{'BufRead', '*', 'setlocal formatoptions-=c formatoptions-=r formatoptions-=o'},
|
||||
{'BufNewFile', '*', 'setlocal formatoptions-=c formatoptions-=r formatoptions-=o'},
|
||||
{'VimLeavePre', '*', 'set title set titleold='}
|
||||
{'VimLeavePre', '*', 'set title set titleold='},
|
||||
{'FileType', 'qf', 'set nobuflisted'},
|
||||
|
||||
-- {'User', 'GoyoLeave', 'lua require(\'galaxyline\').disable_galaxyline()'},
|
||||
-- {'User', 'GoyoEnter', 'lua require(\'galaxyline\').galaxyline_augroup()'},
|
||||
|
|
|
@ -63,3 +63,11 @@ autocmd User GoyoLeave set laststatus=2
|
|||
|
||||
" autocmd! User GoyoEnter lua require('galaxyline').disable_galaxyline()
|
||||
" autocmd! User GoyoLeave lua require('galaxyline').galaxyline_augroup()
|
||||
|
||||
function! QuickFixToggle()
|
||||
if empty(filter(getwininfo(), 'v:val.quickfix'))
|
||||
copen
|
||||
else
|
||||
cclose
|
||||
endif
|
||||
function
|
||||
|
|
Loading…
Reference in a new issue