nvim: Drop quickui
Revert 13cea58905
. This does not play well with defined color scheme and
overrides it which is annoying. The VimEnter approach mentioned did not
work, so just drop it and use preview windows as earlier.
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
This commit is contained in:
parent
8b9e46b8b8
commit
aa99ea7e0c
3 changed files with 22 additions and 5 deletions
|
@ -15,10 +15,30 @@ setlocal nospell
|
||||||
nnoremap <buffer> [- :colder<CR>
|
nnoremap <buffer> [- :colder<CR>
|
||||||
nnoremap <buffer> ]+ :cnewer<CR>
|
nnoremap <buffer> ]+ :cnewer<CR>
|
||||||
nnoremap <buffer> <Leader>g :Cfilter<SPACE>
|
nnoremap <buffer> <Leader>g :Cfilter<SPACE>
|
||||||
nnoremap <buffer> p :call quickui#tools#preview_quickfix()<CR>
|
|
||||||
|
|
||||||
if !empty(getloclist(0)) == 1
|
nnoremap <buffer> o <CR><C-w>p
|
||||||
|
nnoremap <silent> <buffer> p :call <SID>preview_file()<CR>
|
||||||
|
|
||||||
|
let b:qf_isLoc = ! empty(getloclist(0))
|
||||||
|
if b:qf_isLoc == 1
|
||||||
nnoremap <buffer> q <CR>:lclose<CR>
|
nnoremap <buffer> q <CR>:lclose<CR>
|
||||||
else
|
else
|
||||||
nnoremap <buffer> q <CR>:cclose<CR>
|
nnoremap <buffer> q <CR>:cclose<CR>
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
" Taken from https://github.com/voldikss/dotfiles
|
||||||
|
function! s:preview_file()
|
||||||
|
let winwidth = &columns
|
||||||
|
let cur_list = b:qf_isLoc == 1 ? getloclist('.') : getqflist()
|
||||||
|
let cur_line = getline(line('.'))
|
||||||
|
let cur_file = fnameescape(substitute(cur_line, '|.*$', '', ''))
|
||||||
|
if cur_line =~# '|\d\+'
|
||||||
|
let cur_pos = substitute(cur_line, '^\(.\{-}|\)\(\d\+\)\(.*\)', '\2', '')
|
||||||
|
execute 'vertical pedit +'.cur_pos.' '.cur_file
|
||||||
|
else
|
||||||
|
execute 'vertical pedit '.cur_file
|
||||||
|
endif
|
||||||
|
wincmd P
|
||||||
|
execute 'vert resize '.(winwidth / 2)
|
||||||
|
wincmd p
|
||||||
|
endfunction
|
||||||
|
|
|
@ -61,8 +61,6 @@ Plug 'liuchengxu/vim-which-key'
|
||||||
Plug 'christoomey/vim-system-copy'
|
Plug 'christoomey/vim-system-copy'
|
||||||
" Toggle terminal
|
" Toggle terminal
|
||||||
Plug 'caenrique/nvim-toggle-terminal'
|
Plug 'caenrique/nvim-toggle-terminal'
|
||||||
" Floating preview
|
|
||||||
Plug 'skywind3000/vim-quickui'
|
|
||||||
" LSP
|
" LSP
|
||||||
Plug 'neovim/nvim-lsp'
|
Plug 'neovim/nvim-lsp'
|
||||||
Plug 'haorenW1025/diagnostic-nvim'
|
Plug 'haorenW1025/diagnostic-nvim'
|
||||||
|
|
|
@ -59,7 +59,6 @@ nnoremap L* :Glgrep! <cword><CR>
|
||||||
nnoremap Ls :Glgrep!<SPACE>
|
nnoremap Ls :Glgrep!<SPACE>
|
||||||
nnoremap Lt :call ToggleLocationList()<CR>
|
nnoremap Lt :call ToggleLocationList()<CR>
|
||||||
" Preview tags
|
" Preview tags
|
||||||
nnoremap pf :call quickui#tools#preview_tag('')<cr>
|
|
||||||
nnoremap pt :ptag <C-R><C-W><CR>
|
nnoremap pt :ptag <C-R><C-W><CR>
|
||||||
nnoremap [p :ptprevious<CR>
|
nnoremap [p :ptprevious<CR>
|
||||||
nnoremap ]p :ptnext<CR>
|
nnoremap ]p :ptnext<CR>
|
||||||
|
|
Loading…
Reference in a new issue