[[plugins]] repo = "kana/vim-textobj-user" [[plugins]] repo = "kana/vim-textobj-line" depends = "vim-textobj-user" hook_add = """ xmap al (textobj-line-a) xmap il (textobj-line-i) omap al (textobj-line-a) omap il (textobj-line-i) """ on_map = { x = "", o = "" } [[plugins]] repo = "rhysd/vim-textobj-anyblock" depends = ["vim-textobj-user"] hook_add = """ xmap ab (textobj-anyblock-a) xmap ib (textobj-anyblock-i) omap ab (textobj-anyblock-a) omap ib (textobj-anyblock-i) """ on_map = { x = "", o = "" } [[plugins]] repo = "thinca/vim-textobj-between" depends = ["vim-textobj-user"] hook_add = """ xmap af (textobj-between-a) xmap if (textobj-between-i) omap af (textobj-between-a) omap if (textobj-between-i) """ on_map = { x = "", o = "" } [[plugins]] repo = "kana/vim-textobj-indent" depends = ["vim-textobj-user"] hook_add = """ xmap ai (textobj-indent-a) xmap ii (textobj-indent-i) omap ai (textobj-indent-a) omap ii (textobj-indent-i) """ on_map = { x = "", o = "" } [[plugins]] repo = "kana/vim-operator-user" [[plugins]] repo = "kana/vim-repeat" [[plugins]] repo = "easymotion/vim-easymotion" hook_add = """ nmap f (easymotion-sn) nmap j (easymotion-j) nmap k (easymotion-k) nmap l (easymotion-lineforward) nmap h (easymotion-linebackward) let g:EasyMotion_smartcase = v:true let g:EasyMotion_use_smartsign_jp = v:true """ on_map = { n = "" } [[plugins]] repo = "hrsh7th/vim-searchx" hook_add = """ " Overwrite / and ?. nnoremap ? call searchx#start({ 'dir': 0 }) nnoremap / call searchx#start({ 'dir': 1 }) xnoremap ? call searchx#start({ 'dir': 0 }) xnoremap / call searchx#start({ 'dir': 1 }) " cnoremap ; call searchx#select() " Move to next/prev match. nnoremap N call searchx#prev_dir() nnoremap n call searchx#next_dir() xnoremap N call searchx#prev_dir() xnoremap n call searchx#next_dir() " nnoremap call searchx#prev() " nnoremap call searchx#next() " xnoremap call searchx#prev() " xnoremap call searchx#next() " cnoremap call searchx#prev() " cnoremap call searchx#next() " Clear highlights " nnoremap call searchx#clear() let g:searchx = { \ 'auto_accept': v:true, \ 'scrolloff': &scrolloff, \ 'scrolltime': 0, \ 'markers': split('ABCDEFGHIJKLMNOPQRSTUVWXYZ', '.\zs'), \ } " Convert search pattern. function g:searchx.convert(input) abort if a:input !~# '\k' return '\V' .. a:input endif return join(split(a:input, ' '), '.\{-}') endfunction """ on_func = "searchx" [[plugins]] repo = "hrsh7th/vim-vsnip" on_map = { x = "", i = "" } hook_add = """ let g:vsnip_snippet_dir = g:config_dir . '/snippets' let g:vsnip_filetypes = { \ 'plaintex': ['tex'], \ 'objc': ['c', 'objc'], \ } """ hook_source = """ imap vsnip#jumpable(+1) ? '(vsnip-jump-next)' : lexima#expand('', 'i') smap vsnip#jumpable(+1) ? '(vsnip-jump-next)' : '' imap vsnip#jumpable(-1) ? '(vsnip-jump-prev)' : '' smap vsnip#jumpable(-1) ? '(vsnip-jump-prev)' : '' """ depends = ["lexima.vim"] # Need this for control order to sourcing on_event = "InsertEnter" [[plugins]] repo = "hrsh7th/vim-vsnip-integ" hook_add = """ augroup vsnip_for_pum autocmd! autocmd User PumCompleteDone call vsnip_integ#on_complete_done(g:pum#completed_item) augroup END """ on_source = "vim-vsnip" [[plugins]] repo = "cohama/lexima.vim" hook_add = """ let g:lexima_map_escape = '' let g:lexima_enable_endwise_rules = v:true let g:lexima_enable_newline_rules = v:true """ hook_source = """ " too long to write here execute 'source ' . g:config_dir . '/mysettings/lexima.vim' if dein#tap('pum.vim') imap pum#visible() ? 'call pum#map#confirm()' : lexima#expand('CR>', 'i') endif """ on_event = "InsertEnter" # Below not work # [[multiple_plugins]] # plugins = ["vim-vsnip", "lexima"] # hook_source = """ # " imap vsnip#jumpable(+1) ? '(vsnip-jump-next)' : lexima#expand('Tab>', 'i') # " xmap vsnip#jumpable(+1) ? '(vsnip-jump-next)' : lexima#expand('Tab>', 'i') # """ [[plugins]] repo = "prabirshrestha/vim-lsp" hook_add = """ function! s:is_node_project(path) abort if isdirectory(a:path . '/node_modules') return v:true elseif (a:path ==# '/') return v:false else return s:is_node_project(fnamemodify(a:path, ':h')) endif endfunction let g:lsp_diagnostics_enabled = v:true let g:lsp_diagnostics_virtual_text_enabled = v:false let g:lsp_diagnostics_echo_cursor = v:true let g:lsp_diagnostics_echo_delay = 100 " let g:lsp_log_verbose = v:true let g:lsp_log_file = ('/tmp/vim-lsp.log') let g:lsp_preview_float = v:false let g:lsp_hover_ui = 'preview' let g:lsp_signature_help_enabled = v:false nmap K enable_help_by_lsp() ? "\(lsp-hover)" : 'K' nmap gd enable_definition_by_lsp() ? "\(lsp-definition)" : 'gd' nmap f (lsp-document-format) nmap d (lsp-document-diagnostics) nmap r (lsp-rename) let g:lsp_settings = { \ 'efm-langserver': { \ 'allowlist': ['markdown'], \ }, \ 'html-langserver': {'allowlist': ['html', 'htmldjango']}, \ 'taplo-lsp': {'workspace_config': {'formatter': {'reorderKeys': v:false}}}, \ 'clangd': {'allowlist': ['c', 'cpp', 'objc']}, \ } let g:lsp_text_edit_enabled = v:true let g:lsp_diagnostics_signs_error = {'text': '🥺'} let g:lsp_diagnostics_signs_warning = {'text': '🤔'} let g:lsp_settings_filetype_objc = ['clangd'] let s:ls_of_jsts = s:is_node_project(expand('%:p:h')) ? 'typescript-language-server' : 'deno' let g:lsp_settings_filetype_typescript = [s:ls_of_jsts] let g:lsp_settings_filetype_javascript = [s:ls_of_jsts] " TODO: 複数のfiletypeを開いてるときにうまく動かない function! s:enable_help_by_lsp() abort let l:servers = lsp#get_server_names() return !(len(l:servers) == 0 \ || uniq(map(l:servers, {_, v -> lsp#capabilities#has_hover_provider(v)})) == [0]) endfunction function s:enable_definition_by_lsp() abort let l:servers = lsp#get_server_names() return !(len(l:servers) == 0 \ || uniq(map(l:servers, {_, v -> lsp#capabilities#has_definition_provider(v)})) == [0]) endfunction """ on_event = "BufRead" [[plugins]] repo = "mattn/vim-lsp-settings" on_source = "vim-lsp" [[plugins]] repo = "machakann/vim-sandwich" hook_add = """ let g:sandwich_no_default_key_mappings = v:true nmap sa (sandwich-add) xmap S (sandwich-add) nmap sd (sandwich-delete) nmap sdb (sandwich-delete-auto) nmap sr (sandwich-replace) nmap srb (sandwich-replace-auto) """ on_map = { n = "", x = "" } [[plugins]] repo = "tyru/caw.vim" hook_add = """ nmap gc (caw:prefix) xmap gc (caw:prefix) " Brute force solution " https://github.com/tyru/caw.vim/issues/166 nmap (caw:prefix)c (caw:hatpos:toggle) xmap (caw:prefix)c (caw:hatpos:toggle) """ depends = ["context_filetype.vim", "vim-repeat"] on_map = { n = "", x = "" } [[plugins]] repo = "markonm/traces.vim" on_event = "CmdlineEnter" # FIXME: If set this false/none, help command confuse like: # :help dps-translate-vim # > trace.vim/doc/dps-translate-vim.txt is not found merged = true [[plugins]] repo = "liuchengxu/vista.vim" depends = ["vim-lsp"] on_cmd = "Vista" hook_add = """ let g:vista_default_executive = 'vim_lsp' """ [[plugins]] repo = "simeji/winresizer" hook_add = """ nnoremap WinResizerStartResize let g:winresizer_vert_resize = 3 """ on_cmd = "WinResizerStartResize" [[plugins]] repo = "thinca/vim-quickrun" hook_add = """ cnoreabbrev qr QuickRun nmap q (quickrun) let g:quickrun_config = extend(get(g:, 'quickrun_config', {}), { \ '_': { \ 'outputter/buffer/close_on_empty': v:true, \ 'outputter/buffer/opener': 'vertical botright new', \ 'hook/time/enable': v:true, \ 'runner': has('nvim') ? 'neovim_job' : 'job', \ }, \ 'typescript': { \ 'command': 'deno', \ 'cmdopt': '--allow-all --unstable', \ 'exec': 'NO_COLOR=1 %c run %o %s', \ }, \ 'elm': { \ 'command': 'elm', \ 'exec': '%c make %S --output %a', \ }, \ 'tex': { \ 'command': 'make', \ 'exec': '%c', \ }, \ 'objc': { \ 'type': 'c', \ 'cmdopt': '-fmodules', \ }, \ }) """ depends = ["vim-quickrun-neovim-job"] on_map = { n = "" } on_cmd = ["QuickRun"] [[plugins]] repo = "lambdalisue/vim-quickrun-neovim-job" [[plugins]] repo = "Omochice/TeXTable.vim" # on_ft = ["tex", "plaintex"] on_cmd = "TeXTable" [[plugins]] repo = "Omochice/TeXOutline.vim" on_cmd = "TeXOutline" [[plugins]] repo = "ntpeters/vim-better-whitespace" hook_add = """ let g:better_whitespace_enabled = v:true let g:strip_whitespace_on_save = v:false """ on_event = "BufRead" [[plugins]] repo = "terryma/vim-expand-region" hook_add = """ xmap v (expand_region_expand) xmap V (expand_region_shrink) if has('nvim') let g:expand_region_text_objects = { \ 'iw' :0, \ 'iW' :0, \ 'i"' :0, \ "i'" :0, \ 'i]' :1, \ 'ib' :1, \ 'iB' :0, \ 'il' :1, \ 'ip' :1, \ 'iL' :1, \ 'aL' :1, \ 'iF' :1, \ 'aF' :1, \ 'iC' :1, \ 'aC' :1, \ 'ie' :0, \ } else let g:expand_region_text_objects = { \ 'iw' :0, \ 'iW' :0, \ 'i"' :0, \ "i'" :0, \ 'i]' :1, \ 'ib' :1, \ 'iB' :0, \ 'il' :1, \ 'ip' :1, \ 'ie' :0, \ } endif """ on_map = { x = "" } # if nvim, depends treesitter-textobjects. depends = ["vim-textobj-user", "vim-textobj-line", "vim-textobj-anyblock"] [[plugins]] repo = "alvan/vim-closetag" hook_add = """ let g:closetag_filenames = '*.html, *,vue, *.xml, *.jsx, *.erb' """ on_ft = ["html", "vue", "xml", "erb", "jsx", "htmldjango"] [[plugins]] repo = "heavenshell/vim-pydocstring" build = "make install" hook_add = """ let g:pydocstring_formatter = 'google' """ on_cmd = ["Pydocstring", "PydocstringFormat"] # [[plugins]] # repo = "fs111/pydoc.vim" # hook_add = """ # let g:pydoc_perform_mappings = v:false # """ # on_ft = "python" # [[plugins]] # repo = "jmcantrell/vim-virtualenv" # on_ft = "python" # [[plugins]] # repo = "PieterjanMontens/vim-pipenv" # on_ft = "python" # the below combination is need jupyter-qtconsole... # I want to see result in file on vim... # # {{{ # [[plugins]] # repo = "goerz/jupytext.vim" # hook_add = """ # let g:jupytext_fmt = 'py:percent' # let g:jupytext_filetyle_map = {'py:percent': 'ipynb'} # """ # on_path = ".ipynb" # # [[plugins]] # repo = "jupyter-vim/jupyter-vim" # hook_add = """ # let g:jupyter_mapkeys = v:false # """ # on_path = ".ipynb" # [plugins.ftplugin] # python = """ # nmap q expand('%:e') ==# 'ipynb' ? # \ 'JupyterSendCell' : # \ '(quickrun)' # """ # # # # [[multiple_plugins]] # # plugins = ["jupytext", "jupyter-vim"] # # hook_add = """ # # augroup jupyter_internal # # autocmd! # # autocmd BufRead,BufEnter *.ipynb set ft=ipynb # # augroup END # # """ # # }}} # # # the below is edit markdown(not ipynb) # # are there any tool that convert markdown <=> ipynb? # # # [[plugins]] # # repo = "hisaknown/jupyterkernel.vim" # repo = "~/workspace/jupyterkernel.vim" # on_cmd = "JupyterKernelConnect" # # # # the below cannot run cell on my environment # # [[plugins]] # # repo = "szymonmaszke/vimpyter" # # on_path = ".ipynb" # [[plugins]] # repo = "thinca/vim-ref" # on_cmd = "Ref" # # or # on_map = { n = "", x = "" } # hook_add = """ # nmap K (ref-keyword) # xmap K (ref-keyword) # """ [[plugins]] repo = "mattn/vim-maketable" on_ft = "markdown" on_cmd = "MakeTable" [[plugins]] # repo = "previm/previm" repo = "Omochice/previm" rev = "support-true/false" on_cmd = "PrevimOpen" hook_add = """ let g:previm_wsl_mode = has('wsl') if has('macunix') let g:previm_open_cmd = 'open' elseif g:previm_wsl_mode let s:nodename = split(system('uname --nodename'))[0] let s:wsl_vivaldi_path = '/mnt/c/Users/' .. s:nodename .. '/AppData/Local/Vivaldi/Application/vivaldi.exe' let g:previm_open_cmd = s:wsl_vivaldi_path else let g:previm_open_cmd = $BROWSER endif let g:previm_show_header = v:false """ [[plugins]] repo = "ap/vim-css-color" on_ft = ["css", "scss"] [[plugins]] repo = "pechorin/any-jump.vim" hook_add = """ let g:any_jump_disable_default_keybindings = v:true nnoremap AnyJump """ on_cmd = ["AnyJump", "AnyJunpVisual", "AnyJumpBack", "AnyJumpLastResults"] [[plugins]] repo = "y0za/vim-reading-vimrc" on_cmd = ["ReadingVimrcNext", "ReadingVimrcList", "ReadingVimrcLoad", "ReadingVimrcCopy"] hook_source = """ function! s:reading_copy(line1, line2) abort let l:file = expand('%:t') if a:line1 == a:line2 let l:line = printf('L%d', a:line1) else let l:line = printf('L%d+%d', a:line1, a:line2 - a:line1) endif let @+ = input('', printf('%s#%s ', l:file, l:line)) endfunction command! -range ReadingVimrcCopy call reading_copy(, ) """ [[plugins]] repo = "lambdalisue/suda.vim" hook_add = """ let g:suda_smart_edit = v:true """ on_event = "BufRead" [[plugins]] repo = "Shougo/context_filetype.vim" hook_source = """ let g:context_filetype#ignore_patterns = { \ 'toml': ['^\s*#\s*'], \ } """ [[plugins]] repo = "nvim-treesitter/nvim-treesitter" if = "has('nvim')" on_event = "BufRead" hook_post_update = "TSUpdate" # TODO: change to 'maintained' hook_source = """ lua <(operator-replace) xmap R (operator-replace) """ [[plugins]] repo = "mattn/vim-treesitter" build = "cd server && go build" if = "!has('nvim')" [[plugins]] repo = "christoomey/vim-tmux-navigator" hook_add = """ let g:tmux_navigator_no_mappings = v:true " nnoremap nnoremap TmuxNavigateLeft nnoremap TmuxNavigateDown nnoremap TmuxNavigateUp nnoremap TmuxNavigateRight " xnoremap xnoremap TmuxNavigateLeft xnoremap TmuxNavigateDown xnoremap TmuxNavigateUp xnoremap TmuxNavigateRight " lnoremap lnoremap TmuxNavigateLeft lnoremap TmuxNavigateDown lnoremap TmuxNavigateUp lnoremap TmuxNavigateRight " tnoremap tnoremap TmuxNavigateLeft tnoremap TmuxNavigateDown tnoremap TmuxNavigateUp tnoremap TmuxNavigateRight """ on_cmd = [ "TmuxNavigateLeft", "TmuxNavigateDown", "TmuxNavigateUp", "TmuxNavigateRight", ] if = "has('wsl')" [[plugins]] repo = "machakann/vim-vimhelplint" on_ft = "help" [plugins.ftplugin] help = """ nnoremap d VimhelpLint! """ [[plugins]] repo = "mattn/vim-sonictemplate" on_func = "fzf#sonictemplate#run" hook_add = """ let g:sonictemplate_vim_template_dir = g:config_dir . '/templates' nnoremap [fzf-p] call fzf#sonictemplate#run() " nnoremap [fzf-p]t call fzf#sonictemplate#run() """ [[plugins]] repo = "junegunn/fzf" build = "./install --all" merged = 0 [[plugins]] # FIXME: 初回起動だけ枠線とかがうまく表示されない # ref: https://github.com/Omochice/dotfiles/issues/12 repo = "yuki-yano/fzf-preview.vim" rev = "release/rpc" hook_add = """ nnoremap [fzf-p] nmap [fzf-p] nnoremap [fzf-p] FzfPreviewDirectoryFilesRpc nnoremap [fzf-p]c FzfPreviewCommandPaletteRpc nnoremap [fzf-p]g :FzfPreviewProjectGrepRpc nnoremap [fzf-p] FzfPreviewProjectMrwFilesRpc --add-fzf-arg=--no-sort nnoremap [fzf-p] FzfPreviewAllBuffersRpc let g:fzf_preview_fzf_preview_window_option = 'right:50%' let g:fzf_preview_use_dev_icons = v:true let g:fzf_preview_dev_icon_prefix_string_length = 3 let g:fzf_preview_dev_icons_limit = 5000 let g:fzf_preview_grep_cmd = 'rg --line-number --no-heading --color=never --sort=path --with-filename' """ depends = ["vim-devicons", "fzf"] on_cmd = [ "FzfPreviewAllBuffersRpc", "FzfPreviewCommandPaletteRpc", "FzfPreviewDirectoryFilesRpc", "FzfPreviewProjectGrepRpc", "FzfPreviewProjectMrwFilesRpc", ] [[plugins]] repo = "pappasam/vim-filetype-formatter" hook_add = """ " TODO: If exists makefile, package.json, etc, use it. let g:vim_filetype_formatter_commands = { \ 'ruby': 'rufo -x', \ 'json': 'jq .', \ 'python': 'black --quiet - | isort --quiet -', \ 'go': 'goimports | gofmt', \ 'typescript': 'deno fmt -', \ 'sh': 'shfmt -ln bash -i 2 -bn -ci -sr -kp', \ 'fortran': 'fprettify -i 2 -S', \ 'elm': 'elm-format --stdin', \ 'dockerfile': 'dockfmt fmt', \ } let g:vim_filetype_formatter_ft_maps = { \ 'bash': 'sh', \ } """ on_cmd = "FiletypeFormat" [plugins.ftplugin] ruby = "nnoremap f FiletypeFormat" json = "nnoremap f FiletypeFormat" python = "nnoremap f FiletypeFormat" go = "nnoremap f FiletypeFormat" sh = "nnoremap f FiletypeFormat" bash = "nnoremap f FiletypeFormat" fortran = "nnoremap f FiletypeFormat" elm = "nnoremap f FiletypeFormat" typescript = "nnoremap f FiletypeFormat" dockerfile = "nnoremap f FiletypeFormat" [[plugins]] repo = "voldikss/vim-floaterm" hook_add = """ command! Lazygit FloatermNew --autoclose=2 --autohide=0 --opener=tabe --height=1.0 --width=1.0 --title=lazygit lazygit command! Ranger FloatermNew --autoclose=2 --autohide=0 --opener=tabe --height=1.0 --width=1.0 --title=ranger ranger command! CreatePR FloatermNew --autoclose=2 --autohide=0 --opener=tabe --height=0.7 --width=0.7 --title=PR gh pr create command! CreateIssue FloatermNew --autoclose=2 --autohide=0 --opener=tabe --height=0.7 --width=0.7 --title=Issue gh issue create command! Fkill FloatermKill cnoreabbrev pr CreatePR cnoreabbrev issue CreateIssue nnoremap Lazygit """ on_cmd = ["FloatermNew"] [plugins.ftplugin] floaterm = "tnoremap "