diff options
author | Bryson Steck <brysonsteck@protonmail.com> | 2023-01-25 10:47:00 -0700 |
---|---|---|
committer | Bryson Steck <brysonsteck@protonmail.com> | 2023-01-25 10:47:00 -0700 |
commit | 290247d424e6a91fa04b69a1c17ace583bd92290 (patch) | |
tree | c0454fead2a4b924c3a785e23ac9d4a66f9314e9 /vim | |
parent | 17569393a56fc8a0df3842571a81dad5087ae462 (diff) | |
download | dotfiles-290247d424e6a91fa04b69a1c17ace583bd92290.tar dotfiles-290247d424e6a91fa04b69a1c17ace583bd92290.tar.gz dotfiles-290247d424e6a91fa04b69a1c17ace583bd92290.tar.bz2 |
update some vim stuff mostly
Diffstat (limited to 'vim')
-rw-r--r-- | vim/.vimrc | 23 | ||||
-rw-r--r-- | vim/after/ftplugin/markdown.vim | 1 | ||||
-rw-r--r-- | vim/coc-settings.json | 21 |
3 files changed, 30 insertions, 15 deletions
@@ -15,6 +15,8 @@ call plug#begin() Plug 'preservim/nerdtree' Plug 'itchyny/vim-gitbranch' Plug 'tpope/vim-commentary' + Plug 'godlygeek/tabular' + Plug 'preservim/vim-markdown' call plug#end() @@ -51,6 +53,9 @@ let g:python_recommended_style = 0 let g:NERDTreeFileExtensionHighlightFullName = 1 let g:NERDTreeExactMatchHighlightFullName = 1 let g:NERDTreePatternMatchHighlightFullName = 1 +let g:org_heading_shade_leading_stars = 0 +let g:vim_markdown_folding_disabled = 1 +let g:vim_markdown_new_list_item_indent = 2 " colorscheme stuff colorscheme gruvbox @@ -90,10 +95,11 @@ autocmd BufEnter * if winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTa " Open the existing NERDTree on each new tab. autocmd BufWinEnter * if getcmdwintype() == '' | silent NERDTreeMirror | endif -" turn on spell checker for all markdown files +" turn on spell checker for certain files autocmd FileType markdown setlocal spell +autocmd FileType org setlocal spell hi clear SpellBad -hi SpellBad cterm=underline +hi SpellBad cterm=underline ctermbg=DARKRED hi clear SpellRare hi SpellRare cterm=underline hi clear SpellCap @@ -103,12 +109,17 @@ hi SpellLocal cterm=underline " Coc remaps inoremap <silent><expr> <TAB> - \ pumvisible() ? "\<C-n>" : - \ <SID>check_back_space() ? "\<TAB>" : + \ coc#pum#visible() ? coc#pum#next(1) : + \ CheckBackspace() ? "\<Tab>" : \ coc#refresh() -inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>" +inoremap <expr><S-TAB> coc#pum#visible() ? coc#pum#prev(1) : "\<C-h>" -function! s:check_back_space() abort +" Make <CR> to accept selected completion item or notify coc.nvim to format +" <C-g>u breaks current undo, please make your own choice +inoremap <silent><expr> <CR> coc#pum#visible() ? coc#pum#confirm() + \: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>" + +function! CheckBackspace() abort let col = col('.') - 1 return !col || getline('.')[col - 1] =~# '\s' endfunction diff --git a/vim/after/ftplugin/markdown.vim b/vim/after/ftplugin/markdown.vim new file mode 100644 index 0000000..beb1402 --- /dev/null +++ b/vim/after/ftplugin/markdown.vim @@ -0,0 +1 @@ +set tabstop=2 softtabstop=2 shiftwidth=2 expandtab diff --git a/vim/coc-settings.json b/vim/coc-settings.json index 0c93cc3..3fb81bc 100644 --- a/vim/coc-settings.json +++ b/vim/coc-settings.json @@ -5,17 +5,12 @@ "method": "m", "function": "" }, - "java.home": "/usr/java/jdk-17.0.1", + "java.home": "/usr/local/java/jdk-18.0.1.1", "java.configuration.runtimes": [ { - "name": "JavaSE-12", - "path": "/usr/java/jdk-12.0.2", + "name": "JavaSE-18", + "path": "/usr/local/java/jdk-18.0.1.1", "default": true - }, - - { - "name": "JavaSE-16", - "path": "/usr/java/jdk-17.0.1" } ], "java.referencesCodeLens.enabled": true, @@ -26,5 +21,13 @@ "debugAdapterPort": "13604", "logLevel": 1 }, - "java.jdt.ls.vmargs": "-noverify -Xmx6G -XX:+UseG1GC -XX:+UseStringDeduplication" + "java.jdt.ls.vmargs": "-noverify -Xmx6G -XX:+UseG1GC -XX:+UseStringDeduplication", + "languageserver": { + "csharp-ls": { + "command": "csharp-ls", + "filetypes": ["cs"], + "rootPatterns": ["*.csproj", ".vim/", ".git/", ".hg/"] + } + }, + "suggest.noselect": true } |