wip: feat(nvim/rust-tools): begin migration
wip: feat(nvim/rust-tools): begin migration feat(nvim/dev-icons): enable feat(nvim/nerdtree): removed feat(nvim): removed coc feat(nvim/cmp): connect rust-tools feat(nvim/dap): setup lldb feat(nvim/cmp): icons feat(nvim/dap): icons feat(nvim/rust): load crates plugin feat(nvim): switch rust-tools to rustaceanvim feat(nvim): enable inlay hints feat(nvim): cmdline completions style: nix run sys#luaformatter -- home/nvim/*.lua -i feat(nvim/nix): break once neovim hits 0.10.0 wip: feat(nvim/rust-tools): begin migration feat(nvim): removed coc
This commit is contained in:
62
init.vim
62
init.vim
@@ -5,54 +5,6 @@ set hidden
|
||||
" disable mouse
|
||||
set mouse=
|
||||
|
||||
" GoTo code navigation.
|
||||
nmap <silent> gd <Plug>(coc-definition)
|
||||
nmap <silent> gy <Plug>(coc-type-definition)
|
||||
nmap <silent> gi <Plug>(coc-implementation)
|
||||
nmap <silent> gr <Plug>(coc-references)
|
||||
|
||||
|
||||
" Rename
|
||||
nmap <leader>rn <Plug>(coc-rename)
|
||||
|
||||
" Use K to show documentation in preview window.
|
||||
nnoremap <silent> K :call ShowDocumentation()<CR>
|
||||
|
||||
nmap <leader>ac <Plug>(coc-codeaction)
|
||||
nmap <leader>as <Plug>(coc-codeaction-cursor)
|
||||
nmap <leader>cl <Plug>(coc-codelens-action)
|
||||
|
||||
nmap <silent> [G <Plug>(coc-diagnostic-next-error)
|
||||
nmap <silent> ]G <Plug>(coc-diagnostic-prev-error)
|
||||
|
||||
nmap <silent> [g <Plug>(coc-diagnostic-next)
|
||||
nmap <silent> ]g <Plug>(coc-diagnostic-prev)
|
||||
|
||||
" NERDTree config
|
||||
" autocmd VimEnter * NERDTree
|
||||
autocmd BufEnter * NERDTreeMirror
|
||||
|
||||
"CTRL-t to toggle tree view with CTRL-t
|
||||
nmap <silent> <C-t> :NERDTreeToggle<CR>
|
||||
"Set F2 to put the cursor to the nerdtree
|
||||
nmap <silent> <F2> :NERDTreeFind<CR>
|
||||
|
||||
function! ShowDocumentation()
|
||||
if CocAction('hasProvider', 'hover')
|
||||
call CocActionAsync('doHover')
|
||||
else
|
||||
call feedkeys('K', 'in')
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" Highlight the symbol and its references when holding the cursor.
|
||||
autocmd CursorHold * silent call CocActionAsync('highlight')
|
||||
|
||||
" Formatting selected code.
|
||||
xmap <leader>f <Plug>(coc-format-selected)
|
||||
nmap <leader>f <Plug>(coc-format-selected)
|
||||
nmap <leader>F <Plug>(coc-format)
|
||||
|
||||
|
||||
" " Copy to clipboard
|
||||
vnoremap <leader>y "+y
|
||||
@@ -76,9 +28,6 @@ map <leader>to :tabonly<cr>
|
||||
" Display line numbers
|
||||
set number relativenumber
|
||||
|
||||
inoremap <silent><expr> <CR> coc#pum#visible() ? coc#_select_confirm()
|
||||
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
|
||||
|
||||
map <F3> :mksession! .nvim_session <cr> " Quick write session with F3
|
||||
map <F4> :source .nvim_session <cr> " And load session with F4
|
||||
|
||||
@@ -95,17 +44,6 @@ let g:airline#extensions#tabline#enabled = 1
|
||||
let g:airline#extensions#tabline#show_tab_nr = 1
|
||||
let g:airline#extensions#tabline#tab_nr_type = 1
|
||||
|
||||
" DAP
|
||||
nnoremap <silent> <F5> <Cmd>lua require'dap'.continue()<CR>
|
||||
nnoremap <silent> <F10> <Cmd>lua require'dap'.step_over()<CR>
|
||||
nnoremap <silent> <F11> <Cmd>lua require'dap'.step_into()<CR>
|
||||
nnoremap <silent> <F12> <Cmd>lua require'dap'.step_out()<CR>
|
||||
nnoremap <silent> <Leader>b <Cmd>lua require'dap'.toggle_breakpoint()<CR>
|
||||
nnoremap <silent> <Leader>B <Cmd>lua require'dap'.set_breakpoint(vim.fn.input('Breakpoint condition: '))<CR>
|
||||
nnoremap <silent> <Leader>lp <Cmd>lua require'dap'.set_breakpoint(nil, nil, vim.fn.input('Log point message: '))<CR>
|
||||
nnoremap <silent> <Leader>dr <Cmd>lua require'dap'.repl.open()<CR>
|
||||
nnoremap <silent> <Leader>dl <Cmd>lua require'dap'.run_last()<CR>
|
||||
|
||||
|
||||
if has("autocmd")
|
||||
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
|
||||
|
Reference in New Issue
Block a user