diff options
| author | Robert Günzler <r@gnzler.io> | 2021-02-20 21:27:26 +0100 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2021-04-26 02:09:43 +0200 |
| commit | 1996ef15613f2d4773017128bba1a719a1b63a19 (patch) | |
| tree | aa291b56947f0f710c96c62758990de3b2939bba /.vim/after/ftplugin | |
| parent | 30451238df36d238fea816f01ca987853c6562a5 (diff) | |
Move to lua based vimrc
Diffstat (limited to '.vim/after/ftplugin')
| -rw-r--r-- | .vim/after/ftplugin/c.vim | 88 | ||||
| -rw-r--r-- | .vim/after/ftplugin/clap_input.vim | 6 | ||||
| -rw-r--r-- | .vim/after/ftplugin/crontab.vim | 1 | ||||
| -rw-r--r-- | .vim/after/ftplugin/diff.vim | 33 | ||||
| -rw-r--r-- | .vim/after/ftplugin/gitrebase.vim | 8 | ||||
| -rw-r--r-- | .vim/after/ftplugin/go.vim | 77 | ||||
| -rw-r--r-- | .vim/after/ftplugin/gomod.vim | 1 | ||||
| -rw-r--r-- | .vim/after/ftplugin/gotmpl.vim | 1 | ||||
| -rw-r--r-- | .vim/after/ftplugin/i3.vim | 1 | ||||
| -rw-r--r-- | .vim/after/ftplugin/ledger.vim | 1 | ||||
| -rw-r--r-- | .vim/after/ftplugin/mail.vim | 20 | ||||
| -rw-r--r-- | .vim/after/ftplugin/make.vim | 2 | ||||
| -rw-r--r-- | .vim/after/ftplugin/markdown.vim | 27 | ||||
| -rw-r--r-- | .vim/after/ftplugin/python.vim | 4 | ||||
| -rw-r--r-- | .vim/after/ftplugin/rust.vim | 72 | ||||
| -rw-r--r-- | .vim/after/ftplugin/snippets.vim | 1 | ||||
| -rw-r--r-- | .vim/after/ftplugin/tex.vim | 23 | ||||
| -rw-r--r-- | .vim/after/ftplugin/toml.vim | 6 | ||||
| -rw-r--r-- | .vim/after/ftplugin/vim.vim | 1 | ||||
| -rw-r--r-- | .vim/after/ftplugin/yaml.vim | 2 |
20 files changed, 0 insertions, 375 deletions
diff --git a/.vim/after/ftplugin/c.vim b/.vim/after/ftplugin/c.vim deleted file mode 100644 index 2d275a6..0000000 --- a/.vim/after/ftplugin/c.vim +++ /dev/null @@ -1,88 +0,0 @@ -" setlocal cindent - -" setlocal foldmethod=syntax -" setlocal foldlevel=10 - -if exists('g:loaded_nvim_treesitter') - set foldmethod=expr - set foldexpr=nvim_treesitter#foldexpr() -endif - -if exists('g:loaded_gutentags') - let g:gutentags_enabled = 1 -endif - -let g:neoformat_enabled_c = [] - -" toggle between header and implementation in c/cpp -function! Alternate_c() - let file = expand('%') - if match(file, '\.c') > 0 - exe ':e %<.h' - elseif match(file, '\.h') > 0 - exe ':e %<.c' - endif -endfunction - -nmap <Leader>a :call alternate#alternate() - -" source: https://github.com/igankevich/mesonic/blob/master/plugin/meson.vim -function! MesonProjectDir() - let l:dir = getcwd() " a starting directory to look for meson.build file - let l:project_dir = l:dir " the top-most directory with meson.build file - let l:nesting = 100 " maximal no. of subdirectories in a project - - " find top-most directory with readable meson.build file - while fnamemodify(l:dir, ':p') !=# '/' && l:nesting > 0 - if filereadable(l:dir . '/' . 'meson.build') - let l:project_dir = l:dir - endif - let l:dir = l:dir . '/..' - let l:nesting = l:nesting - 1 - endwhile - - " why one needs to do it two times? - let l:project_dir = fnamemodify(l:project_dir, ':p') - let l:project_dir = fnamemodify(l:project_dir, ':p') - return l:project_dir -endfunction - -if exists('g:loaded_neomake') - function! s:ninja_InitForJob(_jobinfo) dict - " set cwd to project dir - if !has_key(self, 'cwd') - let self.cwd = MesonProjectDir() - endif - " generate new error format lines - " source: https://github.com/igankevich/mesonic/blob/master/compiler/meson.vim#L67 - if !has_key(self, 'errorformat') - let g:meson_error_format = [ - \ '%EMeson encountered an error in file ' . l:project_subdir . '%f\, line %l\, column %c:,%Z%m', - \ '%Dninja: Entering directory `%f''', - \ '%f:%l.%c-%[%^:]%#: %t%[%^:]%#: %m' - \ ] - let self.errorformat = join(g:meson_error_format, ',') - endif - return self - endfunction - function! s:ninja_postprocess(entry) - if empty(a:entry.type) - let a:entry.type = 'E' - endif - endfunction - let g:neomake_c_ninja_maker = { - \ 'exe': 'ninja', - \ 'args': ['-C', 'build'], - \ 'append_file': 0, - \ 'postprocess': function('s:ninja_postprocess'), - \ 'InitForJob': function('s:ninja_InitForJob'), - \ } - let g:neomake_c_ninjaclean_maker = { - \ 'exe': 'ninja', - \ 'args': ['-C', 'build', 'clean'], - \ 'append_file': 0, - \ 'postprocess': function('s:ninja_postprocess'), - \ 'InitForJob': function('s:ninja_InitForJob'), - \ } - let g:neomake_c_enabled_makers = ['ninja'] -endif diff --git a/.vim/after/ftplugin/clap_input.vim b/.vim/after/ftplugin/clap_input.vim deleted file mode 100644 index 6579064..0000000 --- a/.vim/after/ftplugin/clap_input.vim +++ /dev/null @@ -1,6 +0,0 @@ - -nnoremap <silent><buffer> q :<c-u>call clap#handler#exit()<CR> -inoremap <silent><buffer> <C-n> <C-R>=clap#navigation#linewise('down')<CR> -inoremap <silent><buffer> <C-p> <C-R>=clap#navigation#linewise('up')<CR> -nnoremap <silent><buffer> <C-n> :<c-u> call clap#navigation#linewise('down')<CR> -nnoremap <silent><buffer> <C-p> :<c-r> call clap#navigation#linewise('up')<CR> diff --git a/.vim/after/ftplugin/crontab.vim b/.vim/after/ftplugin/crontab.vim deleted file mode 100644 index 46faa33..0000000 --- a/.vim/after/ftplugin/crontab.vim +++ /dev/null @@ -1 +0,0 @@ -autocmd filetype crontab setlocal nobackup nowritebackup diff --git a/.vim/after/ftplugin/diff.vim b/.vim/after/ftplugin/diff.vim deleted file mode 100644 index 49974ec..0000000 --- a/.vim/after/ftplugin/diff.vim +++ /dev/null @@ -1,33 +0,0 @@ -" disable annoying plugins -let b:coc_enabled = 0 -silent NeomakeDisable - -command! FindMergeMarker execute 'normal /^<<<<<<</<CR>' - -" shortcuts for 3-way merges -command! DiffGetLocal :diffget LOCAL -command! DiffGetRemote :diffget REMOTE -" quicksave -command! DiffSave :wqa - -cnoreabbrev fmm FindMergeMarker -cnoreabbrev dgl DiffGetLocal -cnoreabbrev dgr DiffGetRemote -cnoreabbrev ds DiffSave - - -let s:markers = { - \ 'ours': '^<<<<<<< ', - \ 'theirs': '^>>>>>>> ', - \ 'base': '^||||||| ', - \ 'delimiter': '^=======\r\?$', - \ } - -if &diff - " set custom ctags in diff mode - - let _ft=&filetype - let g:vista_ctags_cmd = { - \ _ft: 'ctags --format=2 --excmd=pattern --fields=nksSaf --file-scope=yes --sort=no --append=no --output-format=json --fields=-PF -f-', - \ } -endif diff --git a/.vim/after/ftplugin/gitrebase.vim b/.vim/after/ftplugin/gitrebase.vim deleted file mode 100644 index e97d225..0000000 --- a/.vim/after/ftplugin/gitrebase.vim +++ /dev/null @@ -1,8 +0,0 @@ -set keywordprg=:GitShow -command! -nargs=1 -bar GitShow call s:git_show(<f-args>) - -function! s:git_show(commit) abort - let p = popup#new({ 'filetype': 'diff' }) - let p.contents = systemlist("git show ".a:commit) - call p.open() -endfunction diff --git a/.vim/after/ftplugin/go.vim b/.vim/after/ftplugin/go.vim deleted file mode 100644 index b5c0d44..0000000 --- a/.vim/after/ftplugin/go.vim +++ /dev/null @@ -1,77 +0,0 @@ -setlocal noexpandtab -setlocal shiftwidth=8 -setlocal tabstop=8 - -let g:go_echo_go_info = 0 -let g:go_auto_type_info = 0 -" let g:go_info_mode = 'gocode' -" let g:go_auto_sameids = 1 -" let g:go_gocode_unimported_packages = 0 -" let g:go_list_type = 'quickfix' -let g:go_template_autocreate = 0 - -let g:go_mod_fmt_autosave = 1 -let g:go_fmt_autosave = 1 -let g:go_fmt_command = 'goimports' -let g:go_fmt_fail_silently = 1 -let g:go_fmt_experimental = 1 " solves https://github.com/fatih/vim-go/issues/502 - -" let g:go_term_enabled = 0 -" let g:go_term_mode = 'split' - -let g:go_metalinter_autosave = 0 -let g:go_metalinter_enabled = ['vet', 'golint', 'errcheck'] -let g:go_metalinter_autosave_enabled = ['vet', 'golint'] -let g:go_metalinter_deadline = '2s' - -" let g:go_highlight_functions = 1 -" let g:go_highlight_methods = 1 -" let g:go_highlight_fields = 1 -" let g:go_highlight_structs = 1 -" let g:go_highlight_interfaces = 1 -" let g:go_highlight_build_constraints = 1 -" let g:go_highlight_types = 1 -" let g:go_highlight_extra_types = 1 -" let g:go_highlight_operators = 1 -" let g:go_highlight_space_tab_error = 1 -" let g:go_highlight_array_whitespace_error = 1 -" let g:go_highlight_trailing_whitespace_error = 1 - -function! Alternate_go() - call <Plug>(go-alternate-edit) -endfunction - -" augroup go -" au! -" au VimEnter go call vista#RunForNearestMethodOrFunction() -" augroup END - -if exists('g:loaded_neomake') - let g:neomake_go_build_maker = { - \ 'exe': 'go', - \ 'args': 'build', - \ 'append_file': 0, - \ } - " let g:neomake_go_golangci_lint_args = ['run', '--out-format=line-number', '--print-issued-lines=false'] - let g:neomake_go_enabled_makers = ['go', 'golangci_lint'] -endif - -" https://github.com/fatih/dotfiles/blob/master/vimrc#L380 -" create a go doc comment based on the word under the cursor -function! s:create_go_doc_comment() - norm "zyiw - execute ":put! z" - execute ":norm I// \<Esc>$" -endfunction -nnoremap <Leader>ui :<C-u>call <SID>create_go_doc_comment()<CR> - -" let b:deoplete_disable_auto_complete = 0 -" let g:neoformat_enabled_go = [] -" - -if exists('g:did_coc_loaded') - augroup CoC - au! - au BufWritePre * CocCommand editor.action.organizeImport - augroup END -endif diff --git a/.vim/after/ftplugin/gomod.vim b/.vim/after/ftplugin/gomod.vim deleted file mode 100644 index 96369aa..0000000 --- a/.vim/after/ftplugin/gomod.vim +++ /dev/null @@ -1 +0,0 @@ -set commentstring=//\ %s diff --git a/.vim/after/ftplugin/gotmpl.vim b/.vim/after/ftplugin/gotmpl.vim deleted file mode 100644 index cf481c4..0000000 --- a/.vim/after/ftplugin/gotmpl.vim +++ /dev/null @@ -1 +0,0 @@ -set commentstring=<!--\ %s\ --> diff --git a/.vim/after/ftplugin/i3.vim b/.vim/after/ftplugin/i3.vim deleted file mode 100644 index 9c2e80a..0000000 --- a/.vim/after/ftplugin/i3.vim +++ /dev/null @@ -1 +0,0 @@ -set commentstring=#\ %s diff --git a/.vim/after/ftplugin/ledger.vim b/.vim/after/ftplugin/ledger.vim deleted file mode 100644 index 0aa29a3..0000000 --- a/.vim/after/ftplugin/ledger.vim +++ /dev/null @@ -1 +0,0 @@ -let g:ledger_bin = 'hledger' diff --git a/.vim/after/ftplugin/mail.vim b/.vim/after/ftplugin/mail.vim deleted file mode 100644 index cdfbfc6..0000000 --- a/.vim/after/ftplugin/mail.vim +++ /dev/null @@ -1,20 +0,0 @@ -" backup aerc mails to a draft directory -let g:mail_draft_dir = $HOME.'/.aerc/drafts' - -function! SaveDraft() - if !isdirectory(g:mail_draft_dir) - call mkdir(g:mail_draft_dir, 'p') - endif - let draft = join([g:mail_draft_dir, systemlist('now')[0] . '_' .expand('%:t')], '/') - execute 'silent! write! '.draft -endfunction - -augroup vim_mail - au! - au CursorHold * call SaveDraft() -augroup END - -set commentstring=>\ %s -set showtabline=0 - -command! DraftSave call SaveDraft() diff --git a/.vim/after/ftplugin/make.vim b/.vim/after/ftplugin/make.vim deleted file mode 100644 index 840c87a..0000000 --- a/.vim/after/ftplugin/make.vim +++ /dev/null @@ -1,2 +0,0 @@ -" Disable tabs->spaces for Makefiles -autocmd filetype make setlocal noexpandtab diff --git a/.vim/after/ftplugin/markdown.vim b/.vim/after/ftplugin/markdown.vim deleted file mode 100644 index 0d42ff0..0000000 --- a/.vim/after/ftplugin/markdown.vim +++ /dev/null @@ -1,27 +0,0 @@ -setlocal foldlevel=1 - -if exists('g:loaded_lexima') - let g:lexima_enable_space_rules=0 -endif - -function! s:markdown_underline(bang) - call append(line('.'), substitute(getline('.'), '.', (a:bang ? '-' : '='), 'g')) -endfunction -command! -nargs=0 -bang Underline call s:markdown_underline(<bang>0) - -if exists('g:loaded_neomake') - let g:neomake_markdown_shiba_maker = { - \ 'exe': 'shiba', - \ 'args': ['--detach', '%:p'], - \ 'append_file': 0, - \ } - let g:neomake_markdown_enabled_makers = [] -endif - -augroup Markdown - au! - " au FileType markdown NeomakeDisableBuffer - - " Make vim-markdown-folding ignore frontmatter blocks - au BufNewFile,BufRead markdown syntax match Comment /\%^---\_.\{-}---$/ -augroup END diff --git a/.vim/after/ftplugin/python.vim b/.vim/after/ftplugin/python.vim deleted file mode 100644 index abdaca6..0000000 --- a/.vim/after/ftplugin/python.vim +++ /dev/null @@ -1,4 +0,0 @@ -let g:neomake_python_enabled_makers = [] -let g:neoformat_enabled_python = ["yapf"] -let g:neoformat_python_maker_yapf_args = ["--style=pep8"] - diff --git a/.vim/after/ftplugin/rust.vim b/.vim/after/ftplugin/rust.vim deleted file mode 100644 index 9bf2ca9..0000000 --- a/.vim/after/ftplugin/rust.vim +++ /dev/null @@ -1,72 +0,0 @@ -set tags='./rusty-tags.vi/' - -if exists('g:loaded_lexima') - call lexima#add_rule({'filetype': ['rust'], 'char': "'", 'at': '<\%# | &\%#'}) -endif - -let g:racer_cmd = $HOME.'/.cargo/bin/racer' - -" let g:gutentags_enabled = 0 -" let g:gutentags_define_advanced_commands = 1 -" let g:gutentags_ctags_executable_rust = 'rusty-tags' -" let g:gutentags_ctags_extra_args = ['--omit-deps', 'vi'] -" let g:gutentags_ctags_tagfile = 'rusty-tags.vi' - -" when using standard ctags -let g:tagbar_type_rust = { - \ 'ctagstype' : 'rust', - \ 'kinds' : [ - \'T:types,type definitions', - \'f:functions,function definitions', - \'g:enum,enumeration names', - \'s:structure names', - \'m:modules,module names', - \'c:consts,static constants', - \'t:traits', - \'i:impls,trait implementations', - \] - \} - -" when using universal-ctags -" let g:rust_use_custom_ctags_defs = 1 " if using rust.vim -" let g:tagbar_type_rust = { -" \ 'ctagstype' : 'rust', -" \ 'kinds' : [ -" \ 'n:modules', -" \ 's:structures:1', -" \ 'i:interfaces', -" \ 'c:implementations', -" \ 'f:functions:1', -" \ 'g:enumerations:1', -" \ 't:type aliases:1:0', -" \ 'v:constants:1:0', -" \ 'M:macros:1', -" \ 'm:fields:1:0', -" \ 'e:enum variants:1:0', -" \ 'P:methods:1', -" \ ], -" \ 'sro': '::', -" \ 'kind2scope' : { -" \ 'n': 'module', -" \ 's': 'struct', -" \ 'i': 'interface', -" \ 'c': 'implementation', -" \ 'f': 'function', -" \ 'g': 'enum', -" \ 't': 'typedef', -" \ 'v': 'variable', -" \ 'M': 'macro', -" \ 'm': 'field', -" \ 'e': 'enumerator', -" \ 'P': 'method', -" \ }, -" \ } - -let g:neomake_rust_enabled_makers = ['cargo'] - -" augroup rust -" au! -" augroup END - -" nmap <Leader>d <Plug>(rust-doc) -" nmap <Leader>j <Plug>(rust-def) diff --git a/.vim/after/ftplugin/snippets.vim b/.vim/after/ftplugin/snippets.vim deleted file mode 100644 index cb39fa6..0000000 --- a/.vim/after/ftplugin/snippets.vim +++ /dev/null @@ -1 +0,0 @@ -set list diff --git a/.vim/after/ftplugin/tex.vim b/.vim/after/ftplugin/tex.vim deleted file mode 100644 index 88d4f11..0000000 --- a/.vim/after/ftplugin/tex.vim +++ /dev/null @@ -1,23 +0,0 @@ - -nnoremap <leader>c :call vimtex#compiler#compile()<cr> -" augroup Vimtex -" au! -" au BufWritePost * silent call vimtex#compiler#compile() -" augroup END - -" if exists('g:loaded_neomake') -" let g:neomake_tex_tectonic_maker = { -" \ 'exe': 'tectonic', -" \ 'append_file': 1, -" \ 'errorformat': -" \ '%Eerror: something bad happened inside TeX; its output follows:,'. -" \ '%C^[=]+$,'. -" \ '%C(%f,'. -" \ '%C.*,'. -" \ '%C! %m,'. -" \ '%Cl.%l %s,'. -" \ '%C^[=]+$,'. -" \ '%-Zcaused by: %s,' -" \ } -" let g:neomake_tex_enabled_makers = ['tectonic'] -" endif diff --git a/.vim/after/ftplugin/toml.vim b/.vim/after/ftplugin/toml.vim deleted file mode 100644 index 03bf098..0000000 --- a/.vim/after/ftplugin/toml.vim +++ /dev/null @@ -1,6 +0,0 @@ -" let g:neoformat_toml_tomlfix = { -" \ 'exe': 'tomlfix', -" \ 'args': ['-w'], -" \ 'replace': 1, -" \ } -" let g:neoformat_enabled_toml = ['tomlfix'] diff --git a/.vim/after/ftplugin/vim.vim b/.vim/after/ftplugin/vim.vim deleted file mode 100644 index a6014c7..0000000 --- a/.vim/after/ftplugin/vim.vim +++ /dev/null @@ -1 +0,0 @@ -set foldmethod=marker diff --git a/.vim/after/ftplugin/yaml.vim b/.vim/after/ftplugin/yaml.vim deleted file mode 100644 index 2d09076..0000000 --- a/.vim/after/ftplugin/yaml.vim +++ /dev/null @@ -1,2 +0,0 @@ -" fix indent -set et sts=2 |