This commit is contained in:
Alejandro Angulo 2022-09-27 18:51:29 -07:00
parent 10a5320e47
commit 1ca96a8ef2

View file

@ -17,10 +17,27 @@
# tree-sitter (code parser) # tree-sitter (code parser)
(nvim-treesitter.withPlugins (_: pkgs.tree-sitter.allGrammars)) (nvim-treesitter.withPlugins (_: pkgs.tree-sitter.allGrammars))
# git integration
gitgutter
fugitive
rhubarb
# coc plugins
coc-json
coc-yaml
coc-pyright
# tmux integration
tmux-navigator
vim-obsession
vim-nix
# Eye candy # Eye candy
nvim-web-devicons nvim-web-devicons
# base16-vim # base16-vim
nvim-base16 nvim-base16
{ {
plugin = lualine-nvim; plugin = lualine-nvim;
type = "lua"; type = "lua";
@ -278,6 +295,18 @@
nnoremap <silent><nowait> <space>k :<C-u>CocPrev<CR> nnoremap <silent><nowait> <space>k :<C-u>CocPrev<CR>
" Resume latest coc list. " Resume latest coc list.
nnoremap <silent><nowait> <space>p :<C-u>CocListResume<CR> nnoremap <silent><nowait> <space>p :<C-u>CocListResume<CR>
''
# The below is custom and did not come from coc's README
+ ''
" GoTo code navigation.
nmap <silent> gd <Plug>(coc-definition)
nmap <silent> gs :call CocAction('jumpDefinition', 'split')<CR>
nmap <silent> gv :call CocAction('jumpDefinition', 'vsplit')<CR>
nmap <silent> gn :call CocAction('jumpDefinition', 'tabe')<CR>
nmap <silent> gy <Plug>(coc-type-definition)
nmap <silent> gi <Plug>(coc-implementation)
nmap <silent> gr <Plug>(coc-references)
''; '';
}; };
@ -291,13 +320,17 @@
syntax on syntax on
let mapleader = "`" let mapleader = "`"
" Colorscheme " Eye Candy (selects theme and sets up transparency)
if !exists('g:colors_name') || g:colors_name != 'base16-darktooth'
set background=dark
let base16colorspace=256
colorscheme base16-darktooth colorscheme base16-darktooth
hi Normal ctermbg=NONE guibg=NONE hi Normal guibg=none ctermbg=none
endif hi NormalNC guibg=NONE
hi LineNr guibg=none ctermbg=none
hi Folded guibg=none ctermbg=none
hi NonText guibg=none ctermbg=none
hi SpecialKey guibg=none ctermbg=none
hi VertSplit guibg=none ctermbg=none
hi SignColumn guibg=none ctermbg=none
hi EndOfBuffer guibg=none ctermbg=none
" Toggle relative line numbers " Toggle relative line numbers
nmap <leader>num :set invrelativenumber<CR> nmap <leader>num :set invrelativenumber<CR>
@ -307,6 +340,19 @@
nnoremap <leader>fg <cmd>lua require('telescope.builtin').live_grep()<cr> nnoremap <leader>fg <cmd>lua require('telescope.builtin').live_grep()<cr>
nnoremap <leader>fb <cmd>lua require('telescope.builtin').buffers()<cr> nnoremap <leader>fb <cmd>lua require('telescope.builtin').buffers()<cr>
nnoremap <leader>fh <cmd>lua require('telescope.builtin').help_tags()<cr> nnoremap <leader>fh <cmd>lua require('telescope.builtin').help_tags()<cr>
" coc
nnoremap <Leader>cmd :CocCommand<CR>
nnoremap <Leader>cfg :CocConfig<CR>
nnoremap <Leader>def :call CocAction('jumpDefinition')<CR>
nnoremap <Leader>fmt :call CocActionAsync('format')<CR>
" rhubarb
noremap <Leader>bro :GBrowse<CR>
" Tab completion
set wildmode=longest,list,full
set wildmenu
''; '';
}; };
} }