This commit is contained in:
Michael Zhang 2020-05-06 23:20:54 -05:00
parent 2a2e1a2daf
commit ba8df8a851
Signed by: michael
GPG key ID: BDA47A31A3C8EE6B
5 changed files with 68 additions and 39 deletions

View file

@ -0,0 +1,3 @@
{
}

20
dot_config/nvim/coc.vim Normal file
View file

@ -0,0 +1,20 @@
set hidden
set nobackup
set nowritebackup
set cmdheight=2
set shortmess+=c
set signcolumn=yes
inoremap <silent><expr> <c-space> coc#refresh()
function! s:show_documentation()
if (index(['vim','help'], &filetype) >= 0)
execute 'h '.expand('<cword>')
else
call CocAction('doHover')
endif
endfunction
" Binds
nnoremap <silent> K :call <SID>show_documentation()<CR>

View file

@ -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 'godlygeek/tabular'
Plug 'plasticboy/vim-markdown' Plug 'plasticboy/vim-markdown'
let g:vim_markdown_new_list_item_indent = 2 let g:vim_markdown_new_list_item_indent = 2
Plug 'editorconfig/editorconfig-vim' " Plug 'editorconfig/editorconfig-vim'
Plug 'tomasiser/vim-code-dark' " Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline' " Plug 'mhinz/vim-startify'
Plug 'mhinz/vim-startify' " Plug 'dense-analysis/ale'
Plug 'ctrlpvim/ctrlp.vim' " Plug 'vim-syntastic/syntastic'
Plug 'dense-analysis/ale' " Plug 'majutsushi/tagbar'
Plug 'vim-syntastic/syntastic' " Plug 'jiangmiao/auto-pairs'
Plug 'majutsushi/tagbar' " Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
Plug 'preservim/nerdtree' " Plug 'GutenYe/json5.vim'
Plug 'jiangmiao/auto-pairs' "
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } " Plug 'autozimu/LanguageClient-neovim', {
Plug 'GutenYe/json5.vim' " \ 'branch': 'next',
" \ 'do': 'bash install.sh',
Plug 'autozimu/LanguageClient-neovim', { " \ }
\ 'branch': 'next', "
\ 'do': 'bash install.sh', " Plug 'rust-lang/rust.vim'
\ } " " Plug 'racer-rust/vim-racer'
"
Plug 'rust-lang/rust.vim' " Plug 'idris-hackers/idris-vim'
" Plug 'racer-rust/vim-racer'
Plug 'idris-hackers/idris-vim'
call plug#end() call plug#end()
" General config " General config
@ -48,21 +55,19 @@ nnoremap T :vsplit<BAR>vertical resize 54<BAR>terminal<CR>i
" Plugin-related maps " Plugin-related maps
nmap <F8> :TagbarToggle<CR> nmap <F8> :TagbarToggle<CR>
map <C-n> :NERDTreeToggle<CR>
let g:LanguageClient_serverCommands = { " let g:LanguageClient_serverCommands = {
\ 'rust': ['rust-analyzer'], " \ 'rust': ['rust-analyzer'],
\ } " \ }
nnoremap <F5> :call LanguageClient_contextMenu()<CR> " nnoremap <F5> :call LanguageClient_contextMenu()<CR>
function LC_maps() " function LC_maps()
if has_key(g:LanguageClient_serverCommands, &filetype) " if has_key(g:LanguageClient_serverCommands, &filetype)
nnoremap <buffer> <silent> K :call LanguageClient#textDocument_hover()<cr> " nnoremap <buffer> <silent> K :call LanguageClient#textDocument_hover()<cr>
nnoremap <buffer> <silent> gd :call LanguageClient#textDocument_definition()<CR> " nnoremap <buffer> <silent> gd :call LanguageClient#textDocument_definition()<CR>
nnoremap <buffer> <silent> <F2> :call LanguageClient#textDocument_rename()<CR> " nnoremap <buffer> <silent> <F2> :call LanguageClient#textDocument_rename()<CR>
endif " endif
endfunction " endfunction
" autocmd FileType * call LC_maps()
autocmd FileType * call LC_maps()
" Plugin-related configs " Plugin-related configs

View file

@ -0,0 +1 @@
map <C-n> :NERDTreeToggle<CR>

View file

@ -2,7 +2,7 @@ set $mod Mod4
floating_modifier $mod floating_modifier $mod
font pango:Roboto Mono for Powerline 11 font pango:Roboto Mono for Powerline 11
set $opacity 0.9 set $opacity 0.92
for_window [class=".*"] opacity $opacity for_window [class=".*"] opacity $opacity
for_window [app_id=".*"] opacity $opacity for_window [app_id=".*"] opacity $opacity