From 3d2d166f73b7a6c9bbcae611f4fffd1d73f20862 Mon Sep 17 00:00:00 2001 From: Braydon Kains Date: Fri, 15 Apr 2022 10:22:48 -0400 Subject: [PATCH] added plugin config and coc --- .bash_aliases | 1 + .vimrc | 8 ++++++++ init.vim | 39 ++++++++++++++++++++++++++------------- 3 files changed, 35 insertions(+), 13 deletions(-) create mode 100644 .bash_aliases diff --git a/.bash_aliases b/.bash_aliases new file mode 100644 index 0000000..087d0c5 --- /dev/null +++ b/.bash_aliases @@ -0,0 +1 @@ +alias gl="git log --oneline --decorate" diff --git a/.vimrc b/.vimrc index 16811ed..66d25c6 100644 --- a/.vimrc +++ b/.vimrc @@ -133,3 +133,11 @@ autocmd Filetype markdown let b:coc_suggest_disable = 1 let g:ctrlp_map = '' let g:ctrp_custom_ignore = '\v[\/]\.(git|node_modules)$' let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files -co --exclude-standard'] + + +nmap gd (coc-definition) +nmap gy (coc-type-definition) +nmap gi (coc-implementation) +nmap gr (coc-references) +nmap rn (coc-rename) + diff --git a/init.vim b/init.vim index ce1601d..863cec1 100644 --- a/init.vim +++ b/init.vim @@ -7,7 +7,7 @@ set incsearch set relativenumber set number set encoding=utf-8 -set colorcolumn=80 +set colorcolumn=81 highlight ColorColumn ctermbg=lightgrey guibg=lightgrey set noswapfile @@ -18,6 +18,8 @@ set undofile "Tabbing set autoindent tabstop=4 shiftwidth=4 +"File specific + "************************** "Commands @@ -39,18 +41,9 @@ nnoremap fs :w nnoremap fer :source ~/.config/nvim/init.vim nnoremap r :registers:normal! "p nnoremap p :set paste! - nnoremap c "+ vnoremap c "+ -"Plugins - -"Telescope -nnoremap ff Telescope find_files -nnoremap fg Telescope live_grep -nnoremap fb Telescope buffers -nnoremap fh Telescope help_tags - "************************** " Bracket completion @@ -73,12 +66,32 @@ Plug 'tpope/vim-commentary' Plug 'tpope/vim-fugitive' Plug 'jonsmithers/vim-html-template-literals', { 'branch': 'dev' } Plug 'godlygeek/tabular' -"Plug 'neoclide/coc.nvim', { 'branch': 'release' } Plug 'plasticboy/vim-markdown' Plug 'yuezk/vim-js' -Plug 'fatih/vim-go' -" Plug 'ctrlpvim/ctrlp.vim' Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} +Plug 'neoclide/coc.nvim', { 'branch': 'release' } Plug 'nvim-lua/plenary.nvim' Plug 'nvim-telescope/telescope.nvim' call plug#end() + +"************************** +" Plugin Configs + +"Telescope +nnoremap ff Telescope find_files +nnoremap fg Telescope live_grep +nnoremap fb Telescope buffers +nnoremap fh Telescope help_tags + +"Markdown +autocmd FileType markdown set colorcolumn= + +"************************** +" COC +nmap gd (coc-definition) +nmap gy (coc-type-definition) +nmap gi (coc-implementation) +nmap gr (coc-references) +nmap rn (coc-rename) + +autocmd BufWritePre *.go :silent call CocAction('runCommand', 'editor.action.organizeImport')