From 49b73220c3efcd283de094f6701b64e7271c7fbe Mon Sep 17 00:00:00 2001 From: Joey Yakimowich-Payne Date: Mon, 27 Feb 2023 11:14:37 -0700 Subject: [PATCH] Update --- .config/nvim/coc-settings.json | 1 + .config/nvim/init.vim | 41 +++++++++++++++++++++------------- .gitconfig | 4 +++- 3 files changed, 29 insertions(+), 17 deletions(-) diff --git a/.config/nvim/coc-settings.json b/.config/nvim/coc-settings.json index ac2f6fb..1d97f5a 100644 --- a/.config/nvim/coc-settings.json +++ b/.config/nvim/coc-settings.json @@ -1,4 +1,5 @@ { + "suggest.noselect": true, "languageserver": { "rescript": { "enable": true, diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 8dc2181..2954c97 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -1,7 +1,6 @@ call plug#begin('~/.local/share/nvim/plugged') -Plug 'wjsetzer/freepascal-vim' Plug 'rust-lang/rust.vim' Plug 'jyapayne/nim.vim' Plug 'tpope/vim-fugitive' @@ -16,7 +15,7 @@ Plug 'hdima/python-syntax' Plug 'hail2u/vim-css3-syntax' Plug 'mxw/vim-jsx' Plug 'ryanoasis/vim-devicons' -Plug 'tiagofumo/vim-nerdtree-syntax-highlight' +Plug 'johnstef99/vim-nerdtree-syntax-highlight' Plug 'jistr/vim-nerdtree-tabs' Plug 'mustache/vim-mustache-handlebars' Plug 'vim-scripts/errormarker.vim' @@ -54,7 +53,7 @@ Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } Plug 'junegunn/fzf.vim' Plug 'jremmen/vim-ripgrep' Plug 'rescript-lang/vim-rescript' -Plug 'neoclide/coc.nvim', {'branch': 'release'} +Plug 'neoclide/coc.nvim', {'branch': 'master', 'do': 'yarn install --frozen-lockfile'} Plug 'kassio/neoterm' Plug 'reasonml-editor/vim-reason-plus' Plug 'jyapayne/vim-code-dark' @@ -86,7 +85,10 @@ call plug#end() " map [1;5C " map [1;5D nnoremap gm m +nnoremap w let g:ale_shell="/bin/bash" +let g:lsp_log_verbose = 1 +let g:lsp_log_file = expand('/tmp/vim-lsp.log') " Live updating substitution! set inccommand=nosplit @@ -98,7 +100,7 @@ let maplocalleader = "\" let g:syntastic_c_compiler_options = "-std=c99" set guicursor= -inoremap vmark ✓ +" inoremap vmark ✓ augroup Binary au! @@ -603,16 +605,18 @@ else endif au FileType python let b:coc_root_patterns = ['.git', '.env', 'venv', '.venv', 'setup.cfg', 'setup.py', 'pyrightconfig.json', 'env'] -" Use tab for trigger completion with characters ahead and navigate. -" NOTE: Use command ':verbose imap ' to make sure tab is not mapped by -" other plugin before putting this into your config. inoremap - \ pumvisible() ? "\" : - \ check_back_space() ? "\" : + \ coc#pum#visible() ? coc#pum#next(1) : + \ CheckBackspace() ? "\" : \ coc#refresh() -inoremap pumvisible() ? "\" : "\" +inoremap coc#pum#visible() ? coc#pum#prev(1) : "\" -function! s:check_back_space() abort +" Make to accept selected completion item or notify coc.nvim to format +" u breaks current undo, please make your own choice. +inoremap coc#pum#visible() ? coc#pum#confirm() + \: "\u\\=coc#on_enter()\" + +function! CheckBackspace() abort let col = col('.') - 1 return !col || getline('.')[col - 1] =~# '\s' endfunction @@ -624,10 +628,6 @@ else inoremap coc#refresh() endif -" Make auto-select the first completion item and notify coc.nvim to -" format on enter, could be remapped by other vim plugin -inoremap pumvisible() ? coc#_select_confirm() - \: "\u\\=coc#on_enter()\" " Use `[g` and `]g` to navigate diagnostics " Use `:CocDiagnostics` to get all diagnostics of current buffer in location list. @@ -765,7 +765,12 @@ highlight SignColumn ctermbg=darkgrey guibg=#212121 " highlight TabLineFill guibg=none guifg=none gui=none " highlight TabLineSel guibg=#353535 guifg=none " highlight TabLine guibg=none guifg=none -highlight CocHighlightText ctermbg=lightblue guibg=#002c4b +highlight CocFadeOut ctermfg=lightgrey guifg=#8B8C92 +highlight CocHintVirtualText guifg=blue ctermbg=none guibg=none +highlight CocHintHighlight guifg=blue ctermbg=none guibg=none +highlight CocHintSign guifg=#647644 ctermfg=lightblue ctermbg=darkgrey guibg=#212121 +highlight CocErrorSign guifg=red ctermfg=red ctermbg=darkgrey guibg=#212121 +highlight CocInlayHint guifg=#3D7671 ctermfg=lightblue ctermbg=darkgrey guibg=none hi Normal ctermbg=none guibg=none @@ -990,3 +995,7 @@ nmap :CocCommand java.debug.vimspector.start " nnoremap :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<' " \ . synIDattr(synID(line("."),col("."),0),"name") . "> lo<" " \ . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">" + + +" Nim: replace comment above with comment below +let @t = '/^proc ?^\_[\n]## V/\_[€kb€kb€kb^\_[\n\€kb]prc€kboc m/\.} pdd' diff --git a/.gitconfig b/.gitconfig index cfdf48e..308ca9d 100644 --- a/.gitconfig +++ b/.gitconfig @@ -2,7 +2,7 @@ [user] # Please adapt and uncomment the following lines: name = Joey Yakimowich-Payne - email = jyapayne@gmail.com + email = jyapayne@pm.me [core] editor = nvim autocrlf = input @@ -21,3 +21,5 @@ # (better for interactive use) stat = !bash -c 'source $HOME/.bashrc && git diff --stat $(git merge-base HEAD \"$(git basebranch)\")' review = !nvim -p $(git files) +\"tabdo Gdiff $(git basebranch)\" +\"let g:gitgutter_diff_base = '$(git basebranch)'\" +[commit] + gpgsign = true