[[plugins]] repo = 'https://github.com/4513ECHO/lightline-ddu-ui-ff' on_source = ['lightline.vim'] [[plugins]] repo = 'https://github.com/4513ECHO/registerm.vim' on_map = { t = '' } hook_add = ''' tnoremap (registerm) tnoremap (registerm-getchar) ''' [[plugins]] repo = 'https://github.com/4513ECHO/vim-readme-viewer' on_cmd = ['DeinReadme'] on_source = ['ddu.vim'] hook_add = ''' let g:readme_viewer#plugin_manager = 'dein.vim' ''' [[plugins]] repo = 'https://github.com/4513ECHO/vim-snipewin' on_func = ['snipewin#select'] on_map = { n = '' } hook_add = ''' let g:snipewin_label_chars = 'ASDFGHJKLQWERTYUIOP' let g:snipewin_label_font = 'asciian_inverted' nnoremap W (snipewin) nnoremap X call snipewin#select({ winid -> snipewin#callback#swap(winid) }) nnoremap O call snipewin#select({ winid -> snipewin#callback#only(winid) }) ''' [[plugins]] repo = 'https://github.com/4513ECHO/vim-vimhelp-url' on_cmd = ['HelpUrl'] [[plugins]] repo = 'https://github.com/bronson/vim-trailing-whitespace' on_cmd = ['FixWhitespace'] on_event = ['InsertLeave'] hook_add = ''' let g:extra_whitespace_ignored_filetypes = ['diff', 'help', 'capture', 'tsv'] ''' [[plugins]] repo = 'https://github.com/chrisbra/Recover.vim' on_event = ['BufWinEnter', 'FocusGained', 'SwapExists'] [[plugins]] repo = 'https://github.com/christoomey/vim-tmux-navigator' if = '!has("gui_running")' on_cmd = [ 'TmuxNavigateLeft', 'TmuxNavigateDown', 'TmuxNavigateUp', 'TmuxNavigateRight', ] hook_add = ''' let g:tmux_navigator_no_mappings = v:true nnoremap TmuxNavigateLeft nnoremap TmuxNavigateDown nnoremap TmuxNavigateUp nnoremap TmuxNavigateRight ''' [[plugins]] repo = 'https://github.com/cocopon/lightline-hybrid.vim' [[plugins]] repo = 'https://github.com/cohama/lexima.vim' on_event = ['InsertEnter', 'CmdlineEnter'] hooks_file = '$DEIN_DIR/settings/lexima.vim' [[plugins]] repo = 'https://github.com/github/copilot.vim' on_cmd = ['Copilot'] on_event = ['InsertEnter'] hook_add = ''' let g:copilot_no_maps = v:true inoremap copilot#Accept() inoremap copilot#AcceptWord() inoremap call copilot#Next() inoremap call copilot#Previous() autocmd vimrc OptionSet buftype \ : if !empty(&buftype) && &buftype !=# 'acwrite' && bufname() !=# 'mininote' \ | let b:copilot_enabled = v:false \ | endif ''' [[plugins]] repo = 'https://github.com/halkn/lightline-lsp' on_source = ['lightline.vim'] if = '!has("nvim")' [[plugins]] repo = 'https://github.com/haya14busa/dein-command.vim' on_cmd = ['Dein'] [[plugins]] repo = 'https://github.com/haya14busa/vim-asterisk' on_map = { nx = '' } hook_add = ''' let g:asterisk#keeppos = v:true nnoremap * (asterisk-z*)(search-post) nnoremap # (asterisk-z#)(search-post) nnoremap g* (asterisk-gz*)(search-post) nnoremap g# (asterisk-gz#)(search-post) xnoremap * (asterisk-z*)(search-post) xnoremap # (asterisk-z#)(search-post) xnoremap g* (asterisk-gz*)(search-post) xnoremap g# (asterisk-gz#)(search-post) ''' [[plugins]] repo = 'https://github.com/haya14busa/vim-edgemotion' on_map = { nx = '' } hook_add = ''' nnoremap (edgemotion-j) nnoremap (edgemotion-k) xnoremap (edgemotion-j) xnoremap (edgemotion-k) ''' [[plugins]] repo = 'https://github.com/hrsh7th/vim-searchx' on_func = ['searchx#'] hook_add = ''' let g:searchx = #{ \ auto_accept: v:true, \ markers: split('ASDFGHJKLQWERTYUIOPZXCVBNM', '.\zs'), \ nohlsearch: #{ jump: v:true }, \ scrolltime: 200, \ scrolloff: &scrolloff, \ } function! g:searchx.convert(input) abort if a:input !~# '\k' && a:input !~# '\v^^|[*$]$' return '\V' .. a:input endif return a:input->split('\s\+')->join('.\{-}') endfunction autocmd vimrc User SearchxLeave call searchx#clear() autocmd vimrc User SearchxAccept normal! zzzv 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#next_dir()(search-post) cnoremap call searchx#prev_dir()(search-post) nnoremap N call searchx#prev_dir()(search-post) nnoremap n call searchx#next_dir()(search-post) xnoremap N call searchx#prev_dir()(search-post) xnoremap n call searchx#next_dir()(search-post) ''' [[plugins]] repo = 'https://github.com/itchyny/lightline.vim' lazy = true hook_add = ''' autocmd vimrc VimEnter * ++once call timer_start(0, { -> dpp#source('lightline.vim') }) autocmd vimrc ModeChanged t:n* call lightline#update() ''' hook_source = ''' let g:lightline = #{ \ subseparator: #{ left: '/', right: '/' }, \ tabline_subseparator: #{ left: '|', right: '|' }, \ active: #{ \ left: [ \ ['mode', 'paste'], \ ['readonly', 'filename', 'modified'], \ ['protocol', 'ddu-ui-ff'] + (has('nvim') ? [] : ['lsp_progress']), \ ], \ right: [ \ ['lsp_errors', 'lsp_warnings', 'lineinfo'], \ ['percent'], \ ['colorscheme', 'fileformat', 'fileencoding', 'filetype'], \ ], \ }, \ inactive: #{ left: [['filename', 'modified']] }, \ tabline: #{ left: [['tabs']], right: [] }, \ tab: #{ \ active: ['tabnum', 'tabname'], \ inactive: ['tabnum', 'tabname'], \ }, \ component: #{ \ lineinfo: '%3l:%-2v', \ }, \ component_function: #{ \ colorscheme: 'lightline#component#vimrc#colorscheme', \ ddu-ui-ff: 'lightline#ddu_ui_ff#component', \ fileencoding: 'lightline#component#vimrc#file_encoding', \ fileformat: 'lightline#component#vimrc#file_format', \ filename: 'lightline#component#vimrc#filename', \ lsp_progress: 'lightline_lsp_progress#progress', \ mode: 'lightline#component#vimrc#mode', \ modified: 'lightline#component#vimrc#modified', \ protocol: 'lightline#component#vimrc#protocol', \ readonly: 'lightline#component#vimrc#readonly', \ }, \ component_expand: #{ \ lsp_errors: has('nvim') ? 'lightline#lsp#errors' :'lightline_lsp#errors', \ lsp_warnings: has('nvim') ? 'lightline#lsp#warnings' :'lightline_lsp#warnings', \ }, \ component_type: #{ \ lsp_errors: 'error', \ lsp_warnings: 'warning', \ }, \ tab_component_function: #{ \ tabname: 'lightline#component#vimrc#tabname', \ }, \ } let &laststatus = has('nvim') ? 3 : 2 call user#colorscheme#update_lightline() messages ''' [[plugins]] repo = 'https://github.com/itchyny/vim-external' on_map = { nx = '' } hook_add = ''' nnoremap gx (external-browser) xnoremap gx (external-browser) ''' [[plugins]] repo = 'https://github.com/kana/vim-niceblock' on_map = { x = '' } hook_add = ''' xnoremap I (niceblock-I) xnoremap gI (niceblock-gI) xnoremap A (niceblock-A) ''' [[plugins]] repo = 'https://github.com/kana/vim-submode' on_map = { n = '' } hook_add = ''' let g:submode_always_show_submode = v:true let g:submode_keep_leaving_key = v:true nnoremap > (submode-dummy) nnoremap < (submode-dummy) nnoremap + (submode-dummy) nnoremap - (submode-dummy) nnoremap zl (submode-dummy) nnoremap zh (submode-dummy) nnoremap zL (submode-dummy) nnoremap zH (submode-dummy) nnoremap zj (submode-dummy) nnoremap zk (submode-dummy) ''' hook_source = ''' " resize window for s:k in ['>', '<', '+', '-'] call submode#enter_with('resizewin', 'n', '', $'{s:k}', $'{s:k}') call submode#map('resizewin', 'n', '', s:k, $'{s:k}') endfor " scroll without cursor moving for s:k in ['l', 'h', 'L', 'H'] call submode#enter_with('stickycursor', 'n', '', $'z{s:k}', $'z{s:k}') call submode#map('stickycursor', 'n', '', s:k, $'z{s:k}') endfor for [s:k1, s:k2] in [['j', ''], ['k', '']] call submode#enter_with('stickycursor', 'n', '', $'z{s:k1}', s:k2) call submode#map('stickycursor', 'n', '', s:k1, s:k2) endfor ''' [[plugins]] repo = 'https://github.com/kuuote/lspoints' merged = false hook_add = ''' let g:lspoints#extensions = ['copilot'] ''' [[plugins]] repo = 'https://github.com/kyoh86/vim-ripgrep' on_cmd = ['Rg'] hook_source = ''' autocmd vimrc QuickFixCmdPre,QuickFixCmdPost Rg : function! s:ripgrep(args) abort doautocmd QuickFixCmdPre Rg eval ['--smart-case', a:args]->join()->ripgrep#search() doautocmd QuickFixCmdPost Rg endfunction command! -nargs=1 -complete=file Rg call s:ripgrep() ''' [[plugins]] repo = 'https://github.com/lambdalisue/vim-file-protocol' on_path = ['^file://'] [[plugins]] repo = 'https://github.com/lambdalisue/vim-gin' on_cmd = ['Gin', 'GinDiff', 'GinLog', 'GinStatus'] hook_add = ''' let g:gin_chaperon_persistent_args = ['++opener=tabedit'] let g:gin_diff_persistent_args = ['++opener=tabedit'] let g:gin_log_default_args = ['--oneline'] autocmd vimrc OptionSet diff call s:on_gin_chaperon(v:option_new) function! s:on_gin_chaperon(diff) abort if a:diff nnoremap ZZ Gin ++wait add %diffoff!tabclose else nunmap ZZ endif endfunction ''' [plugins.ftplugin] gin-log = ''' nnoremap a Ddu -name=gin_action nnoremap I (gin-action-fixup:instant-fixup) ''' gin-status = ''' nnoremap a Ddu -name=gin_action ''' gitcommit = ''' nnoremap ZZ Apply ''' gitrebase = ''' nnoremap ZZ Apply ''' [[plugins]] repo = 'https://github.com/lambdalisue/vim-kensaku' denops_wait = false on_func = ['kensaku#'] hook_add = ''' let s:kensaku_state = #{ converted: v:false, cmdline: #{ prev: '', converted: '' } } function! s:convert_kensaku() abort if s:kensaku_state.converted && \ getcmdline()->stridx(s:kensaku_state.cmdline.converted) > -1 let s:kensaku_state.converted = v:false let s:kensaku_state.cmdline.converted = '' call setcmdline(s:kensaku_state.cmdline.prev) else let s:kensaku_state.converted = v:true let s:kensaku_state.cmdline.prev = getcmdline() let s:kensaku_state.cmdline.converted = kensaku#query(s:kensaku_state.cmdline.prev) call setcmdline(s:kensaku_state.cmdline.converted) endif endfunction autocmd vimrc CmdlineLeave * let s:kensaku_state.converted = v:false cnoremap call convert_kensaku() ''' [[plugins]] repo = 'https://github.com/lambdalisue/vim-pinkyless' on_map = { icn = '' } hook_add = ''' let g:pinkyless#keyboard = 'JIS' let g:pinkyless_default_keymap = v:false noremap! (pinkyless-capslock-toggle) noremap! ; (pinkyless-stickyshift-enter) nnoremap r (pinkyless-stickyreplace-enter) ''' # NOTE: Override keymap to enable remap hook_post_source = ''' function! s:pinkyless_enter(trigger) abort let char = pinkyless#stickyshift#enter(a:trigger) return char !~# a:trigger ? char : feedkeys(char, 'ni') ?? '' endfunction map! (pinkyless-stickyshift-enter) pinkyless_enter(';') ''' [[plugins]] repo = 'https://github.com/lambdalisue/vim-suda' on_cmd = ['SudaRead', 'SudaWrite'] [[plugins]] repo = 'https://github.com/lambdalisue/vim-protocol' on_path = ['^https\?://'] [[plugins]] repo = 'https://github.com/lambdalisue/vim-quickrun-neovim-job' [[plugins]] repo = 'https://github.com/machakann/vim-highlightedundo' on_map = { n = '' } hook_add = ''' nnoremap u (highlightedundo-undo) nnoremap (highlightedundo-redo) nnoremap U (highlightedundo-Undo) nnoremap g- (highlightedundo-gminus) nnoremap g+ (highlightedundo-gplus) ''' [[plugins]] repo = 'https://github.com/mattn/vim-maketable' on_cmd = ['MakeTable', 'UnmakeTable'] [[plugins]] repo = 'https://github.com/mattn/vim-sonictemplate' on_cmd = ['Template'] hook_add = ''' let g:sonictemplate_vim_template_dir = [ \ g:config_home .. '/template', \ ] let g:sonictemplate_vim_vars = #{ \ _: #{ \ author: 'Hibiki', \ }, \ help: #{ \ author: 'Hibiki ', \ author_without_mail: 'Hibiki(4513ECHO)', \ license: 'MIT License', \ }, \ } let g:sonictemplate_key = '' let g:sonictemplate_intelligent_key = '' let g:sonictemplate_postfix_key = '' ''' [[plugins]] repo = 'https://github.com/mhinz/vim-signify' on_event = ['BufRead'] hook_add = ''' call setcellwidths([[0x2503, 0x2503, 1]]) let g:signify_sign_add = '┃' let g:signify_sign_change = '┃' let g:signify_sign_delete = '┃' let g:signify_sign_delete_first_line = '┃' let g:signify_line_highlight = v:false " from `:help signify-mappings` autocmd vimrc User SignifyHunk call s:show_current_hunk() function! s:show_current_hunk() abort let h = sy#util#get_hunk_stats() if !empty(h) echo $'[Hunk {h.current_hunk}/{h.total_hunks}]' endif endfunction ''' [[plugins]] repo = 'https://github.com/micchy326/lightline-lsp-progress' on_source = ['lightline.vim'] if = '!has("nvim")' [[plugins]] repo = 'https://github.com/osyo-manga/vim-jplus' on_map = { nx = '' } hook_add = ''' nnoremap J (jplus-getchar) xnoremap J (jplus-getchar) nnoremap gJ (jplus) xnoremap gJ (jplus) let g:jplus#config = #{ \ _: #{ \ delimiter: '', \ right_matchstr_pattern: '^\s*#\s*\zs.*\|\s*\zs.*', \ left_matchstr_pattern: '^.\{-}\%(\ze\s*\\$\|$\)', \ }, \ vim: #{ \ right_matchstr_pattern: '^\s*\\\s*\zs.*\|^\s*"\s*\zs.*\|\s*\zs.*', \ }} ''' [[plugins]] repo = 'https://github.com/Shougo/context_filetype.vim' on_func = ['context_filetype#get'] hook_source = ''' let g:context_filetype#filetypes = \ context_filetype#default_filetypes()->extendnew(#{ \ markdown: [['\(\h\w*\)', '\1'], ['viml', 'vim']] \ ->map({ -> #{ \ start: '^\s*```\s*' .. v:val[0], \ end: '^\s*```$', \ filetype: v:val[1], \ } }), \ }) ''' [[plugins]] repo = 'https://github.com/skanehira/denops-translate.vim' depends = ['denops.vim'] on_cmd = ['Translate'] hook_add = ''' nnoremap t Translate xnoremap t :Translate ''' [[plugins]] repo = 'https://github.com/statiolake/vim-quickrun-runner-nvimterm' [[plugins]] repo = 'https://github.com/rhysd/clever-f.vim' on_map = { nxo = '' } hook_add = ''' nnoremap F (clever-f-F) nnoremap T (clever-f-T) nnoremap f (clever-f-f) nnoremap t (clever-f-t) onoremap F (clever-f-F) onoremap T (clever-f-T) onoremap f (clever-f-f) onoremap t (clever-f-t) xnoremap F (clever-f-F) xnoremap T (clever-f-T) xnoremap f (clever-f-f) xnoremap t (clever-f-t) nnoremap ; (clever-f-repeat-forward) nnoremap , (clever-f-repeat-back) xnoremap ; (clever-f-repeat-forward) xnoremap , (clever-f-repeat-back) onoremap ; (clever-f-repeat-forward) onoremap , (clever-f-repeat-back) let g:clever_f_across_no_line = v:true let g:clever_f_ignore_case = v:true let g:clever_f_smart_case = v:true let g:clever_f_use_migemo = v:true let g:clever_f_chars_match_any_signs = "\" ''' [[plugins]] repo = 'https://github.com/RRethy/vim-hexokinase' on_event = ['BufRead', 'InsertLeave'] hook_add = ''' let g:Hexokinase_highlighters = ['backgroundfull'] let g:Hexokinase_optOutPatterns = ['colour_names'] let g:Hexokinase_ftOptInPatterns = #{ \ css: [ \ 'full_hex', 'triple_hex', 'rgb', \ 'rgba', 'hsl', 'hsla', 'colour_names' \ ], \ html: [ \ 'full_hex', 'triple_hex', 'rgb', \ 'rgba', 'hsl', 'hsla', 'colour_names' \ ], \ } let g:Hexokinase_ftDisabled = ['molder', 'ddu-ff', 'ddu-ff-filter'] let g:Hexokinase_executable_path = expand('$AQUA_ROOT_DIR/bin/hexokinase') ''' [[plugins]] repo = 'https://github.com/spywhere/lightline-lsp' name = 'lightline-nvim-lsp' on_source = ['lightline.vim'] if = 'has("nvim")' hook_add = ''' let g:lightline#lsp#indicator_errors = '✗' let g:lightline#lsp#indicator_warnings = '‼' ''' [[plugins]] repo = 'https://github.com/thinca/vim-localrc' on_event = ['BufRead'] hook_add = ''' let g:localrc_filename = '.vimrc.local' ''' [[plugins]] repo = 'https://github.com/thinca/vim-partedit' depends = ['context_filetype.vim'] on_cmd = ['Partedit'] on_func = ['partedit#start'] hook_add = ''' let g:partedit#opener = 'split' function! s:operator_partedit() abort let context = context_filetype#get() if context.range ==# [[0, 0], [0, 0]] echohl WarningMsg echomsg '[partedit] Context is not found' echohl NONE return endif call partedit#start(context.range[0][0], context.range[1][0], \ #{ filetype: context.filetype }) nnoremap q ParteditEndclose endfunction nnoremap call operator_partedit() ''' [plugins.ftplugin] help = ''' let b:partedit_filetype = 'vim' let b:partedit_prefix = "\" ''' toml = ''' let b:partedit_filetype = 'vim' let b:partedit_auto_prefix = v:false ''' [[plugins]] repo = 'https://github.com/thinca/vim-quickrun' on_cmd = ['QuickRun'] on_map = { nx = '' } hook_add = ''' nnoremap rr (quickrun) nnoremap r (quickrun-op) xnoremap r (quickrun) let g:quickrun_config = { \ '_': { \ 'hook/time/enable': v:false, \ 'outputter': 'buffer', \ 'outputter/buffer/close_on_empty': v:true, \ 'outputter/buffer/opener': 'botright 10new', \ 'outputter/error/error': 'quickfix', \ 'outputter/error/success': 'buffer', \ 'runner': has('nvim') ? 'neovim_job' : 'job', \ 'runner/nvimterm/opener': 'botright 10new', \ 'runner/terminal/opener': 'botright 10new', \ }, \ 'typescript': #{ \ type: 'deno/run', \ }, \ 'typescriptreact': #{ \ type: 'deno/run', \ }, \ 'sh': #{ \ runner: has('nvim') ? 'nvimterm' : 'terminal', \ }, \ 'zsh': #{ \ runner: has('nvim') ? 'nvimterm' : 'terminal', \ }, \ 'json': #{ \ type: 'json/gojq', \ }, \ 'json/gojq': #{ \ command: 'gojq', \ exec: '%c %o %a < %s', \ }, \ 'lua': #{ \ type: 'lua/vim', \ }, \ 'deno/run': #{ \ cmdopt: '--no-check --allow-all', \ command: 'deno', \ exec: 'NO_COLOR=1 %c run %o %s %a', \ tempfile: '%{tempname()}.ts', \ }, \ } " from https://github.com/aiotter/dotfiles/blob/8e759221/.config/nvim/plugins/others.toml#L27 autocmd vimrc WinEnter * \ : if winnr('$') == 1 && &filetype == 'quickrun' \ | quit \ | endif ''' [plugins.ftplugin] quickrun = ''' nnoremap q q nnoremap call quickrun#session#sweep() ''' [[plugins]] repo = 'https://github.com/tweekmonster/helpful.vim' on_cmd = ['HelpfulVersion'] [[plugins]] repo = 'https://github.com/tyru/capture.vim' on_cmd = ['Capture', 'CaptureJson'] hook_source = ''' command! -bang -bar -nargs=1 -complete=expression CaptureJson \ call s:capture_json(, '') function! s:capture_json(value, bang) abort execute printf('Capture%s echo json_encode(%sto_string(%s))', \ a:bang, expand(''), a:value) if &filetype ==# 'capture' silent execute '%!gojq' setlocal filetype=json endif endfunction function! s:to_string(expr) abort let type = type(a:expr) if type ==# v:t_list || type ==# v:t_dict return copy(a:expr)->map({ -> s:to_string(v:val) }) elseif type ==# v:t_func return string(a:expr) endif return a:expr endfunction ''' [plugins.ftplugin] capture = ''' nnoremap q q ''' [[plugins]] repo = 'https://github.com/tyru/caw.vim' on_map = { nxo = '' } depends = ['context_filetype.vim', 'vim-operator-user'] hook_add = ''' let g:caw_no_default_keymappings = v:true nnoremap (caw:hatpos:toggle:operator) onoremap (caw:hatpos:toggle:operator) xnoremap (caw:hatpos:toggle:operator) ''' # NOTE: Workaround of https://github.com/tyru/caw.vim/issues/183 # based on https://github.com/tyru/caw.vim/pull/185 lua_add = ''' local M = {} ---@param lnum integer ---@param col integer ---@return boolean function M.has_syntax(lnum, col) return vim .iter(vim.treesitter.get_captures_at_pos(0, lnum - 1, col - 1)) :any(function(capture) return capture.capture == "comment" end) end ---@diagnostic disable-next-line: duplicate-set-field _G.package.preload.caw = function() return M end ''' [plugins.ftplugin] gitcommit = ''' let b:caw_oneline_comment = ';' ''' [[plugins]] repo = 'https://github.com/yuttie/comfortable-motion.vim' on_func = ['comfortable_motion#flick'] hook_add = ''' let g:comfortable_motion_no_default_key_mappings = v:true nnoremap call comfortable_motion#flick(winheight(0) * 2) nnoremap call comfortable_motion#flick(winheight(0) * -2) nnoremap call comfortable_motion#flick(winheight(0) * 4) nnoremap call comfortable_motion#flick(winheight(0) * -4) '''