aboutsummaryrefslogtreecommitdiff
path: root/vim
diff options
context:
space:
mode:
authorBryson Steck <brysonsteck@protonmail.com>2023-04-02 22:20:09 -0600
committerBryson Steck <brysonsteck@protonmail.com>2023-04-02 22:20:09 -0600
commit2d1191a092a26997d3b177d1d3f3a315cdd4a38e (patch)
tree3c20759c47a3d04fc5787461a6b707437277037a /vim
parent290247d424e6a91fa04b69a1c17ace583bd92290 (diff)
downloaddotfiles-2d1191a092a26997d3b177d1d3f3a315cdd4a38e.tar
dotfiles-2d1191a092a26997d3b177d1d3f3a315cdd4a38e.tar.gz
dotfiles-2d1191a092a26997d3b177d1d3f3a315cdd4a38e.tar.bz2
another cool update
Diffstat (limited to 'vim')
-rw-r--r--vim/.vimrc52
-rw-r--r--vim/coc-settings.json45
2 files changed, 81 insertions, 16 deletions
diff --git a/vim/.vimrc b/vim/.vimrc
index cd27085..1b43457 100644
--- a/vim/.vimrc
+++ b/vim/.vimrc
@@ -8,8 +8,8 @@ call plug#begin()
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'itchyny/lightline.vim'
Plug 'jceb/vim-orgmode'
- Plug 'tpope/vim-speeddating'
- Plug 'ryanoasis/vim-devicons'
+ " Plug 'tpope/vim-speeddating'
+ Plug 'ryanoasis/vim-devicons'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'lervag/vimtex'
Plug 'preservim/nerdtree'
@@ -17,6 +17,8 @@ call plug#begin()
Plug 'tpope/vim-commentary'
Plug 'godlygeek/tabular'
Plug 'preservim/vim-markdown'
+ " Plug 'Yggdroot/indentLine'
+ Plug 'junegunn/fzf.vim'
call plug#end()
@@ -28,20 +30,23 @@ set relativenumber
set bg:dark
set mouse=a
set tabstop=2 softtabstop=2 shiftwidth=2 expandtab
+set formatoptions-=t
set linebreak
set cursorline
+" set cursorcolumn
set backspace=indent,eol,start
set laststatus=2
set wildmenu
set scrolloff=5
set incsearch
set ttimeout ttimeoutlen=25
-set showtabline=2
+" set showtabline=2
set undodir=~/.vim/undo-dir
set undofile
set backupdir=$HOME/.vim/backups
set noshowmode
set showcmd
+" set termguicolors
" set clipboard=unnamedplus
" lets
@@ -53,6 +58,7 @@ let g:python_recommended_style = 0
let g:NERDTreeFileExtensionHighlightFullName = 1
let g:NERDTreeExactMatchHighlightFullName = 1
let g:NERDTreePatternMatchHighlightFullName = 1
+let g:NERDTreeWinPos = 'right'
let g:org_heading_shade_leading_stars = 0
let g:vim_markdown_folding_disabled = 1
let g:vim_markdown_new_list_item_indent = 2
@@ -60,8 +66,18 @@ let g:vim_markdown_new_list_item_indent = 2
" colorscheme stuff
colorscheme gruvbox
-" fix colorscheme colors
+" set specific colors
hi Normal ctermbg=NONE
+hi Normal guibg=NONE
+hi CocUnderline gui=undercurl cterm=underline
+hi CocInfoHighlight cterm=underline
+hi CocErrorHighlight ctermfg=red gui=underline cterm=underline
+hi CocWarningHighlight ctermfg=yellow gui=underline cterm=underline
+hi MatchParen cterm=bold ctermfg=cyan
+
+" Custom commands
+command Fixtabs :%s/ / /g | echo 'tabs replaced with spaces (like a good programmer)'
+command Clipboard :yank + | echo 'Yanked line into system clipboard'
" remaps
nnoremap <SPACE> <Nop>
@@ -72,14 +88,17 @@ nnoremap <leader>x :wq<CR>
nnoremap <leader>b :e#<CR>
nnoremap <leader>e :e<CR>
nnoremap <leader>c gcc<CR>
+nnoremap <leader>y :noh<CR>
nnoremap <leader>u :tabp<CR>
nnoremap <leader>o :tabn<CR>
+nnoremap <leader>r :Clipboard<CR>
nnoremap <leader>h :wincmd h<CR>
nnoremap <leader>j :wincmd j<CR>
nnoremap <leader>k :wincmd k<CR>
nnoremap <leader>l :wincmd l<CR>
nnoremap <leader>n :NERDTreeFocus<CR>
nnoremap <leader>t :NERDTreeToggle<CR>
+nnoremap <leader>f :Files .<CR>
nnoremap <leader>p :wincmd p<CR>
nnoremap <leader>v :set paste! number! relativenumber!<CR>
nnoremap <leader>i :CocCommand clangd.switchSourceHeader<CR>
@@ -93,13 +112,13 @@ autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTr
" Close the tab if NERDTree is the only window remaining in it.
autocmd BufEnter * if winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif
" Open the existing NERDTree on each new tab.
-autocmd BufWinEnter * if getcmdwintype() == '' | silent NERDTreeMirror | endif
+" autocmd BufWinEnter * if getcmdwintype() == '' | silent NERDTreeMirror | endif
" turn on spell checker for certain files
autocmd FileType markdown setlocal spell
autocmd FileType org setlocal spell
hi clear SpellBad
-hi SpellBad cterm=underline ctermbg=DARKRED
+hi SpellBad cterm=underline ctermfg=red
hi clear SpellRare
hi SpellRare cterm=underline
hi clear SpellCap
@@ -124,6 +143,17 @@ function! CheckBackspace() abort
return !col || getline('.')[col - 1] =~# '\s'
endfunction
+function! HumanSize() abort
+ let l:bytes = line2byte('$') + len(getline('$'))
+ let l:sizes = ['B', 'KB', 'MB', 'GB']
+ let l:i = 0
+ while l:bytes >= 1024
+ let l:bytes = l:bytes / 1024.0
+ let l:i += 1
+ endwhile
+ return printf('%.0f%s', l:bytes, l:sizes[l:i])
+endfunction
+
" lightline config
if expand('$UID') == 0
let g:lightline = {
@@ -133,11 +163,12 @@ if expand('$UID') == 0
\ [ 'filename', 'readonly', 'modified' ],
\ [ 'gitbranch'] ],
\ 'right': [ [ 'lineinfo' ],
- \ [ 'fileformat', 'filetype' ],
+ \ [ 'filesize', 'fileformat', 'filetype' ],
\ [ 'percent' ] ]
\ },
\ 'component_function': {
- \ 'gitbranch': 'gitbranch#name'
+ \ 'gitbranch': 'gitbranch#name',
+ \ 'filesize': 'HumanSize'
\ },
\ }
let g:lightline.component = {
@@ -151,11 +182,12 @@ else
\ [ 'filename', 'readonly', 'modified' ],
\ [ 'gitbranch'] ],
\ 'right': [ [ 'lineinfo' ],
- \ [ 'fileformat', 'filetype' ],
+ \ [ 'filesize', 'fileformat', 'filetype' ],
\ [ 'percent' ] ]
\ },
\ 'component_function': {
- \ 'gitbranch': 'gitbranch#name'
+ \ 'gitbranch': 'gitbranch#name',
+ \ 'filesize': 'HumanSize'
\ },
\ }
let g:lightline.component = {
diff --git a/vim/coc-settings.json b/vim/coc-settings.json
index 3fb81bc..1d2393a 100644
--- a/vim/coc-settings.json
+++ b/vim/coc-settings.json
@@ -1,11 +1,41 @@
{
- "semanticTokens.filetypes": ["*"],
+ "semanticTokens.filetypes": ["*"],
+ "semanticTokens.enable": true,
+ "documentHighlight.priority": 2049,
+ "coc.preferences.enableMarkdown": false,
"suggest.completionItemKindLabels": {
- "text": "t",
- "method": "m",
- "function": ""
+ "text": "",
+ "method": "",
+ "function": "",
+ "constructor": "",
+ "field": "",
+ "variable": "",
+ "class": "",
+ "interface": "",
+ "module": "",
+ "property": "",
+ "unit": "",
+ "value": "",
+ "enum": "",
+ "keyword": "",
+ "snippet": "",
+ "color": "",
+ "file": "",
+ "reference": "",
+ "folder": "",
+ "enumMember": "",
+ "constant": "",
+ "struct": "",
+ "event": "",
+ "operator": "",
+ "typeParameter": "",
+ "default": ""
},
- "java.home": "/usr/local/java/jdk-18.0.1.1",
+ "diagnostic.hintSign": "",
+ "diagnostic.infoSign": "",
+ "diagnostic.errorSign": "",
+ "diagnostic.warningSign": "",
+ "java.jdt.ls.java.home": "/usr/local/java/jdk-18.0.1.1",
"java.configuration.runtimes": [
{
"name": "JavaSE-18",
@@ -16,12 +46,14 @@
"java.referencesCodeLens.enabled": true,
"java.implementationsCodeLens.enabled": true,
"java.completion.enabled": true,
+ "colors.enable": true,
"perl": {
"enable": true,
"debugAdapterPort": "13604",
"logLevel": 1
},
"java.jdt.ls.vmargs": "-noverify -Xmx6G -XX:+UseG1GC -XX:+UseStringDeduplication",
+ "java.project.referencedLibraries": ["*.jar"],
"languageserver": {
"csharp-ls": {
"command": "csharp-ls",
@@ -29,5 +61,6 @@
"rootPatterns": ["*.csproj", ".vim/", ".git/", ".hg/"]
}
},
- "suggest.noselect": true
+ "suggest.noselect": true,
+ "inlayHint.display": false
}