From ba8df8a851288e330913be369539effa04d0d8e1 Mon Sep 17 00:00:00 2001 From: Michael Zhang Date: Wed, 6 May 2020 23:20:54 -0500 Subject: [PATCH] update --- dot_config/nvim/coc-settings.json | 3 ++ dot_config/nvim/coc.vim | 20 ++++++++ dot_config/nvim/init.vim | 81 ++++++++++++++++--------------- dot_config/nvim/nerdtree.vim | 1 + dot_config/sway/config | 2 +- 5 files changed, 68 insertions(+), 39 deletions(-) create mode 100644 dot_config/nvim/coc-settings.json create mode 100644 dot_config/nvim/coc.vim create mode 100644 dot_config/nvim/nerdtree.vim diff --git a/dot_config/nvim/coc-settings.json b/dot_config/nvim/coc-settings.json new file mode 100644 index 0000000..bfd870e --- /dev/null +++ b/dot_config/nvim/coc-settings.json @@ -0,0 +1,3 @@ +{ +} + diff --git a/dot_config/nvim/coc.vim b/dot_config/nvim/coc.vim new file mode 100644 index 0000000..9c68524 --- /dev/null +++ b/dot_config/nvim/coc.vim @@ -0,0 +1,20 @@ +set hidden +set nobackup +set nowritebackup + +set cmdheight=2 +set shortmess+=c +set signcolumn=yes + +inoremap coc#refresh() + +function! s:show_documentation() + if (index(['vim','help'], &filetype) >= 0) + execute 'h '.expand('') + else + call CocAction('doHover') + endif +endfunction + +" Binds +nnoremap K :call show_documentation() diff --git a/dot_config/nvim/init.vim b/dot_config/nvim/init.vim index 13ee650..5f6d871 100644 --- a/dot_config/nvim/init.vim +++ b/dot_config/nvim/init.vim @@ -1,30 +1,37 @@ -call plug#begin() +call plug#begin(stdpath('config') . '/plugged') + +Plug 'neoclide/coc.nvim', {'branch': 'release'} +exe 'source' (stdpath('config') . '/coc.vim') + +Plug 'preservim/nerdtree' +exe 'source' (stdpath('config') . '/nerdtree.vim') + +Plug 'tomasiser/vim-code-dark' +Plug 'ctrlpvim/ctrlp.vim' + Plug 'godlygeek/tabular' Plug 'plasticboy/vim-markdown' let g:vim_markdown_new_list_item_indent = 2 - -Plug 'editorconfig/editorconfig-vim' -Plug 'tomasiser/vim-code-dark' -Plug 'vim-airline/vim-airline' -Plug 'mhinz/vim-startify' -Plug 'ctrlpvim/ctrlp.vim' -Plug 'dense-analysis/ale' -Plug 'vim-syntastic/syntastic' -Plug 'majutsushi/tagbar' -Plug 'preservim/nerdtree' -Plug 'jiangmiao/auto-pairs' -Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } -Plug 'GutenYe/json5.vim' - -Plug 'autozimu/LanguageClient-neovim', { - \ 'branch': 'next', - \ 'do': 'bash install.sh', - \ } - -Plug 'rust-lang/rust.vim' -" Plug 'racer-rust/vim-racer' - -Plug 'idris-hackers/idris-vim' + +" Plug 'editorconfig/editorconfig-vim' +" Plug 'vim-airline/vim-airline' +" Plug 'mhinz/vim-startify' +" Plug 'dense-analysis/ale' +" Plug 'vim-syntastic/syntastic' +" Plug 'majutsushi/tagbar' +" Plug 'jiangmiao/auto-pairs' +" Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } +" Plug 'GutenYe/json5.vim' +" +" Plug 'autozimu/LanguageClient-neovim', { +" \ 'branch': 'next', +" \ 'do': 'bash install.sh', +" \ } +" +" Plug 'rust-lang/rust.vim' +" " Plug 'racer-rust/vim-racer' +" +" Plug 'idris-hackers/idris-vim' call plug#end() " General config @@ -48,21 +55,19 @@ nnoremap T :vsplitvertical resize 54terminali " Plugin-related maps nmap :TagbarToggle -map :NERDTreeToggle -let g:LanguageClient_serverCommands = { - \ 'rust': ['rust-analyzer'], - \ } -nnoremap :call LanguageClient_contextMenu() -function LC_maps() - if has_key(g:LanguageClient_serverCommands, &filetype) - nnoremap K :call LanguageClient#textDocument_hover() - nnoremap gd :call LanguageClient#textDocument_definition() - nnoremap :call LanguageClient#textDocument_rename() - endif -endfunction - -autocmd FileType * call LC_maps() +" let g:LanguageClient_serverCommands = { +" \ 'rust': ['rust-analyzer'], +" \ } +" nnoremap :call LanguageClient_contextMenu() +" function LC_maps() +" if has_key(g:LanguageClient_serverCommands, &filetype) +" nnoremap K :call LanguageClient#textDocument_hover() +" nnoremap gd :call LanguageClient#textDocument_definition() +" nnoremap :call LanguageClient#textDocument_rename() +" endif +" endfunction +" autocmd FileType * call LC_maps() " Plugin-related configs diff --git a/dot_config/nvim/nerdtree.vim b/dot_config/nvim/nerdtree.vim new file mode 100644 index 0000000..85774f3 --- /dev/null +++ b/dot_config/nvim/nerdtree.vim @@ -0,0 +1 @@ +map :NERDTreeToggle diff --git a/dot_config/sway/config b/dot_config/sway/config index 84b76b0..2831203 100644 --- a/dot_config/sway/config +++ b/dot_config/sway/config @@ -2,7 +2,7 @@ set $mod Mod4 floating_modifier $mod font pango:Roboto Mono for Powerline 11 -set $opacity 0.9 +set $opacity 0.92 for_window [class=".*"] opacity $opacity for_window [app_id=".*"] opacity $opacity