# Fundamentals [[plugins]] repo = 'Shougo/dein.vim' [[plugins]] repo = 'roxma/nvim-yarp' [[plugins]] repo = 'roxma/vim-hug-neovim-rpc' [[plugins]] repo = 'Shougo/denite.nvim' hook_add = ''' call denite#custom#option("_", "split", "floating") call denite#custom#option("_", "start_filter", 1) nnoremap \f :Denite file/rec nnoremap :Denite file_mru if executable('ag') call denite#custom#var('file/rec', 'command', ['ag', '--nocolor', '--nogroup', '--hidden', '--ignore', '.git', '-g', '']) endif call denite#custom#source('_', 'matchers', ['matcher/regexp', 'matcher/hide_hidden_files']) autocmd FileType denite call MyDeniteSettings() function! MyDeniteSettings() abort nnoremap denite#do_map('do_action') nnoremap s denite#do_map('do_action', 'vsplit') nnoremap S denite#do_map('do_action', 'split') nnoremap t denite#do_map('do_action', 'tabopen') nnoremap d denite#do_map('do_action', 'delete') nnoremap p denite#do_map('do_action', 'preview') nnoremap q denite#do_map('quit') nnoremap i denite#do_map('open_filter_buffer') nnoremap denite#do_map('toggle_select').'j' nmap denite#do_map('quit') endfunction autocmd FileType denite-filter call MyDeniteFilterSettings() function! MyDeniteFilterSettings() abort imap (denite_filter_quit) inoremap denite#do_map('redraw') inoremap denite#do_map('do_action') endfunction ''' [[plugins]] repo = 'autozimu/LanguageClient-neovim' rev = 'next' build = 'bash install.sh' hook_add = ''' let g:LanguageClient_serverCommands = { \ 'rust': ['/usr/bin/rustup', 'run', 'nightly', 'rls'], \ 'python': ['pyls', '--log-file', '/tmp/LanguageClient-log.txt', '-vvv'], \ } let g:LanguageClient_diagnosticsList = 'Disabled' let g:LanguageClient_settingsPath = '~/.config/nvim/lsp_settings.json' let g:LanguageClient_diagnosticsDisplay = { \ 1: { \ "name": "Error", \ "texthl": "ALEError", \ "signText": "✖", \ "signTexthl": "ALEErrorSign", \ "virtualTexthl": "VirtualError", \ }, \ 2: { \ "name": "Warning", \ "texthl": "ALEWarning", \ "signText": "⚠", \ "signTexthl": "ALEWarningSign", \ "virtualTexthl": "VirtualWarning", \ }, \ 3: { \ "name": "Information", \ "texthl": "ALEInfo", \ "signText": "ℹ", \ "signTexthl": "ALEInfoSign", \ "virtualTexthl": "VirtualWarning", \ }, \ 4: { \ "name": "Hint", \ "texthl": "ALEInfo", \ "signText": "➤", \ "signTexthl": "ALEInfoSign", \ "virtualTexthl": "VirtualWarning", \ }} function! LSRestart() abort LanguageClientStop LanguageClientStart endfunction function! OnLSP() abort command! -buffer LSRestart call LSRestart() nnoremap K :call LanguageClient#textDocument_hover() nnoremap gd :call LanguageClient#textDocument_definition() nnoremap gR :call LanguageClient#textDocument_rename() endfunction autocmd myautocmd FileType rust,python call OnLSP() ''' [[plugins]] repo = 'Shougo/neomru.vim' depends = 'denite.nvim' # Filetypes [[plugins]] repo = 'cespare/vim-toml' # Insersion [[plugins]] repo = 'Shougo/deoplete.nvim' depends = ['nvim-yarp', 'vim-hug-neovim-rpc'] on_i = 1 hook_source = ''' call deoplete#enable() call deoplete#custom#source('_', 'min_pattern_length', 1) call deoplete#custom#source('file', 'min_pattern_length', 0) ''' [[plugins]] repo = 'ncm2/float-preview.nvim' hook_add = ''' let g:float_preview#docked = 0 let g:float_preview#max_height = 100 let g:float_preview#max_width = 80 function! FloatPreviewOpen() abort echom nvim_win_set_option(g:float_preview#win, "foldcolumn", 0) endfunction autocmd myautocmd User FloatPreviewWinOpen call FloatPreviewOpen() ''' # [[plugins]] # repo = 'zchee/deoplete-jedi' # depends = 'deoplete.nvim' # on_ft = 'python' [[plugins]] repo = 'Shougo/neosnippet' depends = 'neosnippet-snippets' filetypes = 'neosnippet' on_i = 1 hook_source = ''' let g:neosnippet#snippets_directory = expand('~/.config/nvim/snippets') imap (neosnippet_expand_or_jump) smap (neosnippet_expand_or_jump) xmap (neosnippet_expand_target) snoremap a snoremap i ''' [[plugins]] repo = 'Shougo/neosnippet-snippets' [[plugins]] repo = 'cohama/lexima.vim' on_i = 1 hook_source = ''' " lexima settings {{{ function! ClosePopup() abort return pumvisible() ? "\" : '' endfunction let g:lexima_no_default_rules = 1 let g:lexima_map_escape = '' let g:lexima_nvim_accept_pum_with_enter = 0 inoremap =ClosePopup()=lexima#insmode#escape()=FixedInsertLeave():call ImActivateFunc(0) call lexima#set_default_rules() call lexima#add_rule({'at': '^```\(\S*\)\%#```', 'char': '', 'input': 'kS', 'filetype': ['markdown']}) call lexima#add_rule({'at': '^\k\+\s*::\s*.*\%#', 'char': '', 'input': '^"qytoq', 'filetype': ['haskell']}) call lexima#add_rule({'at': '{-\%#}', 'char': '#', 'input': '# ', 'input_after': ' #-', 'filetype': ['haskell']}) call lexima#add_rule({'at': '{\%#}', 'char': '', 'input': ' ', 'input_after': ' ', 'filetype': 'vim'}) call lexima#add_rule({'at': '\\\s.*\%#$', 'char': '', 'input': ' ', 'filetype': 'vim'}) call lexima#add_rule({'at': '^\%#', 'char': '/', 'input': ':Denite line', 'mode': '/'}) call lexima#add_rule({'at': '^\%#', 'char': '?', 'input': ':Denite line', 'mode': '?'}) call lexima#add_rule({'at': '^\%#', 'char': ':', 'input': ':Denite command_history', 'mode': ':'}) call lexima#add_rule({'at': 'RenameMe\%#', 'char': '', 'input': '%', 'mode': ':'}) call lexima#add_rule({'at': 'Gcommit --amend \%#', 'char': 'c', 'input': '-C HEAD', 'mode': ':'}) call lexima#add_rule({'at': 'Gcommit --amend \%#', 'char': 'C', 'input': '-C HEAD', 'mode': ':'}) call lexima#add_rule({'at': 'Git ca\%#', 'char': 'm', 'input': 'Gcommit --amend ', 'mode': ':'}) call lexima#add_rule({'at': 'Ocam\%#', 'char': 'l', 'input': 'Caml', 'mode': 'i:/?'}) call lexima#add_rule({'at': 'SudoWrite\%#', 'char': '', 'input': '%', 'mode': ':'}) call lexima#add_rule({'at': '^\s*\%(Describe\|Context\|It\|Before\|After\)\s\+.*\%#', 'char': '', 'input_after': 'End', 'filetype': 'vimspec'}) " }}} ''' # TextObj [[plugins]] repo = 'kana/vim-textobj-user' [[plugins]] repo = 'kana/vim-textobj-indent' depends = 'vim-textobj-user' [[plugins]] repo = 'kana/vim-textobj-entire' depends = 'vim-textobj-user' on_map = {ox = ['ie', 'ae']} [[plugins]] repo = 'thinca/vim-textobj-between' depends = 'vim-textobj-user' on_map = {ox = ''} hook_add = ''' let g:textobj_between_no_default_key_mappings = 1 omap i/ (textobj-between-i) xmap i/ (textobj-between-i) omap a/ (textobj-between-a) xmap a/ (textobj-between-a) ''' [[plugins]] repo = 'kana/vim-textobj-line' depends = 'vim-textobj-user' on_map = {ox = ['il', 'al']} [[plugins]] repo = 'gilligan/textobj-lastpaste' depends = 'vim-textobj-user' hook_add = ''' let g:textobj_lastpaste_no_default_key_mappings = 1 omap iP (textobj-lastpaste-i) xmap iP (textobj-lastpaste-i) ''' [[plugins]] repo = 'thinca/vim-textobj-comment' depends = 'vim-textobj-user' on_map = {ox = ['ic', 'ac']} # Operator [[plugins]] repo = 'tpope/vim-surround' on_map = {n = ['ys', 'ds', 'cs'], x = 'S'} [[plugins]] repo = 'tpope/vim-commentary' on_map = {nx = ['gc', 'gC']} [[plugins]] repo = 'kana/vim-operator-user' [[plugins]] repo = 'kana/vim-operator-replace' depends = 'vim-operator-user' on_map = {nox = ''} hook_add = ''' map _ (operator-replace) sunmap _ ''' [[plugins]] repo = 'tyru/operator-camelize.vim' depends = 'kana/vim-operator-user' on_map = {nox = ''} hook_add = ''' map - (operator-camelize-toggle) sunmap - ''' [[plugins]] repo = 'tommcdo/vim-exchange' on_map = {nox = ['(Exchange)', '(ExchangeLine)', '(ExchangeClear)']} on_cmd = 'XchangeClear' hook_add = ''' let g:exchange_no_mappings = 1 nmap cx (Exchange) nmap cxx (ExchangeLine) xmap X (Exchange) autocmd myautocmd TextChanged * XchangeClear ''' # Editing [[plugins]] repo = 'h1mesuke/vim-alignta' on_cmd = ['Alignta', 'Align'] [[plugins]] repo = 'kana/vim-repeat' [[plugins]] repo = 'thinca/vim-template' hook_add = ''' autocmd User plugin-template-loaded call MyTemplateLoaded() function! MyTemplateLoaded() if search('') execute 'normal! "_da>' endif endfunction ''' # File [[plugins]] repo = 'scrooloose/nerdtree' on_cmd = ['NERDTreeToggle', 'NERDTreeToggle'] hook_add = ''' nnoremap :NERDTreeToggle nnoremap :NERDTreeFind nnoremap :NERDTreeFind let g:NERDTreeIgnore = ['\~$', '\.swp', '^\.$', '^\.\.$'] let g:NERDTreeHijackNetrw = 0 let g:NERDTreeQuitOnOpen = 1 let g:NERDTreeWinSize = 36 let g:NERDTreeMinimalUI = 1 let g:NERDTreeChDirMode = 1 let g:NERDTreeMapCWD = "cD" if !g:is_unicode let g:NERDTreeDirArrows = 0 endif ''' [[plugins]] repo = 'vim-scripts/sudo.vim' on_cmd = ['SudoWrite'] # Motion [[plugins]] repo = 'bkad/CamelCaseMotion' hook_add = ''' map + [CamelCaseMotion] map [CamelCaseMotion]w CamelCaseMotion_w map [CamelCaseMotion]b CamelCaseMotion_b map [CamelCaseMotion]e CamelCaseMotion_e sunmap + sunmap [CamelCaseMotion]w sunmap [CamelCaseMotion]b sunmap [CamelCaseMotion]e ''' [[plugins]] repo = 'Lokaltog/vim-easymotion' on_map = {nox = '[EasyMotion]'} hook_add = ''' nmap [EasyMotion] omap [EasyMotion] xmap [EasyMotion] let g:EasyMotion_leader_key = '[EasyMotion]' ''' [[plugins]] repo = 'kana/vim-smartword' on_map = '' hook_add = ''' nmap w (smartword-w) nmap b (smartword-b) nmap e (smartword-e) nmap ge (smartword-ge) xmap w (smartword-w) xmap b (smartword-b) xmap e (smartword-e) xmap ge (smartword-ge) ''' [[plugins]] repo = 'thinca/vim-visualstar' on_map = '' hook_add = ''' let g:visualstar_no_default_key_mappings = 1 xmap * (visualstar-*) xmap # (visualstar-#) xmap g* (visualstar-g*) xmap g# (visualstar-g#) ''' [[plugins]] repo = 'deris/columnjump' on_map = '' hook_add = ''' let g:columnjump_ignore_wrapped_lines = 1 nmap (columnjump-backward) xmap (columnjump-backward) nmap (columnjump-forward) xmap (columnjump-forward) ''' [[plugins]] repo = 'kana/vim-gf-user' lazy = 1 [[plugins]] repo = 'sgur/vim-gf-autoload' depends = 'vim-gf-user' on_ft = 'vim' # Appearance [[plugins]] repo = 'nathanaelkane/vim-indent-guides' hook_add = ''' let g:indent_guides_enable_on_vim_startup = 1 let g:indent_guides_auto_colors = 0 ''' [[plugins]] repo = 'thinca/vim-fontzoom' on_if = 'g:is_gui' on_map = {n = ''} hook_add = ''' let g:fontzoom_no_default_key_mappings = 1 nmap (fontzoom-larger) nmap (fontzoom-smaller) ''' [[plugins]] repo = 'cohama/vim-insert-linenr' on_i = 1 # Git [[plugins]] repo = 'tpope/vim-fugitive' hook_add = ''' nnoremap [Git] nmap [Git] nnoremap [Git] :Git nnoremap [Git]s :Gstatus nnoremap [Git]d :Gdiff nnoremap [Git]a :Gwrite nnoremap [Git]A :Git add -A nnoremap [Git]c :Gcommit -v nnoremap [Git]C :Gcommit --amend nnoremap [Git]p :Git push nnoremap [Git]f :Git fetch nnoremap [Git]F :Git pull --rebase nnoremap [Git]b :Gblame nnoremap [Git] :Glcd:pwd ''' [[plugins]] repo = 'cohama/agit.vim' on_cmd = ['Agit', 'AgitFile'] hook_add = ''' autocmd myautocmd FileType agit call s:my_agit_settings() function! s:my_agit_settings() nmap Rv (agit-git-revert) nmap cB :AgitGit branch -f \%# nnoremap [Git] :AgitGit endfunction nnoremap [Git]k :Agit nnoremap [Git]K :AgitFile ''' [[plugins]] repo = 'airblade/vim-gitgutter' on_cmd = ['GitGutterToggle', 'GitGutterNextHunk', 'GitGutterNextHunk'] hook_add = ''' let g:gitgutter_enabled = 0 nmap ]h :execute v:count1 . "GitGutterNextHunk" nmap [h :execute v:count1 . "GitGutterPrevHunk" nnoremap [Git]g :GitGutterToggle ''' # Language Support [[plugins]] repo = 'itchyny/vim-haskell-indent' on_ft = 'haskell' [[plugins]] repo = 'eagletmt/ghcmod-vim' on_if = 'executable("ghc-mod")' on_ft = 'haskell' [[plugins]] repo = 'eagletmt/neco-ghc' on_if = 'executable("ghc-mod")' on_ft = 'haskell' hook_add = ''' let g:necoghc_enable_detailed_browse = 1 ''' [[plugins]] repo = 'racer-rust/vim-racer' on_ft = 'rust' hook_add = ''' let g:racer_experimental_completer = 1 ''' [[plugins]] repo = 'Vimjas/vim-python-pep8-indent' on_ft = 'python' [[plugins]] repo = 'davidhalter/jedi-vim' on_ft = 'python' hook_source = ''' let g:jedi#auto_initialization = 0 let g:jedi#auto_vim_configuration = 0 let g:jedi#completions_enabled = 0 let g:jedi#smart_auto_mappings = 0 ''' # Execution [[plugins]] repo = 'thinca/vim-quickrun' on_map = {n = '\r'} on_cmd = 'QuickRun' depends = 'quickrun-job-runner.nvim' hook_add = ''' autocmd myautocmd BufWinEnter,BufNewFile test/*.vim,test/*.vimspec let b:quickrun_config = {'type' : 'themis'} autocmd myautocmd BufWinEnter QuickRunOut setlocal winfixheight autocmd myautocmd BufWinLeave QuickRunOut call quickrun#sweep_sessions() command! QuickRunCancel call quickrun#sweep_sessions() ''' hook_source = ''' " quickrun settings {{{ let g:quickrun_config = {} let g:quickrun_config['_'] = { \ 'hook/close_buffer/enable_failure' : 1, \ 'hook/close_buffer/enable_empty_data': 1, \ 'outputter' : 'multi:buffer:quickfix', \ 'outputter/buffer/split' : 'botright 8', \ 'outputter/buffer/name' : 'QuickRunOut', \ 'outputter/buffer/close_on_empty' : 1, \ 'outputter/quickfix/open_cmd' : '', \ 'runner' : 'nvim_job', \ 'hook/echo/enable' : 1, \ 'hook/echo/output_success' : 'success', \ 'hook/echo/output_failure' : 'failure', \ } let g:quickrun_config['watchdogs_checker/_'] = { \ 'hook/close_unite_quickfix/enable_exit' : 1, \ 'hook/back_window/enable_exit' : 0, \ 'hook/quickfix_status_enable/enable_exit' : 1, \ 'outputter/quickfix/open_cmd' : '', \ 'hook/hier_update/enable_exit' : 1, \ 'hook/back_window/priority_exit' : 1, \ 'hook/quickfix_status_enable/priority_exit': 2, \ 'hook/hier_update/priority_exit' : 3, \ 'hook/nuko/enable' : 1, \ } let g:quickrun_config['ocaml/watchdogs_checker'] = { \ 'type': 'watchdogs_checker/ocamlc' \ } let g:quickrun_config['watchdogs_checker/make'] = { \ 'command': 'make', \ 'exec': '%c %o' \ } let g:quickrun_config['watchdogs_checker/ocamlc'] = { \ 'command': 'ocamlc', \ 'exec' : '%c -i %o - %s:p' \ } let g:quickrun_config['watchdogs_checker/ocamlc_annot'] = { \ 'command': 'ocamlc', \ 'exec' : '%c -annot -bin-annot -c %o - %s:p' \ } let g:quickrun_config['watchdogs_checker/hxml'] = { \ 'command': 'haxe', \ 'exec' : '%c build.hxml' \ } let g:quickrun_config['haxe/watchdogs_checker'] = { \ 'type': 'watchdogs_checker/hxml' \ } let g:quickrun_config['ruby.rspec'] = { \ 'command': 'bundle', \ 'exec': '%c exec rspec -f d %s' \ } let g:quickrun_config['ghc_make'] = { \ 'command' : 'ghc', \ 'exec' : '%c %s', \ 'outputter' : 'quickfix', \ 'outputter/quickfix' : 1, \ 'outputter/quickfix/open_cmd' : 'cwindow', \ 'hook/back_window/enable_exit' : 1, \ 'hook/back_window/priority_exit': 1 \ } let g:quickrun_config['ghc_doctest'] = { \ 'command': 'doctest', \ 'exec': '%c %s' \ } let g:quickrun_config['stack_build'] = { \ 'command' : 'stack', \ 'exec' : '%c build', \ 'outputter' : 'quickfix', \ 'outputter/quickfix' : 1, \ 'outputter/quickfix/open_cmd' : 'botright cwindow', \ 'hook/back_window/enable_exit' : 1, \ 'hook/back_window/priority_exit': 1, \ 'hook/nuko/enable' : 1, \ } let g:quickrun_config['stack_exec'] = { \ 'command' : 'stack', \ 'exec' : '%c exec %a', \ 'outputter' : 'buffer', \ } let g:quickrun_config['haskell'] = {'type': 'haskell/stack_runghc'} let g:quickrun_config['haskell/stack_runghc'] = { \ 'command' : 'stack', \ 'exec' : '%c runghc %s %a', \ 'tempfile' : '%{tempname()}.hs', \ 'hook/eval/template': 'main = print \$ %s', \ } let g:quickrun_config['haskell/watchdogs_checker'] = {'type': 'watchdogs_checker/stack_ghcmod'} let g:quickrun_config['watchdogs_checker/stack_ghcmod'] = { \ 'command' : 'stack', \ 'exec' : '%c exec ghc-mod check %s:p | sed "s/\x0/\n/g"', \ 'errorformat' : '%f:%l:%c:%trror: %m,%f:%l:%c:%tarning: %m,%f:%l:%c:parse %trror %m,%f:%l:%c: %trror: %m,%f:%l:%c: %tarning: %m,%f:%l:%c:%m,%E%f:%l:%c:,%Z%m', \ 'tempfile' : 'TemporaryWatchDogSourceFile.hs' \ } let g:quickrun_config['rust/watchdogs_checker'] = {'type': 'watchdogs_checker/myrustc'} let g:quickrun_config['watchdogs_checker/myrustc'] = { \ 'command' : 'rustc', \ 'exec' : '%c -Z no-trans %s:p', \ } let g:quickrun_config['watchdogs_checker/cargo_check'] = { \ 'command' : 'cargo', \ 'exec' : '%c check', \ } let g:quickrun_config['cargo_run'] = { \ 'command' : 'cargo', \ 'exec' : '%c run', \ } let g:quickrun_config['cargo_build'] = { \ 'command' : 'cargo', \ 'exec' : '%c build', \ } let g:quickrun_config['cargo_test'] = { \ 'command' : 'cargo', \ 'exec' : '%c test', \ 'outputter/buffer/split' : 'botright vertical 80', \ } let g:quickrun_config['watchdogs_checker/cargo_clippy'] = { \ 'command' : 'cargo', \ 'exec' : '%c clippy', \ } let g:quickrun_config['themis'] = { \ 'command': 'themis', \ 'exec': '%c --reporter dot %s' \ } " }}} ''' [[plugins]] repo = 'tamy0612/quickrun-job-runner.nvim' lazy = 1 [[plugins]] repo = 'kana/vim-submode' on_map = {n = ['+', '-', '>', '<']} hook_add = ''' let g:submode_keep_leaving_key = 1 let g:submode_timeout = 0 ''' hook_source = ''' call submode#enter_with('winsize', 'n', '', '>', '>') call submode#enter_with('winsize', 'n', '', '<', '<') call submode#enter_with('winsize', 'n', '', '+', '+') call submode#enter_with('winsize', 'n', '', '-', '-') call submode#map('winsize', 'n', '', '>', '>') call submode#map('winsize', 'n', '', '<', '<') call submode#map('winsize', 'n', '', '+', '+') call submode#map('winsize', 'n', '', '-', '-') ''' [[plugins]] repo = 'tyru/open-browser.vim' on_map = '(openbrowser-' hook_add = ''' let g:netrw_nogx = 1 nmap gx (openbrowser-smart-search) xmap gx (openbrowser-smart-search) ''' [[plugins]] repo = 'thinca/vim-themis' [[plugins]] repo = 'w0rp/ale' hook_add = ''' let g:ale_lint_on_text_changed = "normal" let g:ale_lint_on_insert_leave = 1 let g:ale_python_pylint_change_directory = 0 let g:ale_virtualtext_cursor = 1 let g:ale_virtualenv_dir_names = ['.env', 'env', 've-py3', 've', 'virtualenv', 'venv', '.venv'] let g:ale_python_pylint_options = "--rcfile setup.cfg" let g:ale_sign_error = "✖" let g:ale_sign_warning = "⚠" let g:ale_sign_info = "ℹ" let g:ale_sign_style_error = "✖" let g:ale_sign_style_warning = "⚠" function! s:ale_highlight_groups() abort hi def link ALEVirtualTextError VirtualError hi def link ALEVirtualTextWarning VirtualWarning hi def link ALEVirtualTextInfo VirtualWarning hi def link ALEVirtualTextStyleError VirtualError hi def link ALEVirtualTextStyleWarning VirtualWarning endfunction autocmd myautocmd ColorScheme * call s:ale_highlight_groups() ''' # Miscellaneous [[plugins]] repo = 'mattn/webapi-vim' lazy = 1 [[plugins]] repo = 'mattn/gist-vim' depends = 'webapi-vim' on_cmd = 'Gist' [[plugins]] repo = 'thinca/vim-localrc' [[plugins]] repo = 'thinca/vim-prettyprint' on_cmd = ['PP', 'PrettyPrint']