mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-07-20 02:34:36 +02:00
updates
This commit is contained in:
parent
86366002e2
commit
f37c162629
2 changed files with 26 additions and 2 deletions
|
@ -33,11 +33,19 @@ nnoremap <silent> K :call <SID>show_documentation()<CR>
|
|||
function! s:show_documentation()
|
||||
if (index(['vim','help'], &filetype) >= 0)
|
||||
execute 'h '.expand('<cword>')
|
||||
elseif (coc#rpc#ready())
|
||||
call CocActionAsync('doHover')
|
||||
else
|
||||
call CocAction('doHover')
|
||||
execute '!' . &keywordprg . " " . expand('<cword>')
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" set keywordprg=:call\ CocActionAsync('doHover')
|
||||
" augroup VimHelp
|
||||
" autocmd!
|
||||
" autocmd Filetype vim,help setlocal keywordprg=:help
|
||||
" augroup END
|
||||
|
||||
" Highlight the symbol and its references when holding the cursor.
|
||||
autocmd CursorHold * silent call CocActionAsync('highlight')
|
||||
|
||||
|
@ -69,6 +77,20 @@ xmap af <Plug>(coc-funcobj-a)
|
|||
omap if <Plug>(coc-funcobj-i)
|
||||
omap af <Plug>(coc-funcobj-a)
|
||||
|
||||
" Remap <C-f> and <C-b> for scroll float windows/popups.
|
||||
" Note coc#float#scroll works on neovim >= 0.4.3 or vim >= 8.2.0750
|
||||
nnoremap <nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
|
||||
nnoremap <nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
|
||||
inoremap <nowait><expr> <C-f> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(1)\<cr>" : "\<Right>"
|
||||
inoremap <nowait><expr> <C-b> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(0)\<cr>" : "\<Left>"
|
||||
|
||||
" NeoVim-only mapping for visual mode scroll
|
||||
" Useful on signatureHelp after jump placeholder of snippet expansion
|
||||
if has('nvim')
|
||||
vnoremap <nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#nvim_scroll(1, 1) : "\<C-f>"
|
||||
vnoremap <nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#nvim_scroll(0, 1) : "\<C-b>"
|
||||
endif
|
||||
|
||||
" Add `:Format` command to format current buffer.
|
||||
command! -nargs=0 Format :call CocAction('format')
|
||||
|
||||
|
@ -81,7 +103,7 @@ command! -nargs=0 OR :call CocAction('runCommand', 'editor.action.organize
|
|||
" Add (Neo)Vim's native statusline support.
|
||||
" NOTE: Please see `:h coc-status` for integrations with external plugins that
|
||||
" provide custom statusline: lightline.vim, vim-airline.
|
||||
set statusline^=%{coc#status()}%{get(b:,'coc_current_function','')}
|
||||
" set statusline^=%{coc#status()}%{get(b:,'coc_current_function','')}
|
||||
|
||||
" Mappings using CoCList:
|
||||
" Show all diagnostics.
|
||||
|
|
|
@ -111,6 +111,8 @@ call plug#begin('~/.config/nvim/autoload/plugged')
|
|||
" Debugging
|
||||
Plug 'puremourning/vimspector'
|
||||
Plug 'szw/vim-maximizer'
|
||||
" Neovim in Browser
|
||||
Plug 'glacambre/firenvim', { 'do': { _ -> firenvim#install(0) } }
|
||||
" Rainbow brackets
|
||||
" Plug 'luochen1990/rainbow'
|
||||
" Async Linting Engine
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue