Compare commits
28 Commits
82303f075e
...
df043515e4
Author | SHA1 | Date | |
---|---|---|---|
df043515e4 | |||
5c3b9ee44b | |||
c41626dc50 | |||
99d793c4b0 | |||
559e9411e5 | |||
7c05e65929 | |||
4e00e225d4 | |||
3a44fa1e48 | |||
96ff72433d | |||
837aa12f9f | |||
41a0658cf2 | |||
3a2337cd63 | |||
ecd8659df7 | |||
d6106bac84 | |||
873acacaa6 | |||
c284486540 | |||
587aeef5d7 | |||
c67f11a8f5 | |||
cef963d805 | |||
dc6a8b0032 | |||
9a1b1ed2fc | |||
bee751201d | |||
eb1a4a71d8 | |||
bf6deaf1ed | |||
8a2ca8c53f | |||
824aeb431a | |||
4a99f582f3 | |||
3b3121aa28 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,3 +2,4 @@ local.vim
|
|||||||
.netrwhist
|
.netrwhist
|
||||||
pack/*
|
pack/*
|
||||||
spell/*
|
spell/*
|
||||||
|
*.pyc
|
||||||
|
@ -9,11 +9,7 @@ setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:///,://
|
|||||||
setlocal commentstring=//%s
|
setlocal commentstring=//%s
|
||||||
" Stop automatic new lines which typing long single liners.
|
" Stop automatic new lines which typing long single liners.
|
||||||
setlocal textwidth=0
|
setlocal textwidth=0
|
||||||
" Map K to get YouCompleteMe documentation.
|
|
||||||
nnoremap K :YcmCompleter GetDoc<CR>
|
|
||||||
" "ys{motion}t" turns "word" -> "TODO(word):"
|
" "ys{motion}t" turns "word" -> "TODO(word):"
|
||||||
let b:surround_{char2nr("t")} = "TODO(\r):"
|
let b:surround_{char2nr("t")} = "TODO(\r):"
|
||||||
" "ys{motion}/" turns "text" into "/*text*/"
|
" "ys{motion}/" turns "text" into "/*text*/"
|
||||||
let b:surround_{char2nr("/")} = "/*\r*/"
|
let b:surround_{char2nr("/")} = "/*\r*/"
|
||||||
" Map K to get YouCompleteMe documentation.
|
|
||||||
nnoremap K :YcmCompleter GetDoc<CR>
|
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
" Add omnifunc completion plugin.
|
|
||||||
packadd vim-cmake-completion
|
|
||||||
|
|
||||||
" Enable syntax folding, see .vim/after/syntax/cmake.vim
|
" Enable syntax folding, see .vim/after/syntax/cmake.vim
|
||||||
setlocal foldmethod=syntax
|
setlocal foldmethod=syntax
|
||||||
" Set comment string
|
" Set comment string
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
" Add Doxygen documentation generation plugin.
|
" Add Doxygen documentation generation plugin.
|
||||||
packadd DoxygenToolkit.vim
|
packadd DoxygenToolkit.vim
|
||||||
nnoremap <leader>d :Dox<CR>
|
nnoremap <leader>d :Dox<CR>
|
||||||
" Map K to get YouCompleteMe documentation
|
|
||||||
nnoremap K :YcmCompleter GetDoc<CR>
|
|
||||||
|
@ -5,4 +5,4 @@ setlocal nospell
|
|||||||
setlocal scrolloff=0
|
setlocal scrolloff=0
|
||||||
|
|
||||||
" Don't display line numbers
|
" Don't display line numbers
|
||||||
setlocal nonumber norelativenumber
|
setlocal nonumber norelativenumber signcolumn=no
|
||||||
|
2
after/ftplugin/man.vim
Normal file
2
after/ftplugin/man.vim
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
setlocal showbreak=
|
||||||
|
set signcolumn=no
|
@ -25,6 +25,3 @@ setlocal encoding=utf-8
|
|||||||
" Set up file format
|
" Set up file format
|
||||||
setlocal fileformat=unix
|
setlocal fileformat=unix
|
||||||
let g:python_highlight_all=1
|
let g:python_highlight_all=1
|
||||||
|
|
||||||
" Mappings
|
|
||||||
nnoremap K :YcmCompleter GetDoc<CR>
|
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
" Add omnifunc completion package.
|
" Add omnifunc completion package.
|
||||||
packadd vimomni
|
packadd vimomni
|
||||||
|
|
||||||
" Mapping for Vim help of the word under cursor.
|
|
||||||
nnoremap K :help <C-r><C-w><CR>
|
|
||||||
|
|
||||||
" Set custom fold expression
|
" Set custom fold expression
|
||||||
setlocal foldmethod=expr
|
setlocal foldmethod=expr
|
||||||
setlocal foldexpr=VimFold(v:lnum)
|
setlocal foldexpr=VimFold(v:lnum)
|
||||||
|
7
after/syntax/yaml.vim
Normal file
7
after/syntax/yaml.vim
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
setlocal tabstop=2
|
||||||
|
setlocal shiftwidth=2
|
||||||
|
setlocal softtabstop=2
|
||||||
|
|
||||||
|
highlight link yamlBlockMappingKey Keyword
|
||||||
|
highlight link yamlAnchor PreProc
|
||||||
|
highlight link yamlAlias PreProc
|
@ -1,73 +0,0 @@
|
|||||||
" fresh palette
|
|
||||||
let g:airline#themes#fresh#palette = {}
|
|
||||||
|
|
||||||
" NORMAL mode
|
|
||||||
let s:N1 = ['#005f00', '#afdf00', 22, 148, '']
|
|
||||||
let s:N2 = ['#ffffff', '#005f00', 15, 22, '']
|
|
||||||
let s:N3 = ['#ffffff', '#121212', 15, 233, 'bold']
|
|
||||||
let s:W = ['#000000', '#8700df', 232, 92, '']
|
|
||||||
let s:E = ['#000000', '#990000', 232, 160]
|
|
||||||
let g:airline#themes#fresh#palette.normal =
|
|
||||||
\ airline#themes#generate_color_map(s:N1, s:N2, s:N3)
|
|
||||||
let g:airline#themes#fresh#palette.normal.airline_warning = s:W
|
|
||||||
let g:airline#themes#fresh#palette.normal.airline_error = s:E
|
|
||||||
let g:airline#themes#fresh#palette.normal_modified = {
|
|
||||||
\ 'airline_c': ['#ffffff', '#5f0087', 15, 53, 'bold'], }
|
|
||||||
|
|
||||||
" INSERT mode
|
|
||||||
let s:I1 = ['#0000df', '#00dfff', 20, 45, '']
|
|
||||||
let s:I2 = ['#ffffff', '#005fdf', 15, 26, '']
|
|
||||||
let s:I3 = ['#ffffff', '#121212', 15, 233, 'bold']
|
|
||||||
let g:airline#themes#fresh#palette.insert =
|
|
||||||
\ airline#themes#generate_color_map(s:I1, s:I2, s:I3)
|
|
||||||
let g:airline#themes#fresh#palette.insert.airline_warning = s:W
|
|
||||||
let g:airline#themes#fresh#palette.insert.airline_error = s:E
|
|
||||||
let g:airline#themes#fresh#palette.insert_modified =
|
|
||||||
\ g:airline#themes#fresh#palette.normal_modified
|
|
||||||
let g:airline#themes#fresh#palette.insert_paste = {
|
|
||||||
\ 'airline_a': [s:I1[0], '#ffff00', s:I1[2], 11, ''], }
|
|
||||||
|
|
||||||
" REPLACE mode
|
|
||||||
let s:R1 = [s:I2[0], '#af0000', s:I2[2], 124, '']
|
|
||||||
let s:R2 = ['#ffffff', '#5f0000', 15, 52, '']
|
|
||||||
let s:R3 = ['#ffffff', '#121212', 15, 233, 'bold']
|
|
||||||
let g:airline#themes#fresh#palette.replace =
|
|
||||||
\ airline#themes#generate_color_map(s:R1, s:R2, s:R3)
|
|
||||||
let g:airline#themes#fresh#palette.replace.airline_warning = s:W
|
|
||||||
let g:airline#themes#fresh#palette.replace.airline_error = s:E
|
|
||||||
let g:airline#themes#fresh#palette.replace_modified =
|
|
||||||
\ g:airline#themes#fresh#palette.normal_modified
|
|
||||||
|
|
||||||
" VISAUL mode
|
|
||||||
let s:V1 = ['#ff5f00', '#ff5f00', 52, 208, '']
|
|
||||||
let s:V2 = ['#ffffff', '#005f00', 15, 124, '']
|
|
||||||
let s:V3 = ['#ffffff', '#121212', 15, 233, 'bold']
|
|
||||||
let g:airline#themes#fresh#palette.visual =
|
|
||||||
\ airline#themes#generate_color_map(s:V1, s:V2, s:V3)
|
|
||||||
let g:airline#themes#fresh#palette.visual.airline_warning = s:W
|
|
||||||
let g:airline#themes#fresh#palette.visual.airline_error = s:E
|
|
||||||
let g:airline#themes#fresh#palette.visual_modified =
|
|
||||||
\ g:airline#themes#fresh#palette.normal_modified
|
|
||||||
|
|
||||||
" INACTIVE mode
|
|
||||||
let s:IA1 = ['#4e4e4e', '#1c1c1c', 239, 234, '']
|
|
||||||
let s:IA2 = ['#4e4e4e', '#262626', 239, 235, '']
|
|
||||||
let s:IA3 = ['#ffffff', '#121212', 15, 233, 'bold']
|
|
||||||
let g:airline#themes#fresh#palette.inactive =
|
|
||||||
\ airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3)
|
|
||||||
let g:airline#themes#fresh#palette.inactive.airline_warning = s:IA2
|
|
||||||
let g:airline#themes#fresh#palette.inactive.airline_error = s:IA2
|
|
||||||
let g:airline#themes#fresh#palette.inactive_modified = {
|
|
||||||
\ 'airline_c': ['#875faf', '', 97, '', ''], }
|
|
||||||
|
|
||||||
let g:airline#themes#fresh#palette.accents = {
|
|
||||||
\ 'red': [ '#ff0000' , '' , 160 , '' ] }
|
|
||||||
|
|
||||||
if !get(g:, 'loaded_ctrlp', 0)
|
|
||||||
finish
|
|
||||||
endif
|
|
||||||
let g:airline#themes#fresh#palette.ctrlp =
|
|
||||||
\ airline#extensions#ctrlp#generate_color_map(
|
|
||||||
\ ['#d7d7ff', '#5f00af', 189, 55, ''],
|
|
||||||
\ ['#ffffff', '#875fd7', 231, 98, ''],
|
|
||||||
\ ['#5f00af', '#ffffff', 55, 231, 'bold'] )
|
|
@ -37,8 +37,16 @@ function! build#dir(...) abort
|
|||||||
if exists('l:dir')
|
if exists('l:dir')
|
||||||
" Set build directory and restart YouCompleteMe.
|
" Set build directory and restart YouCompleteMe.
|
||||||
let $BUILD_DIR = getcwd().'/'.substitute(l:dir, '\/$', '', '')
|
let $BUILD_DIR = getcwd().'/'.substitute(l:dir, '\/$', '', '')
|
||||||
let g:ycm_clangd_args = ['--compile-commands-dir='.$BUILD_DIR]
|
let l:coc_settings = {}
|
||||||
YcmRestartServer
|
if isdirectory('.vim')
|
||||||
|
let l:coc_settings = json_decode(join(readfile('.vim/coc-settings.json'), ''))
|
||||||
|
else
|
||||||
|
call mkdir('.vim')
|
||||||
|
endif
|
||||||
|
let l:coc_settings['clangd.compilationDatabasePath'] = $BUILD_DIR
|
||||||
|
let l:coc_settings['cmake.lsp.buildDirectory'] = $BUILD_DIR
|
||||||
|
call writefile([json_encode(l:coc_settings)], '.vim/coc-settings.json')
|
||||||
|
CocRestart
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
@ -100,3 +100,14 @@ endfunction
|
|||||||
" A sink for mappings to do nothing
|
" A sink for mappings to do nothing
|
||||||
function! do#sink() abort
|
function! do#sink() abort
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
" Used by normal mode K mapping to show documentation
|
||||||
|
function! do#show_documentation()
|
||||||
|
if index(['vim','help'], &filetype) >= 0
|
||||||
|
execute 'help '.expand('<cword>')
|
||||||
|
elseif coc#rpc#ready() " TODO: Check if the LS supports doHover
|
||||||
|
call CocActionAsync('doHover')
|
||||||
|
else
|
||||||
|
execute '!'.&keywordprg.' '.expand('<cword>')
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
14
autoload/format.vim
Normal file
14
autoload/format.vim
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
if !has('pythonx')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
" set debug=msg,throw
|
||||||
|
pythonx import format
|
||||||
|
|
||||||
|
function! format#clang_format() abort
|
||||||
|
pythonx format.clang_format()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! format#yapf() abort
|
||||||
|
pythonx format.yapf()
|
||||||
|
endfunction
|
27
autoload/osc52.vim
Normal file
27
autoload/osc52.vim
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
" Use the OSC 52 escape sequence to copy text to the local system clipboard
|
||||||
|
" when connected to a remote machine.
|
||||||
|
|
||||||
|
" Add an autocmd to run after text is yanked.
|
||||||
|
function! osc52#autocmd()
|
||||||
|
augroup osc52
|
||||||
|
autocmd!
|
||||||
|
autocmd TextYankPost * call osc52#copy()
|
||||||
|
augroup END
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! osc52#copy()
|
||||||
|
" Only use OSC 52 when text is yanked with the z register.
|
||||||
|
if v:event['regname'] ==# 'z'
|
||||||
|
" Get the register contents and join the list into a string.
|
||||||
|
let l:content = join(v:event['regcontents'], "\n")
|
||||||
|
if v:event['regtype'] ==# 'V'
|
||||||
|
" Append a new line in linewise-visual mode to avoid surprises.
|
||||||
|
let l:content = l:content."\n"
|
||||||
|
endif
|
||||||
|
" Get the parent tty while being compatible with vim and neovim, originally
|
||||||
|
" from https://github.com/greymd/oscyank.vim
|
||||||
|
let l:tty = system('(tty || tty < /proc/$PPID/fd/0) 2> /dev/null | grep /dev/')
|
||||||
|
" Base 64 encode the content, and print OSC 52 escape sequence to the tty.
|
||||||
|
call system('base64 | xargs -0 printf "\\033]52;c;%s\\a" > '.l:tty, l:content)
|
||||||
|
endif
|
||||||
|
endfunction
|
1
coc-settings.json
Normal file
1
coc-settings.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"cmake.lsp.enable": true}
|
@ -112,7 +112,7 @@ if has('gui_running') || &t_Co == 256
|
|||||||
call s:hi('MatchParen', '', '', '')
|
call s:hi('MatchParen', '', '', '')
|
||||||
call s:hi('ModeMsg', '', '', '')
|
call s:hi('ModeMsg', '', '', '')
|
||||||
call s:hi('MoreMsg', '12', '', '')
|
call s:hi('MoreMsg', '12', '', '')
|
||||||
call s:hi('NonText', '', '', '')
|
call s:hi('NonText', '238', '', '')
|
||||||
call s:hi('Normal', '7', '232', '')
|
call s:hi('Normal', '7', '232', '')
|
||||||
call s:hi('Pmenu', '', '235', '')
|
call s:hi('Pmenu', '', '235', '')
|
||||||
call s:hi('PmenuSel', '', '', 'reverse')
|
call s:hi('PmenuSel', '', '', 'reverse')
|
||||||
|
3
ftplugin/c.vim
Normal file
3
ftplugin/c.vim
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
if has('pythonx')
|
||||||
|
set formatexpr=format#clang_format()
|
||||||
|
endif
|
3
ftplugin/cpp.vim
Normal file
3
ftplugin/cpp.vim
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
if has('pythonx')
|
||||||
|
set formatexpr=format#clang_format()
|
||||||
|
endif
|
3
ftplugin/java.vim
Normal file
3
ftplugin/java.vim
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
if has('pythonx')
|
||||||
|
set formatexpr=format#clang_format()
|
||||||
|
endif
|
3
ftplugin/javascript.vim
Normal file
3
ftplugin/javascript.vim
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
if has('pythonx')
|
||||||
|
set formatexpr=format#clang_format()
|
||||||
|
endif
|
3
ftplugin/objc.vim
Normal file
3
ftplugin/objc.vim
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
if has('pythonx')
|
||||||
|
set formatexpr=format#clang_format()
|
||||||
|
endif
|
3
ftplugin/objcpp.vim
Normal file
3
ftplugin/objcpp.vim
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
if has('pythonx')
|
||||||
|
set formatexpr=format#clang_format()
|
||||||
|
endif
|
3
ftplugin/proto.vim
Normal file
3
ftplugin/proto.vim
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
if has('pythonx')
|
||||||
|
set formatexpr=format#clang_format()
|
||||||
|
endif
|
3
ftplugin/python.vim
Normal file
3
ftplugin/python.vim
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
if has('pythonx')
|
||||||
|
set formatexpr=format#yapf()
|
||||||
|
endif
|
@ -1,7 +1,7 @@
|
|||||||
augroup benieAugroup
|
augroup benieAugroup
|
||||||
autocmd!
|
autocmd!
|
||||||
|
|
||||||
if $TMUX !=# ''
|
if tmux#inSession()
|
||||||
" [Un]set tmux window option to detect when to change pane.
|
" [Un]set tmux window option to detect when to change pane.
|
||||||
call tmux#setNavigationFlag()
|
call tmux#setNavigationFlag()
|
||||||
au FocusGained * silent call tmux#setNavigationFlag()
|
au FocusGained * silent call tmux#setNavigationFlag()
|
||||||
@ -28,4 +28,22 @@ augroup benieAugroup
|
|||||||
|
|
||||||
" Augment vim-signify by modifying it's autocmds
|
" Augment vim-signify by modifying it's autocmds
|
||||||
au User SignifyAutocmds call do#signify()
|
au User SignifyAutocmds call do#signify()
|
||||||
|
|
||||||
|
if has('nvim')
|
||||||
|
" Start in terminal-insert mode.
|
||||||
|
autocmd TermOpen term://* startinsert
|
||||||
|
" Don't show the line number column in terminal-insert mode.
|
||||||
|
autocmd TermEnter term://*
|
||||||
|
\ set nonumber | set norelativenumber | set signcolumn=no
|
||||||
|
" But do show the line number column in terminal-normal mode.
|
||||||
|
autocmd TermLeave term://*
|
||||||
|
\ set number | set relativenumber | set signcolumn=auto
|
||||||
|
" Automatically press enter when the terminal process exits.
|
||||||
|
autocmd TermClose term://*
|
||||||
|
\ if (expand('<afile>') !~ "fzf") &&
|
||||||
|
\ (expand('<afile>') !~ "ranger") &&
|
||||||
|
\ (expand('<afile>') !~ "coc") |
|
||||||
|
\ call nvim_input('<CR>') |
|
||||||
|
\ endif
|
||||||
|
endif
|
||||||
augroup END
|
augroup END
|
||||||
|
8
plugin/format.vim
Normal file
8
plugin/format.vim
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
if !has('pythonx')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
let g:clang_format_path = get(g:, 'clang_format_path', 'clang-format')
|
||||||
|
let g:clang_format_style = get(g:, 'clang_format_style', 'google')
|
||||||
|
let g:yapf_path = get(g:, 'yapf_path', 'yapf')
|
||||||
|
let g:yapf_style = get(g:, 'yapf_style', 'pep8')
|
@ -1,9 +1,15 @@
|
|||||||
" YouCompleteMe
|
" coc.nvim
|
||||||
nnoremap <leader>fi :YcmCompleter FixIt<CR>
|
nmap <silent> <leader>fi <Plug>(coc-fix-current)
|
||||||
nnoremap <leader>gd :YcmCompleter GoTo<CR>
|
nmap <silent> <leader>gd <Plug>(coc-definition)
|
||||||
nnoremap <leader>gt :YcmCompleter GetType<CR>
|
nmap <silent> <leader>gt <Plug>(coc-type-definition)
|
||||||
nnoremap <leader>sd :YcmShowDetailedDiagnostic<CR>
|
nmap <silent> <leader>sd <Plug>(coc-diagnostic-info)
|
||||||
nnoremap <leader>D <plug>(YCMHover)
|
nmap <silent> <leader>gr <Plug>(coc-references)
|
||||||
|
nmap <silent> K :call do#show_documentation()<CR>
|
||||||
|
|
||||||
|
if has('nvim')
|
||||||
|
" Make nvim :terminal more like vim :terminal
|
||||||
|
tnoremap <C-w>N <C-\><C-n>
|
||||||
|
endif
|
||||||
|
|
||||||
" termdebug
|
" termdebug
|
||||||
" TODO: Detecet if termdebug is loaded, if not do the default action.
|
" TODO: Detecet if termdebug is loaded, if not do the default action.
|
||||||
@ -59,14 +65,26 @@ nnoremap k gk
|
|||||||
" Quick write
|
" Quick write
|
||||||
nnoremap <leader>w :w!<CR>
|
nnoremap <leader>w :w!<CR>
|
||||||
|
|
||||||
" Switch panes
|
" Switch panes in a tmux aware way
|
||||||
nnoremap <C-h> <C-w>h
|
nnoremap <silent> <C-h> :TmuxNavigateLeft<CR>
|
||||||
nnoremap <C-j> <C-w>j
|
nnoremap <silent> <C-j> :TmuxNavigateDown<CR>
|
||||||
nnoremap <C-k> <C-w>k
|
nnoremap <silent> <C-k> :TmuxNavigateUp<CR>
|
||||||
nnoremap <C-l> <C-w>l
|
nnoremap <silent> <C-l> :TmuxNavigateRight<CR>
|
||||||
|
nnoremap <silent> <C-w>h :TmuxNavigateLeft<CR>
|
||||||
" Redraw window
|
nnoremap <silent> <C-w>j :TmuxNavigateDown<CR>
|
||||||
nnoremap <C-w>l <C-l>
|
nnoremap <silent> <C-w>k :TmuxNavigateUp<CR>
|
||||||
|
nnoremap <silent> <C-w>l :TmuxNavigateRight<CR>
|
||||||
|
if has('nvim')
|
||||||
|
tnoremap <silent> <C-w>h <C-\><C-n>:TmuxNavigateLeft<CR>
|
||||||
|
tnoremap <silent> <C-w>j <C-\><C-n>:TmuxNavigateDown<CR>
|
||||||
|
tnoremap <silent> <C-w>k <C-\><C-n>:TmuxNavigateUp<CR>
|
||||||
|
tnoremap <silent> <C-w>l <C-\><C-n>:TmuxNavigateRight<CR>
|
||||||
|
else
|
||||||
|
tnoremap <silent> <C-w>h <C-w>N:TmuxNavigateLeft<CR>
|
||||||
|
tnoremap <silent> <C-w>j <C-w>N:TmuxNavigateDown<CR>
|
||||||
|
tnoremap <silent> <C-w>k <C-w>N:TmuxNavigateUp<CR>
|
||||||
|
tnoremap <silent> <C-w>l <C-w>N:TmuxNavigateRight<CR>
|
||||||
|
endif
|
||||||
|
|
||||||
" Quick tabs
|
" Quick tabs
|
||||||
nnoremap <leader>tn :tabnew<Space>
|
nnoremap <leader>tn :tabnew<Space>
|
||||||
@ -77,8 +95,14 @@ nnoremap <leader>tm :tabmove<Space>
|
|||||||
" Clear search highlights
|
" Clear search highlights
|
||||||
nnoremap <leader><Space> :nohlsearch<CR>
|
nnoremap <leader><Space> :nohlsearch<CR>
|
||||||
|
|
||||||
if exists('loaded_oscyank')
|
if tmux#isOption('set-clipboard', 'on') || $SSH_CONNECTION !=# ''
|
||||||
noremap <leader>y :Oscyank<CR>
|
" When connected to a remote session the + selection register is not
|
||||||
|
" available and the unnamed register is used instead. Add mappings using the
|
||||||
|
" z register instead.
|
||||||
|
noremap <leader>y "zy
|
||||||
|
noremap <leader>Y "zY
|
||||||
|
" Enable OSC 52 copy on yank.
|
||||||
|
call osc52#autocmd()
|
||||||
else
|
else
|
||||||
" System clipboard yank/put
|
" System clipboard yank/put
|
||||||
noremap <leader>y "+y
|
noremap <leader>y "+y
|
||||||
@ -93,8 +117,6 @@ nnoremap <C-s> i<C-g>u<C-X>s
|
|||||||
|
|
||||||
" Disable 'Q' from opening Ex mode
|
" Disable 'Q' from opening Ex mode
|
||||||
nnoremap Q <nop>
|
nnoremap Q <nop>
|
||||||
" Disable 'K' from loading man pages
|
|
||||||
noremap K <nop>
|
|
||||||
|
|
||||||
" Split line at the cursor
|
" Split line at the cursor
|
||||||
nnoremap [j i<CR><Esc>
|
nnoremap [j i<CR><Esc>
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
" TODO: Move these settings to vimrc when after switching to vim8 packages
|
|
||||||
scriptencoding 'utf-8'
|
|
||||||
|
|
||||||
" Copy indent from current line
|
" Copy indent from current line
|
||||||
set autoindent
|
set autoindent
|
||||||
|
|
||||||
@ -16,12 +13,6 @@ if !has('nvim') && &ttimeoutlen == -1
|
|||||||
set ttimeoutlen=100
|
set ttimeoutlen=100
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" TODO: These might be irrelevant with vim-airline
|
|
||||||
" Show 2 line status
|
|
||||||
set laststatus=2
|
|
||||||
" Show the line and colum number of a cursor position
|
|
||||||
set ruler
|
|
||||||
|
|
||||||
" Enhanced command line completion
|
" Enhanced command line completion
|
||||||
set wildmenu
|
set wildmenu
|
||||||
" Command line history
|
" Command line history
|
||||||
@ -68,8 +59,6 @@ if has('linebreak')
|
|||||||
set linebreak
|
set linebreak
|
||||||
" Downwards Arrow With Tip Rightwards (U+21B3, utf-8: E2 86 B3)
|
" Downwards Arrow With Tip Rightwards (U+21B3, utf-8: E2 86 B3)
|
||||||
let &showbreak='↳ '
|
let &showbreak='↳ '
|
||||||
" Use same highlight group as listchars for showbreak
|
|
||||||
set highlight+=@:SpecialKey
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" TODO: spellcapcheck
|
" TODO: spellcapcheck
|
||||||
@ -96,7 +85,6 @@ if exists('+relativenumber')
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
" Keep cursor from buffer edges
|
" Keep cursor from buffer edges
|
||||||
set scrolloff=8
|
|
||||||
set sidescrolloff=5
|
set sidescrolloff=5
|
||||||
|
|
||||||
" Turn backup off
|
" Turn backup off
|
||||||
@ -164,7 +152,11 @@ set formatoptions+=rq
|
|||||||
|
|
||||||
" Always show the signcolum
|
" Always show the signcolum
|
||||||
if exists('&signcolumn')
|
if exists('&signcolumn')
|
||||||
|
try
|
||||||
|
set signcolumn=number
|
||||||
|
catch /E474/
|
||||||
set signcolumn=yes
|
set signcolumn=yes
|
||||||
|
endtry
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Enable modeline
|
" Enable modeline
|
||||||
|
174
plugin/statusline.vim
Normal file
174
plugin/statusline.vim
Normal file
@ -0,0 +1,174 @@
|
|||||||
|
" Show the statusline above the commandline.
|
||||||
|
scriptencoding utf-8
|
||||||
|
set laststatus=2
|
||||||
|
|
||||||
|
" Define color variables.
|
||||||
|
let g:statusline#light_green = {'fg': ['235', '#080808'], 'bg': [ '35', '#0087ff']}
|
||||||
|
let g:statusline#light_blue = {'fg': ['235', '#080808'], 'bg': [ '33', '#0087ff']}
|
||||||
|
let g:statusline#light_orange = {'fg': ['235', '#080808'], 'bg': ['209', '#eb754d']}
|
||||||
|
let g:statusline#light_red = {'fg': ['235', '#080808'], 'bg': ['124', '#af0000']}
|
||||||
|
let g:statusline#light_grey = {'fg': ['250', '#bcbcbc'], 'bg': ['236', '#303030']}
|
||||||
|
let g:statusline#light_violet = {'fg': ['235', '#080808'], 'bg': [ '99', '#986fec']}
|
||||||
|
let g:statusline#dark_white = {'fg': [ '15', '#ffffff'], 'bg': ['233', '#121212']}
|
||||||
|
let g:statusline#dark_yellow = {'fg': ['179', '#dfaf5f'], 'bg': ['233', '#121212']}
|
||||||
|
let g:statusline#dark_grey = {'fg': ['244', '#808080'], 'bg': ['233', '#121212']}
|
||||||
|
|
||||||
|
" Create highlight groups.
|
||||||
|
function! s:hi(group, color) abort
|
||||||
|
execute 'highlight '.a:group
|
||||||
|
\.' ctermfg='.a:color['fg'][0].' ctermbg='.a:color['bg'][0]
|
||||||
|
\.' guifg='.a:color['fg'][1].' guibg='.a:color['fg'][1]
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" StatusLineLight is shows the mode and cursor information, it is dynamically
|
||||||
|
" changed by statusline#mode(), give it a default.
|
||||||
|
call s:hi('StatusLineLight', g:statusline#light_grey)
|
||||||
|
" StatusLineDusk is shows additional information which is not always present,
|
||||||
|
" give it a muted color.
|
||||||
|
call s:hi('StatusLineDusk', g:statusline#light_grey)
|
||||||
|
" StatusLineDark shows the filename and filetype and takes up most of the
|
||||||
|
" statusline, give it a dark background.
|
||||||
|
call s:hi('StatusLineDark', g:statusline#dark_white)
|
||||||
|
" StatusLineChange shows changes in the file by changing the colour of the
|
||||||
|
" filename, give if a dark background.
|
||||||
|
call s:hi('StatusLineChange', g:statusline#dark_yellow)
|
||||||
|
" StatusLineFade shows the status of completion engines but using colors which
|
||||||
|
" fade into the background to avoid grabbing attention.
|
||||||
|
call s:hi('StatusLineDuskFade', g:statusline#dark_grey)
|
||||||
|
|
||||||
|
" Construct a statusline for special buffer types.
|
||||||
|
function! statusline#special(group, name, title)
|
||||||
|
" Display current mode with dynamic highlights.
|
||||||
|
let l:mode = '%#'.a:group.'# '.a:name.' '
|
||||||
|
" Display filename with dark highlights.
|
||||||
|
let l:file = '%#StatusLineDark# '.a:title
|
||||||
|
" Display current/total lines and column with dynamic highlights.
|
||||||
|
let l:line = '%#'.a:group.'# ☰ %l/%L ㏑%2c '
|
||||||
|
" Combine the elements into a single string to be evaluated.
|
||||||
|
return l:mode.l:file.'%='.l:line
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Construct a statusline for generic buffer types.
|
||||||
|
function! statusline#generic(group, mode)
|
||||||
|
" Display current mode with dynamic highlights.
|
||||||
|
let l:mode = '%#'.a:group.'# '.a:mode.' '
|
||||||
|
" Display spell or paste if set with dusk highlights in a group to swallow
|
||||||
|
" the spaces when empty.
|
||||||
|
let l:edit = '%#StatusLineDusk#%( '
|
||||||
|
\.'%{&spell ? "Spell " : ""}'
|
||||||
|
\.'%{&paste ? "Paste " : ""}'
|
||||||
|
\.'%)'
|
||||||
|
" Display filename with dark or changed highlights.
|
||||||
|
let l:file = (&modified ? '%#StatusLineChange#' : '%#StatusLineDark#').' %f'
|
||||||
|
" Display readonly and nomodifiable if set.
|
||||||
|
let l:state = '%#StatusLineDark#'
|
||||||
|
\.'%{&readonly ? " 🔒" : ""}'
|
||||||
|
\.'%{&modifiable ? "" : " ⛔"}'
|
||||||
|
if exists('*coc#status')
|
||||||
|
" Display coc.nvim status.
|
||||||
|
let l:coc = '%#StatusLineDuskFade#%( %{coc#status()}%)'
|
||||||
|
else
|
||||||
|
let l:coc = ''
|
||||||
|
endif
|
||||||
|
" Display filetype if set.
|
||||||
|
let l:type = '%#StatusLineDark# %{&filetype} '
|
||||||
|
" Display fileencoding if not utf-8 and fileformat if not unix with dusk
|
||||||
|
" highlights in a group to swallow spaces when empty.
|
||||||
|
let l:format = '%#StatusLineDusk#%( '
|
||||||
|
\.'%{&fileencoding ==# "utf-8" ? "" : &fileencoding}'
|
||||||
|
\.'%{&fileformat ==# "unix" ? "" : "[".&fileformat."]"}'
|
||||||
|
\.' %)'
|
||||||
|
" Display current/total lines and column with dynamic highlights.
|
||||||
|
let l:line = '%#'.a:group.'# ☰ %l/%L ㏑%2c '
|
||||||
|
" Combine the elements into a single string to be evaluated.
|
||||||
|
return l:mode.l:edit.l:file.l:state.l:coc.'%='.l:type.l:format.l:line
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Define active statusline, this statusline is dynamic with StatusLineLight
|
||||||
|
" being updated based on the current mode and only used for current buffer.
|
||||||
|
function! statusline#active()
|
||||||
|
let l:mode = statusline#mode()
|
||||||
|
if &buftype ==# 'help'
|
||||||
|
if l:mode ==# 'Normal'
|
||||||
|
let l:mode = 'Help'
|
||||||
|
endif
|
||||||
|
return statusline#special('StatusLineLight', l:mode, '%F')
|
||||||
|
elseif &buftype ==# 'quickfix'
|
||||||
|
" Quickfix list and location list have the same buftype, the window has a
|
||||||
|
" loclist flag, query the window info.
|
||||||
|
let l:info = getwininfo(win_getid())[0]
|
||||||
|
if l:mode ==# 'Normal'
|
||||||
|
let l:mode = l:info['loclist'] ? 'Location' : 'Quickfix'
|
||||||
|
endif
|
||||||
|
return statusline#special('StatusLineLight', l:mode,
|
||||||
|
\ get(l:info['variables'], 'quickfix_title', ''))
|
||||||
|
elseif &buftype ==# 'terminal'
|
||||||
|
return statusline#special('StatusLineLight', 'Terminal', '%f')
|
||||||
|
elseif &previewwindow
|
||||||
|
if l:mode ==# 'Normal'
|
||||||
|
let l:mode = 'Preview'
|
||||||
|
endif
|
||||||
|
return statusline#generic('StatusLineLight', l:mode)
|
||||||
|
elseif &filetype ==# 'man'
|
||||||
|
return statusline#special('StatusLineDusk', 'Manual', '%f')
|
||||||
|
endif
|
||||||
|
return statusline#generic('StatusLineLight', l:mode)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Define inactive statusline, this remains static until the buffer gains
|
||||||
|
" focus again.
|
||||||
|
function! statusline#inactive()
|
||||||
|
if &buftype ==# 'help'
|
||||||
|
let l:statusline = statusline#special('StatusLineDusk', 'Help', '%F')
|
||||||
|
elseif &buftype ==# 'quickfix'
|
||||||
|
" Quickfix list and location list have the same buftype, the window has a
|
||||||
|
" loclist flag, query the window info.
|
||||||
|
let l:info = getwininfo(win_getid())[0]
|
||||||
|
let l:statusline = statusline#special('StatusLineDusk',
|
||||||
|
\ l:info['loclist'] ? 'Location' : 'Quickfix',
|
||||||
|
\ get(l:info['variables'], 'quickfix_title', ''))
|
||||||
|
elseif &buftype ==# 'terminal'
|
||||||
|
let l:statusline = statusline#special('StatusLineDusk', 'Terminal', '%f')
|
||||||
|
elseif &previewwindow
|
||||||
|
let l:statusline = statusline#generic('StatusLineDusk', 'Preview')
|
||||||
|
elseif &filetype ==# 'man'
|
||||||
|
let l:statusline = statusline#special('StatusLineDusk', 'Manual', '%f')
|
||||||
|
else
|
||||||
|
let l:statusline = statusline#generic('StatusLineDusk', 'Idle')
|
||||||
|
endif
|
||||||
|
" Escape spaces and double quotes for use in setlocal.
|
||||||
|
let l:statusline = substitute(l:statusline, '\([ "]\)', '\\\0', 'g')
|
||||||
|
execute 'setlocal statusline='.l:statusline
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Get statusline mode and update StatusLineLight.
|
||||||
|
function! statusline#mode()
|
||||||
|
" Map modes to a human readable name and a color.
|
||||||
|
let l:mode = {
|
||||||
|
\ 'n': ['Normal', g:statusline#light_green],
|
||||||
|
\ 'i': ['Insert', g:statusline#light_blue],
|
||||||
|
\ 'c': ['Command', g:statusline#light_green],
|
||||||
|
\ 'v': ['Visual', g:statusline#light_orange],
|
||||||
|
\ 'V': ['V-Line', g:statusline#light_orange],
|
||||||
|
\ '': ['V-Block', g:statusline#light_orange],
|
||||||
|
\ 'R': ['Replace', g:statusline#light_red],
|
||||||
|
\ 's': ['Select', g:statusline#light_violet],
|
||||||
|
\ 'S': ['S-Line', g:statusline#light_violet],
|
||||||
|
\ '': ['S-Block', g:statusline#light_violet],
|
||||||
|
\ 't': ['Terminal', g:statusline#light_blue],
|
||||||
|
\ '!': ['Shell', g:statusline#light_grey],
|
||||||
|
\}[mode()]
|
||||||
|
" Update the StatusLineLight color.
|
||||||
|
call s:hi('StatusLineLight', l:mode[1])
|
||||||
|
return l:mode[0]
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Setup autocmds to set the statusline per buffer.
|
||||||
|
augroup benieStatusLine
|
||||||
|
autocmd!
|
||||||
|
" Dynamically update the current buffer mode and color changes using %! to
|
||||||
|
" call a function which is always evaluated on statusline update.
|
||||||
|
autocmd BufEnter,WinEnter,BufWinEnter * setlocal statusline=%!statusline#active()
|
||||||
|
" Statically set the statusline when leaving the buffer.
|
||||||
|
autocmd BufLeave,WinLeave * call statusline#inactive()
|
||||||
|
augroup END
|
BIN
pythonx/__pycache__/format.cpython-39.pyc
Normal file
BIN
pythonx/__pycache__/format.cpython-39.pyc
Normal file
Binary file not shown.
117
pythonx/format.py
Normal file
117
pythonx/format.py
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
"""Python formatexpr for clang-format & yapf"""
|
||||||
|
|
||||||
|
import json
|
||||||
|
import sys
|
||||||
|
import subprocess
|
||||||
|
import difflib
|
||||||
|
|
||||||
|
import vim
|
||||||
|
|
||||||
|
|
||||||
|
class FormatError(Exception):
|
||||||
|
"""A formatting error."""
|
||||||
|
|
||||||
|
|
||||||
|
def clang_format():
|
||||||
|
"""Call clang-format on the current text object."""
|
||||||
|
clang_format = vim.vars['clang_format_path']
|
||||||
|
# TODO: The cursor position before gq is invoked is not preserved in the
|
||||||
|
# jump list, this expression will return the cursor position at the
|
||||||
|
# beginning of the motion or text object.
|
||||||
|
# Is there a way to get the cursor position immediately before gq is
|
||||||
|
# invoked? So that we can pass the position to clang-format in order for
|
||||||
|
# it to return the updated position to continue editing.
|
||||||
|
# Query the current absolute cursor positon.
|
||||||
|
cursor = int(vim.eval('line2byte(".") + col(".")')) - 2
|
||||||
|
if cursor < 0:
|
||||||
|
return
|
||||||
|
# Determine the lines to format.
|
||||||
|
startline = int(vim.eval('v:lnum'))
|
||||||
|
endline = startline + int(vim.eval('v:count')) - 1
|
||||||
|
lines = f'{startline}:{endline}'
|
||||||
|
fallback_style = vim.vars['clang_format_style']
|
||||||
|
# Construct the clang-format command to call.
|
||||||
|
command = [
|
||||||
|
clang_format, '-style', 'file', '-cursor',
|
||||||
|
str(cursor), '-lines', lines, '-fallback-style', fallback_style
|
||||||
|
]
|
||||||
|
if vim.current.buffer.name:
|
||||||
|
command += ['-assume-filename', vim.current.buffer.name]
|
||||||
|
# Call the clang-format command.
|
||||||
|
output = call(command)
|
||||||
|
if not output:
|
||||||
|
return
|
||||||
|
# Read the clang-format json header.
|
||||||
|
header = json.loads(output[0])
|
||||||
|
if header.get('IncompleteFormat'):
|
||||||
|
raise FormatError('clang-format: incomplete (syntax errors).')
|
||||||
|
# Replace the formatted regions.
|
||||||
|
replace_regions(output[1:])
|
||||||
|
# Set the updated cursor position.
|
||||||
|
vim.command('goto %d' % (header['Cursor'] + 1))
|
||||||
|
|
||||||
|
|
||||||
|
def yapf():
|
||||||
|
"""Call yapf on the current text object."""
|
||||||
|
yapf = vim.vars['yapf_path']
|
||||||
|
# Determine the lines to format.
|
||||||
|
start = int(vim.eval('v:lnum'))
|
||||||
|
end = start + int(vim.eval('v:count'))
|
||||||
|
lines = '{0}-{1}'.format(start, end)
|
||||||
|
style = vim.vars['yapf_style']
|
||||||
|
# Construct the clang-format command to call.
|
||||||
|
command = [yapf, '--style', style, '--lines', lines]
|
||||||
|
# TODO: Since yapf is a Python package, we could import the module and
|
||||||
|
# call it directly instead. It would then be possible to output better
|
||||||
|
# error messages and act on the buffer directly.
|
||||||
|
# Call the yapf command.
|
||||||
|
output = call(command)
|
||||||
|
if not output:
|
||||||
|
return
|
||||||
|
# Replace the formatted regions.
|
||||||
|
replace_regions(output[:-1])
|
||||||
|
|
||||||
|
|
||||||
|
def call(command):
|
||||||
|
"""Call the command to format the text.
|
||||||
|
|
||||||
|
Arguments:
|
||||||
|
command (list): Formatting command to call.
|
||||||
|
text (str): Text to be passed to stdin of command.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
list: The output of the formatter split on new lines.
|
||||||
|
None: If the subprocess failed.
|
||||||
|
"""
|
||||||
|
# Don't open a cmd prompt window on Windows.
|
||||||
|
startupinfo = None
|
||||||
|
if sys.platform.startswith('win32'):
|
||||||
|
startupinfo = subprocess.STARTUPINFO()
|
||||||
|
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
|
||||||
|
startupinfo.wShowWindow = subprocess.SW_HIDE
|
||||||
|
# Call the formatting command.
|
||||||
|
process = subprocess.Popen(command,
|
||||||
|
stdout=subprocess.PIPE,
|
||||||
|
stderr=subprocess.PIPE,
|
||||||
|
stdin=subprocess.PIPE,
|
||||||
|
startupinfo=startupinfo)
|
||||||
|
stdout, stderr = process.communicate(
|
||||||
|
input='\n'.join(vim.current.buffer).encode('utf-8'))
|
||||||
|
if stderr:
|
||||||
|
raise FormatError(stderr)
|
||||||
|
if not stdout:
|
||||||
|
raise FormatError('No output from {0}.'.format(command[0]))
|
||||||
|
# Split the lines into a list of elements.
|
||||||
|
return stdout.decode('utf-8').split('\n')
|
||||||
|
|
||||||
|
|
||||||
|
def replace_regions(lines):
|
||||||
|
"""Replace formatted regions in the current buffer.
|
||||||
|
|
||||||
|
Arguments:
|
||||||
|
lines (list): The formatted buffer lines.
|
||||||
|
"""
|
||||||
|
matcher = difflib.SequenceMatcher(None, vim.current.buffer, lines)
|
||||||
|
for tag, i1, i2, j1, j2 in reversed(matcher.get_opcodes()):
|
||||||
|
if tag != 'equal':
|
||||||
|
vim.current.buffer[i1:i2] = lines[j1:j2]
|
56
vimrc
56
vimrc
@ -23,39 +23,28 @@ endif
|
|||||||
set runtimepath+=~/.config/work
|
set runtimepath+=~/.config/work
|
||||||
set packpath+=~/.config/work
|
set packpath+=~/.config/work
|
||||||
|
|
||||||
" vim-airline - improved status bar
|
|
||||||
Pack 'vim-airline/vim-airline'
|
|
||||||
let g:airline#extensions#branch#enabled = 0
|
|
||||||
let g:airline#extensions#hunks#enabled = 0
|
|
||||||
let g:airline#extensions#wordcount#enabled = 0
|
|
||||||
for s:setting in ['left_sep', 'right_sep', 'section_error', 'section_warning']
|
|
||||||
exec 'let g:airline_'.s:setting.' = ""'
|
|
||||||
endfor
|
|
||||||
" tabline.vim - sanely numbered tabs
|
" tabline.vim - sanely numbered tabs
|
||||||
Pack 'mkitt/tabline.vim'
|
Pack 'mkitt/tabline.vim'
|
||||||
|
|
||||||
" YouCompleteMe
|
" coc.nvim Conqueror of Completion
|
||||||
Pack 'ycm-core/YouCompleteMe', {'type': 'opt'}
|
Pack 'neoclide/coc.nvim', {'branch': 'release'}
|
||||||
let g:ycm_key_list_select_completion = ['<C-n>', '<Down>']
|
let g:coc_global_extensions = [
|
||||||
let g:ycm_key_list_previous_completion = ['<C-p>', '<Up>']
|
\ 'coc-clangd',
|
||||||
let g:ycm_min_num_of_chars_for_completion = 1
|
\ 'coc-cmake',
|
||||||
let g:ycm_complete_in_comments = 1
|
\ 'coc-css',
|
||||||
let g:ycm_complete_in_strings = 1
|
\ 'coc-html',
|
||||||
let g:ycm_collect_identifiers_from_comments_and_strings = 1
|
\ 'coc-jedi',
|
||||||
let g:ycm_seed_identifiers_with_syntax = 1
|
\ 'coc-json',
|
||||||
let g:ycm_autoclose_preview_window_after_insertion = 1
|
\ 'coc-marketplace',
|
||||||
let g:ycm_always_populate_location_list = 1
|
\ 'coc-pyright',
|
||||||
let g:ycm_error_symbol = '▸'
|
\ 'coc-ultisnips',
|
||||||
let g:ycm_warning_symbol = '▸'
|
\ 'coc-vimlsp',
|
||||||
let g:ycm_goto_buffer_command = 'horizontal-split'
|
\ 'coc-yaml',
|
||||||
let g:ycm_use_clangd = 0
|
\]
|
||||||
let g:ycm_auto_hover = 0
|
|
||||||
|
|
||||||
" ultisnips - snippet engine
|
" ultisnips - snippet engine
|
||||||
Pack 'SirVer/ultisnips'
|
Pack 'SirVer/ultisnips'
|
||||||
Pack 'honza/vim-snippets'
|
Pack 'honza/vim-snippets'
|
||||||
" vim-cmake-completion - completion & help
|
|
||||||
Pack 'kbenzie/vim-cmake-completion', {'type': 'opt'}
|
|
||||||
" vimomni - Completion for vimscript
|
" vimomni - Completion for vimscript
|
||||||
Pack 'vim-scripts/vimomni', {'type': 'opt'}
|
Pack 'vim-scripts/vimomni', {'type': 'opt'}
|
||||||
|
|
||||||
@ -71,9 +60,6 @@ let g:ale_cmake_cmakelint_options =
|
|||||||
" Version control differences in the sign column
|
" Version control differences in the sign column
|
||||||
Pack 'mhinz/vim-signify'
|
Pack 'mhinz/vim-signify'
|
||||||
|
|
||||||
" format.vim - format with text objects
|
|
||||||
Pack 'git@bitbucket.org:infektor/format.vim.git'
|
|
||||||
|
|
||||||
" vim-textobj-user - library for creating text objects
|
" vim-textobj-user - library for creating text objects
|
||||||
Pack 'kana/vim-textobj-user'
|
Pack 'kana/vim-textobj-user'
|
||||||
" vim-textobj-entire - Entire file text object
|
" vim-textobj-entire - Entire file text object
|
||||||
@ -137,6 +123,7 @@ let g:note_directory = '~/Sync/Notes'
|
|||||||
if !has('win32')
|
if !has('win32')
|
||||||
" Seemless vim/tmux pane navigation
|
" Seemless vim/tmux pane navigation
|
||||||
Pack 'christoomey/vim-tmux-navigator'
|
Pack 'christoomey/vim-tmux-navigator'
|
||||||
|
let g:tmux_navigator_no_mappings = 1
|
||||||
" Enable focus events when in tmux session
|
" Enable focus events when in tmux session
|
||||||
Pack 'tmux-plugins/vim-tmux-focus-events'
|
Pack 'tmux-plugins/vim-tmux-focus-events'
|
||||||
endif
|
endif
|
||||||
@ -194,14 +181,3 @@ Pack 'mustache/vim-mustache-handlebars'
|
|||||||
Pack 'joshglendenning/vim-caddyfile'
|
Pack 'joshglendenning/vim-caddyfile'
|
||||||
Pack 'kbenzie/vim-khr'
|
Pack 'kbenzie/vim-khr'
|
||||||
Pack 'jrozner/vim-antlr'
|
Pack 'jrozner/vim-antlr'
|
||||||
|
|
||||||
" Plugins for remote integrations
|
|
||||||
Pack 'greymd/oscyank.vim', {'type': 'opt'}
|
|
||||||
if tmux#isOption('set-clipboard', 'on')
|
|
||||||
packadd oscyank.vim
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Load YouComplteMe if termdebug plugin is not loaded.
|
|
||||||
if isdirectory(expand('~/.vim/pack/minpac/opt/YouCompleteMe'))
|
|
||||||
packadd YouCompleteMe
|
|
||||||
endif
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user