Compare commits

..

15 Commits

Author SHA1 Message Date
befdb5c172 Add statusline support for nvim's man pager filetype 2021-02-18 00:42:14 +00:00
93858d7687 Make terminal mode feel like insert mode statusline 2021-02-18 00:41:40 +00:00
0b3e6ce223 Make nvim :terminal more consistent with vim
Vim's :terminal feels much more ergonomic, adding various mappings to
make the experience more similar, mainly by adding a few `<C-w>`
mappings for the most common actions.

Additionally, disable vim-tmux-navigators default mappings and setup
both normal and terminal mode mappings for `<C-w>{h,j,k,l}` in addition
to the normal mode mappings for `<C-{h,j,j,l}>` to make the pane
switching experience more consistent across all buffer types.
2021-02-18 00:39:48 +00:00
a7a9e98678 Use signcolumn=number when available 2021-02-18 00:39:48 +00:00
dc674aba75 Fix statusline l:mode map indentation 2021-02-11 17:04:09 +00:00
619f043665 Remove a unused scriptencoding
There are no utf-8 special characters in the file anymore.
2021-02-08 21:47:23 +00:00
88cf5011f7 Get rid of scrolloff 2021-02-08 21:46:08 +00:00
4d0ad4f837 Replace vim-airline with a custom statusline
Finally got round to making a custom statusline after being inspired by
https://pastebin.com/Fm1NEgBf
2021-02-07 23:14:56 +00:00
15d9a611cc Add list of global coc extensions 2021-02-06 10:57:42 +00:00
61639aac54 Check if .vim directory exists before use
Update `build#dir()` to check for the existence of the `.vim` directory
containing `coc_settings.json` before attempting to read the file. If it
doesn't exist then create it.
2021-02-03 22:47:16 +00:00
284de8eb05 Configure cmake-language-server and coc-cmake
Utilises the following Python package:

```console
$ pip3 install --user cmake-language-server
```
2021-01-29 14:03:24 +00:00
4aceb7aca9 Update build#dir() to configure coc-clangd 2021-01-28 13:33:55 +00:00
f23db08d92 Replace remaining YouCompleteMe mappings 2021-01-28 13:33:55 +00:00
8bdb7b7054 Replace YouCompleteMe with coc.nvim 2021-01-27 21:05:06 +00:00
ae30cf3a09 fresh: NonText as SpecialKey
Don't use `set highlight` to highlight `NonText` like `SpecialKey`,
instead simply set the color of `NonText` in the colorscheme.
2021-01-27 19:50:11 +00:00
46 changed files with 121 additions and 524 deletions

9
.conduit.yaml Normal file
View File

@@ -0,0 +1,9 @@
---
- location: ~/.vim
- pip:
- vim-vint
- yamllint
- cmakelint
- repo:
- remote: https://github.com/k-takata/minpac.git
location: ~/.vim/pack/minpac/opt/minpac

1
.gitignore vendored
View File

@@ -2,4 +2,3 @@ local.vim
.netrwhist .netrwhist
pack/* pack/*
spell/* spell/*
*.pyc

View File

@@ -8,7 +8,7 @@ from argparse import ArgumentParser
def main(): def main():
parser = ArgumentParser() parser = ArgumentParser()
$0 parser.add_argument('${0:argument}')
args = parser.parse_args() args = parser.parse_args()
@@ -16,7 +16,7 @@ if __name__ == '__main__':
try: try:
main() main()
except KeyboardInterrupt: except KeyboardInterrupt:
exit(130) pass
endsnippet endsnippet
snippet debug "Set ipdb breakpoint" snippet debug "Set ipdb breakpoint"

View File

@@ -9,7 +9,11 @@ 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>

View File

@@ -1,3 +1,5 @@
" 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>

View File

@@ -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 signcolumn=no setlocal nonumber norelativenumber

View File

@@ -1,2 +1 @@
setlocal showbreak= setlocal showbreak=
set signcolumn=no

View File

@@ -25,3 +25,6 @@ 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>

View File

@@ -1,6 +1,9 @@
" 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)

View File

@@ -45,7 +45,7 @@ if exists('g:c_doxygen') && g:c_doxygen
" Match: @param name description. @retval name description. " Match: @param name description. @retval name description.
" ^^^^ ^^^^ " ^^^^ ^^^^
syn region cDoxygenSpecial matchgroup=cDoxygenComment start='@\(param\(\[\(\|in\|out\|in,out\)\]\)\?\|retval\)\=\s\+' end='\(\s\|$\)' contained display syn region cDoxygenSpecial matchgroup=cDoxygenComment start='@\(param\(\[\(\|in\|out\|in,out\)\]\)\|retval\)\=\s\+' end='\(\s\|$\)' contained display
" Match: @tparam name description. " Match: @tparam name description.
" ^^^^ " ^^^^

View File

@@ -1,4 +1,3 @@
hi link jsonKeyword Function hi link jsonKeyword Function
hi link jsonNull Constant hi link jsonNull Constant
hi link jsonQuote Delimiter hi link jsonQuote Delimiter
setlocal conceallevel=0

View File

@@ -1,7 +0,0 @@
setlocal tabstop=2
setlocal shiftwidth=2
setlocal softtabstop=2
highlight link yamlBlockMappingKey Keyword
highlight link yamlAnchor PreProc
highlight link yamlAlias PreProc

View File

@@ -10,26 +10,12 @@ function! build#dir(...) abort
let l:dir = s:dirs[0] let l:dir = s:dirs[0]
unlet s:dirs unlet s:dirs
else else
" Multiple build directories found, select one. " Multiple build directories found, create popup menu to select one.
if exists('*popup_menu') " Set the callback to this function on completion, handled below.
" Create popup menu to select the build directory. Callback to this
" function on completion, handled in the else branch below.
call popup_menu(s:dirs, #{ call popup_menu(s:dirs, #{
\ filter: 'popup_filter_menu', \ filter: 'popup_filter_menu',
\ callback: 'build#dir', \ callback: 'build#dir',
\ }) \ })
else
" Fallback to inputlist when popup_menu is not available.
let l:choices = []
let l:index = 1
for l:dir in s:dirs
call add(l:choices, string(l:index).': '.l:dir)
let l:index += 1
endfor
let l:index = inputlist(l:choices)
let l:dir = s:dirs[l:index - 1]
echomsg ' '.l:dir
endif
endif endif
else else
if a:0 == 1 if a:0 == 1
@@ -49,30 +35,17 @@ function! build#dir(...) abort
endif endif
endif endif
if exists('l:dir') if exists('l:dir')
" Set build directory. " Set build directory and restart YouCompleteMe.
let l:cwd = substitute(getcwd(), '\\', '\/', 'g') let $BUILD_DIR = getcwd().'/'.substitute(l:dir, '\/$', '', '')
let $BUILD_DIR = l:cwd.'/'.substitute(l:dir, '\/$', '', '')
if executable('compdb')
" Post-process compile_commands.json with compdb, adds header files to
" missing compile_commands.json for more accurate diagnostics.
let l:database_dir = l:cwd.'/.vim'
let l:compile_commands = l:database_dir.'/compile_commands.json'
call systemlist('compdb -p '.$BUILD_DIR.' list > '.l:compile_commands)
else
let l:database_dir = $BUILD_DIR
endif
" Read/create .vim/coc-settings.json
let l:coc_settings = {} let l:coc_settings = {}
if isdirectory('.vim') if isdirectory('.vim')
let l:coc_settings = json_decode(join(readfile('.vim/coc-settings.json'), '')) let l:coc_settings = json_decode(join(readfile('.vim/coc-settings.json'), ''))
else else
call mkdir('.vim') call mkdir('.vim')
endif endif
" Update .vim/coc-settings.json with new build directory. let l:coc_settings['clangd.compilationDatabasePath'] = $BUILD_DIR
let l:coc_settings['clangd.compilationDatabasePath'] = l:database_dir
let l:coc_settings['cmake.lsp.buildDirectory'] = $BUILD_DIR let l:coc_settings['cmake.lsp.buildDirectory'] = $BUILD_DIR
call writefile([json_encode(l:coc_settings)], '.vim/coc-settings.json') call writefile([json_encode(l:coc_settings)], '.vim/coc-settings.json')
" Finally restart coc.nvim with new config.
CocRestart CocRestart
endif endif
endfunction endfunction

View File

@@ -100,14 +100,3 @@ 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

View File

@@ -1,14 +0,0 @@
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

View File

@@ -1,27 +0,0 @@
" 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

View File

@@ -16,6 +16,6 @@ function! tmux#isOption(option, value) abort
if !tmux#inSession() if !tmux#inSession()
return 0 return 0
endif endif
let l:option = trim(system('tmux show-options -g '.a:option)) let l:set_clipboard = trim(system('tmux show-options -g '.a:option))
return l:option ==# a:option.' '.a:value return l:set_clipboard ==# 'set-clipboard '.a:value
endfunction endfunction

View File

@@ -1,3 +0,0 @@
function! wsl#isDetected() abort
return $WSLENV !=# ''
endfunction

View File

@@ -1,17 +1 @@
{ {"cmake.lsp.enable": true}
"clangd.inlayHints.enable": false,
"cmake.lsp.enable": true,
"diagnostic.enableHighlightLineNumber": false,
"diagnostic.errorSign": "▸",
"diagnostic.hintSign": "▸",
"diagnostic.infoSign": "▸",
"diagnostic.warningSign": "▸",
"powershell.integratedConsole.showOnStartup": false,
"suggest.noselect": true,
"yaml.schemas": {
"https://gitlab.com/gitlab-org/gitlab/-/raw/master/app/assets/javascripts/editor/schema/ci.json": [
".gitlab-ci.yml",
".gitlab/ci/*.yml"
]
}
}

View File

@@ -126,9 +126,7 @@ if has('gui_running') || &t_Co == 256
call s:hi('SpellLocal', '5', '', '') call s:hi('SpellLocal', '5', '', '')
call s:hi('SpellRare', '3', '', '') call s:hi('SpellRare', '3', '', '')
call s:hi('StatusLine', '15', '233', '') call s:hi('StatusLine', '15', '233', '')
call s:hi('StatusLineTerm', '15', '233', '')
call s:hi('StatusLineNC', '', '235', '') call s:hi('StatusLineNC', '', '235', '')
call s:hi('StatusLineTermNC', '', '235', '')
call s:hi('TabLine', '246', '235', 'bold') call s:hi('TabLine', '246', '235', 'bold')
call s:hi('TabLineFill', '', '235', '') call s:hi('TabLineFill', '', '235', '')
call s:hi('TabLineSel', '248', '', 'bold') call s:hi('TabLineSel', '248', '', 'bold')
@@ -187,10 +185,6 @@ if has('gui_running') || &t_Co == 256
call s:hi('Todo', '202', '', 'bold') call s:hi('Todo', '202', '', 'bold')
"" }}} "" }}}
"" NVIM Groups {{
call s:hi('NormalFloat', '', '235', '')
"" }}
"" Terminal Groups {{{ "" Terminal Groups {{{
call s:hi('debugBreakpoint', '1', '', 'reverse') call s:hi('debugBreakpoint', '1', '', 'reverse')
call s:hi('debugPC', '25', '', 'reverse') call s:hi('debugPC', '25', '', 'reverse')
@@ -207,16 +201,6 @@ if has('gui_running') || &t_Co == 256
call s:hi('ALEErrorSign', '160', '233', 'bold') call s:hi('ALEErrorSign', '160', '233', 'bold')
call s:hi('ALEWarningSign', '129', '233', 'bold') call s:hi('ALEWarningSign', '129', '233', 'bold')
call s:hi('CocErrorSign', '160', '233', '')
call s:hi('CocErrorFloat', '160', '235', '')
call s:hi('CocWarningSign', '129', '233', '')
call s:hi('CocWarningFloat', '129', '235', '')
call s:hi('CocInfoSign', '8', '233', '')
call s:hi('CocInfoFloat', '8', '235', '')
call s:hi('CocHintSign', '33', '233', '')
call s:hi('CocHintFloat', '33', '235', '')
call s:hi('CocInlayHint', '8', '', '')
call s:hi('SyntasticErrorSign', '160', '233', 'bold') call s:hi('SyntasticErrorSign', '160', '233', 'bold')
call s:hi('SyntasticWarningSign', '129', '233', 'bold') call s:hi('SyntasticWarningSign', '129', '233', 'bold')
call s:hi('SyntasticErrorLine', '', '', '') call s:hi('SyntasticErrorLine', '', '', '')

View File

@@ -1 +0,0 @@
autocmd BufNewFile,BufReadPost */requirements.txt set filetype=requirements

View File

@@ -1,3 +0,0 @@
if has('pythonx')
setlocal formatexpr=format#clang_format()
endif

View File

@@ -1,6 +0,0 @@
" Add <> to % matches
setlocal matchpairs+=<:>
if has('pythonx')
setlocal formatexpr=format#clang_format()
endif

View File

@@ -1,3 +0,0 @@
if has('pythonx')
setlocal formatexpr=format#clang_format()
endif

View File

@@ -1,3 +0,0 @@
if has('pythonx')
setlocal formatexpr=format#clang_format()
endif

View File

@@ -1,3 +0,0 @@
if has('pythonx')
setlocal formatexpr=format#clang_format()
endif

View File

@@ -1,3 +0,0 @@
if has('pythonx')
setlocal formatexpr=format#clang_format()
endif

View File

@@ -1,3 +0,0 @@
if has('pythonx')
setlocal formatexpr=format#clang_format()
endif

View File

@@ -1,3 +0,0 @@
if has('pythonx')
setlocal formatexpr=format#yapf()
endif

View File

@@ -1 +0,0 @@
set commentstring=#%s

View File

@@ -1,12 +0,0 @@
if exists(':GuiFont')
if platform#is_windows()
GuiFont! Source\ Code\ Pro:h10
else
GuiFont Source\ Code\ Pro:h9
endif
endif
if exists(':GuiTabline')
" Don't use GUI tabline, matches terminal tabline.
GuiTabline 0
endif

2
gvimrc
View File

@@ -6,7 +6,7 @@
set guioptions=aegi set guioptions=aegi
if platform#is_windows() if platform#is_windows()
set guifont=Source\ Code\ Pro:h10 set guifont=Consolas:h10:cDEFAULT
else else
" Set default font " Set default font
set guifont=Source\ Code\ Pro\ Medium\ 9 set guifont=Source\ Code\ Pro\ Medium\ 9

View File

@@ -1 +0,0 @@
runtime vimrc

1
init.vim Symbolic link
View File

@@ -0,0 +1 @@
vimrc

View File

@@ -1,28 +0,0 @@
---
- name: nodejs get json containing latest version
uri:
url: https://nodejs.org/dist/index.json
register: latest
- name: nodejs create directory for downloaded package
file:
state: directory
dest: ~/.local/src
- name: nodejs download latest package
get_url:
url: 'https://nodejs.org/dist/{{latest.json[0].version}}/node-{{latest.json[0].version}}-linux-x64.tar.gz'
dest: ~/.local/src/node.tar.gz
- name: nodejs extract downloaded package
unarchive:
src: ~/.local/src/node.tar.gz
dest: ~/.local/src
remote_src: true
- name: nodejs create symlink links
file:
state: link
src: '~/.local/src/node-{{latest.json[0].version}}-linux-x64/bin/{{item}}'
dest: '~/.local/bin/{{item}}'
with_items: [corepack, node, npm, npx]

View File

@@ -12,6 +12,9 @@ augroup benieAugroup
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
\ | exe "normal! g'\"" | endif \ | exe "normal! g'\"" | endif
" Highlight conflict markers in any filetype
au FileType * call matchadd('Todo', '^\(<<<<<<<\s.*\||||||||\|=======\|>>>>>>>\s.*\)$')
" Update `Last change: <date>` on write & go back previous cursor position " Update `Last change: <date>` on write & go back previous cursor position
au FileType help au BufWritePre <buffer> au FileType help au BufWritePre <buffer>
\ 1s/Last change: \zs.*$/\=strftime('%Y %b %d')/e|norm!`` \ 1s/Last change: \zs.*$/\=strftime('%Y %b %d')/e|norm!``
@@ -30,11 +33,9 @@ augroup benieAugroup
" Start in terminal-insert mode. " Start in terminal-insert mode.
autocmd TermOpen term://* startinsert autocmd TermOpen term://* startinsert
" Don't show the line number column in terminal-insert mode. " Don't show the line number column in terminal-insert mode.
autocmd TermEnter term://* autocmd TermEnter term://* set nonumber | set norelativenumber
\ set nonumber | set norelativenumber | set signcolumn=no
" But do show the line number column in terminal-normal mode. " But do show the line number column in terminal-normal mode.
autocmd TermLeave term://* autocmd TermLeave term://* set number | set relativenumber
\ set number | set relativenumber | set signcolumn=auto
" Automatically press enter when the terminal process exits. " Automatically press enter when the terminal process exits.
autocmd TermClose term://* autocmd TermClose term://*
\ if (expand('<afile>') !~ "fzf") && \ if (expand('<afile>') !~ "fzf") &&

View File

@@ -8,5 +8,7 @@ if !platform#is_windows() &&
echo "Setup the shell to do something similar on load" echo "Setup the shell to do something similar on load"
echo "env TERM=xterm-256color /usr/bin/zsh" echo "env TERM=xterm-256color /usr/bin/zsh"
endif endif
colorscheme fresh if !platform#is_windows() || has("gui_running")
colorscheme fresh
endif
syntax sync minlines=1000 syntax sync minlines=1000

View File

@@ -1,3 +1,11 @@
" minpac
function! s:minpac_init() abort
packadd minpac | call minpac#init() | source $MYVIMRC
endfunction
command! PackUpdate call s:minpac_init() | call minpac#update('', {'do': 'call minpac#status()'})
command! PackStatus call s:minpac_init() | call minpac#status()
command! PackClean call s:minpac_init() | call minpac#clean()
" Sort Python Imports " Sort Python Imports
command! ISort call do#isort() command! ISort call do#isort()

View File

@@ -1,8 +0,0 @@
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')

View File

@@ -1,12 +1,9 @@
" coc.nvim " coc.nvim
nmap <silent> <leader>fi <Plug>(coc-fix-current) nmap <leader>fi <Plug>(coc-fix-current)
nmap <silent> <leader>gd <Plug>(coc-definition) nmap <leader>gd <Plug>(coc-definition)
nmap <silent> <leader>gt <Plug>(coc-type-definition) nmap <leader>gt <Plug>(coc-type-definition)
nmap <silent> <leader>sd <Plug>(coc-diagnostic-info) nmap <leader>sd <Plug>(coc-diagnostic-info)
nmap <silent> <leader>gr <Plug>(coc-references) nmap <leader>gr <Plug>(coc-references)
nmap <silent> K :call do#show_documentation()<CR>
nmap <silent> <C-n> <Plug>(coc-diagnostic-next)
nmap <silent> <C-p> <Plug>(coc-diagnostic-prev)
if has('nvim') if has('nvim')
" Make nvim :terminal more like vim :terminal " Make nvim :terminal more like vim :terminal
@@ -22,6 +19,10 @@ tnoremap <C-G> :Gdb<CR>
tnoremap <C-E> :Program<CR> tnoremap <C-E> :Program<CR>
tnoremap <C-S> :Source<CR> tnoremap <C-S> :Source<CR>
" GitGutter
nnoremap <leader>gn :GitGutterNextHunk<CR>
nnoremap <leader>gp :GitGutterPrevHunk<CR>
" Quickfix list " Quickfix list
nnoremap <leader>qo :copen<CR> nnoremap <leader>qo :copen<CR>
nnoremap <leader>qc :cclose<CR> nnoremap <leader>qc :cclose<CR>
@@ -64,31 +65,24 @@ nnoremap k gk
nnoremap <leader>w :w!<CR> nnoremap <leader>w :w!<CR>
" Switch panes in a tmux aware way " Switch panes in a tmux aware way
if !has('win32') nnoremap <silent> <C-h> :TmuxNavigateLeft<CR>
nnoremap <silent> <C-h> :TmuxNavigateLeft<CR> nnoremap <silent> <C-j> :TmuxNavigateDown<CR>
nnoremap <silent> <C-j> :TmuxNavigateDown<CR> nnoremap <silent> <C-k> :TmuxNavigateUp<CR>
nnoremap <silent> <C-k> :TmuxNavigateUp<CR> nnoremap <silent> <C-l> :TmuxNavigateRight<CR>
nnoremap <silent> <C-l> :TmuxNavigateRight<CR> nnoremap <silent> <C-w>h :TmuxNavigateLeft<CR>
nnoremap <silent> <C-w>h :TmuxNavigateLeft<CR> nnoremap <silent> <C-w>j :TmuxNavigateDown<CR>
nnoremap <silent> <C-w>j :TmuxNavigateDown<CR> nnoremap <silent> <C-w>k :TmuxNavigateUp<CR>
nnoremap <silent> <C-w>k :TmuxNavigateUp<CR> nnoremap <silent> <C-w>l :TmuxNavigateRight<CR>
nnoremap <silent> <C-w>l :TmuxNavigateRight<CR> if has('nvim')
if has('nvim')
tnoremap <silent> <C-w>h <C-\><C-n>:TmuxNavigateLeft<CR> tnoremap <silent> <C-w>h <C-\><C-n>:TmuxNavigateLeft<CR>
tnoremap <silent> <C-w>j <C-\><C-n>:TmuxNavigateDown<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>k <C-\><C-n>:TmuxNavigateUp<CR>
tnoremap <silent> <C-w>l <C-\><C-n>:TmuxNavigateRight<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
else else
nnoremap <silent> <C-h> <C-w>h tnoremap <silent> h :TmuxNavigateLeft<CR>
nnoremap <silent> <C-j> <C-w>j tnoremap <silent> j :TmuxNavigateDown<CR>
nnoremap <silent> <C-k> <C-w>k tnoremap <silent> k :TmuxNavigateUp<CR>
nnoremap <silent> <C-l> <C-w>l tnoremap <silent> l :TmuxNavigateRight<CR>
endif endif
" Quick tabs " Quick tabs
@@ -100,14 +94,8 @@ nnoremap <leader>tm :tabmove<Space>
" Clear search highlights " Clear search highlights
nnoremap <leader><Space> :nohlsearch<CR> nnoremap <leader><Space> :nohlsearch<CR>
if tmux#isOption('set-clipboard', 'on') || $SSH_CONNECTION !=# '' if exists('loaded_oscyank')
" When connected to a remote session the + selection register is not noremap <leader>y :Oscyank<CR>
" 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
@@ -115,10 +103,6 @@ else
noremap <leader>p "+p noremap <leader>p "+p
noremap <leader>P "+P noremap <leader>P "+P
endif endif
if has('nvim-0.5.2')
" Undo neovim's default mapping of Y to y$
unmap Y
endif
" Quickly access spelling menu " Quickly access spelling menu
inoremap <C-s> <C-g>u<C-X>s inoremap <C-s> <C-g>u<C-X>s
@@ -126,6 +110,8 @@ 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>

View File

@@ -155,7 +155,7 @@ if exists('&signcolumn')
try try
set signcolumn=number set signcolumn=number
catch /E474/ catch /E474/
set signcolumn=yes set signcolumn=auto
endtry endtry
endif endif
@@ -176,7 +176,7 @@ if &t_Co == 8 && $TERM !~# '^linux\|^Eterm'
endif endif
" Change cursor dependant on current mode " Change cursor dependant on current mode
if !has('nvim') && has('cursorshape') && has('unix') && !has('gui_running') if has('cursorshape') && has('unix') && !has('gui_running')
if $TMUX ==# '' && $ITERM_PROFILE !=# '' if $TMUX ==# '' && $ITERM_PROFILE !=# ''
let &t_SI = "\<Esc>]50;CursorShape=1\x7" let &t_SI = "\<Esc>]50;CursorShape=1\x7"
let &t_EI = "\<Esc>]50;CursorShape=0\x7" let &t_EI = "\<Esc>]50;CursorShape=0\x7"

View File

@@ -1,5 +1,4 @@
" Show the statusline above the commandline. " Show the statusline above the commandline.
scriptencoding utf-8
set laststatus=2 set laststatus=2
" Define color variables. " Define color variables.
@@ -7,17 +6,16 @@ let g:statusline#light_green = {'fg': ['235', '#080808'], 'bg': [ '35', '#0087f
let g:statusline#light_blue = {'fg': ['235', '#080808'], 'bg': [ '33', '#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_orange = {'fg': ['235', '#080808'], 'bg': ['209', '#eb754d']}
let g:statusline#light_red = {'fg': ['235', '#080808'], 'bg': ['124', '#af0000']} 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_grey = {'fg': ['250', "#bcbcbc"], 'bg': ['236', "#303030"]}
let g:statusline#light_violet = {'fg': ['235', '#080808'], 'bg': [ '99', '#986fec']} 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_white = {'fg': [ '15', '#ffffff'], 'bg': ['233', '#121212']}
let g:statusline#dark_yellow = {'fg': ['179', '#dfaf5f'], '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. " Create highlight groups.
function! s:hi(group, color) abort function! s:hi(group, color) abort
execute 'highlight '.a:group execute 'highlight '.a:group
\.' ctermfg='.a:color['fg'][0].' ctermbg='.a:color['bg'][0] \.' ctermfg='.a:color['fg'][0].' ctermbg='.a:color['bg'][0]
\.' guifg='.a:color['fg'][1].' guibg='.a:color['bg'][1] \.' guifg='.a:color['fg'][1].' guibg='.a:color['fg'][1]
endfunction endfunction
" StatusLineLight is shows the mode and cursor information, it is dynamically " StatusLineLight is shows the mode and cursor information, it is dynamically
@@ -29,12 +27,9 @@ call s:hi('StatusLineDusk', g:statusline#light_grey)
" StatusLineDark shows the filename and filetype and takes up most of the " StatusLineDark shows the filename and filetype and takes up most of the
" statusline, give it a dark background. " statusline, give it a dark background.
call s:hi('StatusLineDark', g:statusline#dark_white) call s:hi('StatusLineDark', g:statusline#dark_white)
" StatusLineChange shows changes in the file by changing the colour of the " StatusLineChange show changes in the file by changing the colour of the
" filename, give if a dark background. " filename, give if a dark background.
call s:hi('StatusLineChange', g:statusline#dark_yellow) 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. " Construct a statusline for special buffer types.
function! statusline#special(group, name, title) function! statusline#special(group, name, title)
@@ -49,7 +44,7 @@ function! statusline#special(group, name, title)
endfunction endfunction
" Construct a statusline for generic buffer types. " Construct a statusline for generic buffer types.
function! statusline#generic(group, mode, coc) function! statusline#generic(group, mode)
" Display current mode with dynamic highlights. " Display current mode with dynamic highlights.
let l:mode = '%#'.a:group.'# '.a:mode.' ' let l:mode = '%#'.a:group.'# '.a:mode.' '
" Display spell or paste if set with dusk highlights in a group to swallow " Display spell or paste if set with dusk highlights in a group to swallow
@@ -59,17 +54,11 @@ function! statusline#generic(group, mode, coc)
\.'%{&paste ? "Paste " : ""}' \.'%{&paste ? "Paste " : ""}'
\.'%)' \.'%)'
" Display filename with dark or changed highlights. " Display filename with dark or changed highlights.
let l:file = (&modified ? '%#StatusLineChange#' : '%#StatusLineDark#').' %<%f' let l:file = (&modified ? '%#StatusLineChange#' : '%#StatusLineDark#').' %f'
" Display readonly and nomodifiable if set. " Display readonly and nomodifiable if set.
let l:state = '%#StatusLineDark#' let l:state = '%#StatusLineDark#'
\.'%{&readonly ? " 🔒" : ""}' \.'%{&readonly ? " 🔒" : ""}'
\.'%{&modifiable ? "" : " ⛔"}' \.'%{&modifiable ? "" : " ⛔"}'
if a:coc && exists('*coc#status')
" Display coc.nvim status.
let l:coc = '%#StatusLineDuskFade#%( %{coc#status()}%)'
else
let l:coc = ''
endif
" Display filetype if set. " Display filetype if set.
let l:type = '%#StatusLineDark# %{&filetype} ' let l:type = '%#StatusLineDark# %{&filetype} '
" Display fileencoding if not utf-8 and fileformat if not unix with dusk " Display fileencoding if not utf-8 and fileformat if not unix with dusk
@@ -81,7 +70,7 @@ function! statusline#generic(group, mode, coc)
" Display current/total lines and column with dynamic highlights. " Display current/total lines and column with dynamic highlights.
let l:line = '%#'.a:group.'# ☰ %l/%L ㏑%2c ' let l:line = '%#'.a:group.'# ☰ %l/%L ㏑%2c '
" Combine the elements into a single string to be evaluated. " 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 return l:mode.l:edit.l:file.l:state.'%='.l:type.l:format.l:line
endfunction endfunction
" Define active statusline, this statusline is dynamic with StatusLineLight " Define active statusline, this statusline is dynamic with StatusLineLight
@@ -108,11 +97,11 @@ function! statusline#active()
if l:mode ==# 'Normal' if l:mode ==# 'Normal'
let l:mode = 'Preview' let l:mode = 'Preview'
endif endif
return statusline#generic('StatusLineLight', l:mode, v:false) return statusline#generic('StatusLineLight', l:mode)
elseif &filetype ==# 'man' elseif &filetype ==# 'man'
return statusline#special('StatusLineDusk', 'Manual', '%f') return statusline#special('StatusLineDusk', 'Manual', '%f')
endif endif
return statusline#generic('StatusLineLight', l:mode, v:true) return statusline#generic('StatusLineLight', l:mode)
endfunction endfunction
" Define inactive statusline, this remains static until the buffer gains " Define inactive statusline, this remains static until the buffer gains
@@ -130,11 +119,11 @@ function! statusline#inactive()
elseif &buftype ==# 'terminal' elseif &buftype ==# 'terminal'
let l:statusline = statusline#special('StatusLineDusk', 'Terminal', '%f') let l:statusline = statusline#special('StatusLineDusk', 'Terminal', '%f')
elseif &previewwindow elseif &previewwindow
let l:statusline = statusline#generic('StatusLineDusk', 'Preview', v:false) let l:statusline = statusline#generic('StatusLineDusk', 'Preview')
elseif &filetype ==# 'man' elseif &filetype ==# 'man'
let l:statusline = statusline#special('StatusLineDusk', 'Manual', '%f') let l:statusline = statusline#special('StatusLineDusk', 'Manual', '%f')
else else
let l:statusline = statusline#generic('StatusLineDusk', 'Idle', v:false) let l:statusline = statusline#generic('StatusLineDusk', 'Idle')
endif endif
" Escape spaces and double quotes for use in setlocal. " Escape spaces and double quotes for use in setlocal.
let l:statusline = substitute(l:statusline, '\([ "]\)', '\\\0', 'g') let l:statusline = substitute(l:statusline, '\([ "]\)', '\\\0', 'g')

View File

@@ -1,117 +0,0 @@
"""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]

View File

@@ -1,11 +0,0 @@
if exists('b:current_syntax')
finish
endif
highlight default link requirementsComment Comment
highlight default link requirementsVersion Identifier
highlight default link requirementsOperator Operator
syntax region requirementsComment start='^\w*#' end='$' contains=@Spell
syntax match requirementsVersion '\d\+\.\d\+\.\d\+\w*'
syntax match requirementsOperator '=='

View File

@@ -1,17 +0,0 @@
---
- include_vars: ~/.config/nvim/vars.yaml
- name: clone plugin repos
when: ansible_os_family != "Windows"
git:
repo: 'https://github.com/{{item.repo}}.git'
dest: '~/.config/nvim/pack/minpac/{{lookup("vars", "item.mode", default="start")}}/{{item.repo | regex_replace("^.*\/(.*)$", "\1")}}'
version: '{{lookup("vars", "item.branch", default="HEAD")}}'
with_items: '{{plugins}}'
- name: clone plugin repos
when: ansible_os_family == "Windows"
win_git:
repo: 'https://github.com/{{item.repo}}.git'
dest: '{{ansible_env.LOCALAPPDATA}}/nvim/pack/minpac/{{lookup("vars", "item.mode", default="start")}}/{{item.repo | regex_replace("^.*\/(.*)$", "\1")}}'
version: '{{lookup("vars", "item.branch", default="HEAD")}}'

View File

@@ -1,66 +0,0 @@
---
plugins:
- repo: mkitt/tabline.vim
- repo: neoclide/coc.nvim
branch: release
- repo: SirVer/ultisnips
- repo: honza/vim-snippets
- repo: vim-scripts/vimomni
mode: opt
- repo: w0rp/ale
- repo: mhinz/vim-signify
# Text Objects
- repo: kana/vim-textobj-user
# TODO: Doesn't work with nvim
- repo: kana/vim-textobj-entire
- repo: sgur/vim-textobj-parameter
- repo: jceb/vim-textobj-uri
- repo: glts/vim-textobj-comment
- repo: reedes/vim-textobj-sentence
# Tim Pope
- repo: tpope/vim-commentary
- repo: tpope/vim-surround
- repo: tpope/vim-repeat
- repo: tpope/vim-fugitive
- repo: tpope/vim-eunuch
- repo: tpope/vim-vinegar
- repo: tpope/vim-abolish
- repo: tpope/vim-unimpaired
- repo: tpope/vim-speeddating
- repo: godbyk/vim-endwise
branch: patch-1
- repo: tpope/vim-jdaddy
- repo: tpope/vim-projectionist
# Still necessary?
- repo: junegunn/fzf
- repo: junegunn/fzf.vim
# Forgot about this...
- repo: kbenzie/note.vim
# TODO: Move to tmux role?
# Pack 'christoomey/vim-tmux-navigator'
# Pack 'tmux-plugins/vim-tmux-focus-events'
- repo: wincent/replay
- repo: andymass/vim-matchup
- repo: dhruvasagar/vim-table-mode
- repo: vim-scripts/DoxygenToolkit.vim
mode: opt
- repo: guns/xterm-color-table.vim
# Syntax
- repo: kalekundert/vim-coiled-snake
- repo: kbenzie/vim-spirv
- repo: rperier/vim-cmake-syntax
- repo: tikhomirov/vim-glsl
- repo: beyondmarc/hlsl.vim
- repo: frasercrmck/opencl.vim
- repo: asciidoc/vim-asciidoc
- repo: mustache/vim-mustache-handlebars
- repo: joshglendenning/vim-caddyfile
- repo: kbenzie/vim-khr
- repo: jrozner/vim-antlr

46
vimrc
View File

@@ -11,6 +11,14 @@ if has('syntax') && !exists('g:syntax_on')
syntax enable syntax enable
endif endif
if exists('*minpac#init')
" When minpac is loaded define the Pack command to add packages.
command! -nargs=+ Pack call minpac#add(<args>)
else
" Otherwise define the Pack command to do nothing.
command! -nargs=+ Pack
endif
" Append work config to runtimepath and packpath. " Append work config to runtimepath and packpath.
set runtimepath+=~/.config/work set runtimepath+=~/.config/work
set packpath+=~/.config/work set packpath+=~/.config/work
@@ -18,28 +26,20 @@ set packpath+=~/.config/work
" tabline.vim - sanely numbered tabs " tabline.vim - sanely numbered tabs
Pack 'mkitt/tabline.vim' Pack 'mkitt/tabline.vim'
" coc.nvim - Conqueror of Completion " coc.nvim Conqueror of Completion
Pack 'neoclide/coc.nvim', {'branch': 'release'} Pack 'neoclide/coc.nvim', {'branch': 'release'}
let g:coc_global_extensions = [ let g:coc_global_extensions = [
\ 'coc-clangd', \ 'coc-clangd',
\ 'coc-cmake', \ 'coc-cmake',
\ 'coc-css', \ 'coc-css',
\ 'coc-docker',
\ 'coc-html', \ 'coc-html',
\ 'coc-jedi',
\ 'coc-json', \ 'coc-json',
\ 'coc-marketplace', \ 'coc-marketplace',
\ 'coc-pyright', \ 'coc-pyls',
\ 'coc-ultisnips', \ 'coc-ultisnips',
\ 'coc-vimlsp', \ 'coc-vimlsp',
\ 'coc-yaml', \ 'coc-yaml',
\] \]
if has("win32")
let g:coc_global_extensions += [
\ 'coc-powershell'
\]
endif
let g:coc_default_semantic_highlight_groups = 0
" ultisnips - snippet engine " ultisnips - snippet engine
Pack 'SirVer/ultisnips' Pack 'SirVer/ultisnips'
@@ -56,11 +56,11 @@ let g:ale_linters = {'c': [], 'cpp': []}
let g:ale_cmake_cmakelint_options = let g:ale_cmake_cmakelint_options =
\ '-convention/filename,-package/consistency,-package/stdargs' \ '-convention/filename,-package/consistency,-package/stdargs'
" vim-signify - Version control differences in the sign column " Version control differences in the sign column
Pack 'mhinz/vim-signify' Pack 'mhinz/vim-signify'
let g:signify_sign_change = '~'
" Conflict marker utilities " format.vim - format with text objects
Pack 'rhysd/conflict-marker.vim' 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'
@@ -96,10 +96,6 @@ Pack 'tpope/vim-fugitive'
Pack 'tpope/vim-eunuch' Pack 'tpope/vim-eunuch'
" vim-vinegar - improved directory browser " vim-vinegar - improved directory browser
Pack 'tpope/vim-vinegar' Pack 'tpope/vim-vinegar'
if wsl#isDetected()
" Make gx work in WSL
let g:netrw_browsex_viewer='cmd.exe /C start'
endif
" vim-abolish - CamelCase to under_score to mixedCase " vim-abolish - CamelCase to under_score to mixedCase
" TODO: Copy the good bit remove this plugin " TODO: Copy the good bit remove this plugin
Pack 'tpope/vim-abolish' Pack 'tpope/vim-abolish'
@@ -152,9 +148,6 @@ let g:DoxygenToolkit_commentType = 'C++'
" markdown fenced code block languages " markdown fenced code block languages
let g:markdown_fenced_languages = let g:markdown_fenced_languages =
\ ['cpp', 'c', 'cmake', 'console', 'sh', 'vim', 'python', 'yaml'] \ ['cpp', 'c', 'cmake', 'console', 'sh', 'vim', 'python', 'yaml']
" reStructedText enable code styles
let g:rst_style = 1
" reStructuredText code block languages " reStructuredText code block languages
let g:rst_syntax_code_list = { let g:rst_syntax_code_list = {
\ 'vim': ['vim'], \ 'vim': ['vim'],
@@ -165,9 +158,12 @@ let g:rst_syntax_code_list = {
\ 'python': ['python'] \ 'python': ['python']
\ } \ }
" vim-coiled-snake - Python folding " Python folding
Pack 'kalekundert/vim-coiled-snake' Pack 'kalekundert/vim-coiled-snake'
" reStructedText
let g:rst_style = 1
" Enable builtin syntax folding " Enable builtin syntax folding
let g:xml_syntax_folding = 1 let g:xml_syntax_folding = 1
let g:sh_fold_enabled = 1 let g:sh_fold_enabled = 1
@@ -187,3 +183,9 @@ 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