# プラグインマネージャー [[plugins]] repo = 'Shougo/dein.vim' # / でparagraphの境界に飛べたりして便利 [[plugins]] repo = 'haya14busa/vim-edgemotion' on_map = '(edgemotion-' hook_add = ''' Keymap nxo (edgemotion-j) Keymap nxo (edgemotion-k) ''' # f/tを良い感じにしてくれる [[plugins]] repo = 'hrsh7th/vim-eft' on_map = '(eft-' hook_add = ''' Keymap nxo f (eft-f) Keymap nxo F (eft-F) Keymap xo t (eft-t) Keymap xo T (eft-T) Keymap nxo ; (eft-repeat) let g:eft_ignorecase = v:true ''' # 検索をeasymotion的に使えるようにしてくれるやつ # 検索の入力文字列->クエリを変換するための関数を自分で定義できるので # 便利かもしれない # n/Nの動作が怪しい [[plugins]] repo = 'hrsh7th/vim-searchx' on_func = 'searchx#' hooks_file = '$DEIN_CONFIG_DIR/vim-searchx.vim' hook_add = ''' Keymap nx / call searchx#start(#{ dir: 1 }) Keymap nx ? call searchx#start(#{ dir: 0 }) ''' # * でジャンプしないようにしてくれるやつ [[plugins]] repo = 'haya14busa/vim-asterisk' on_map = '(asterisk-' hook_add = ''' Keymap nxo * (asterisk-z*) Keymap nxo # (asterisk-z#) Keymap nxo g* (asterisk-gz*) Keymap nxo g# (asterisk-gz#) ''' # カーソルのある位置に対応する括弧をハイライトしたりしてくれる # 入れただけみたいなとこある よくわかってない [[plugins]] repo = 'andymass/vim-matchup' on_map = '(matchup-%)' hook_add = ''' let g:loaded_matchit = v:true let g:loaded_matchparen = v:true let g:matchup_matchparen_offscreen = #{ \ method: 'status_manual', \ } Keymap nxo % (matchup-%) ''' hook_post_source = ''' iunmap % ''' # Vimプラグインをdenoで書けるようにするやつ [[plugins]] repo = 'vim-denops/denops.vim' # plugin/ディレクトリを持つが、これはVimEnterまでに読み込みたいのでfalse # Migemo [[plugins]] repo = 'lambdalisue/kensaku.vim' depends = 'denops.vim' on_func = 'kensaku#query' # yankしたときに範囲をわかりやすくしてくれる [[plugins]] repo = 'machakann/vim-highlightedyank' on_map = '(highlightedyank)' hook_add = ''' Keymap nxo y (highlightedyank) let g:highlightedyank_highlight_duration = 200 ''' # テキストの周りを囲んだり囲みを編集したり [[plugins]] repo = 'machakann/vim-sandwich' on_map = { nx = '(sandwich-', xo = '(textobj-sandwich-' } hook_add = ''' Keymap nx s Keymap nx sa (sandwich-add) Keymap nx sd (sandwich-delete) Keymap nx sdb (sandwich-delete-auto) Keymap nx sr (sandwich-replace) Keymap nx srb (sandwich-replace-auto) Keymap xo ib (textobj-sandwich-auto-i) Keymap xo ab (textobj-sandwich-auto-a) ''' # [ae]. によるomapを定義するのを楽にしてくれるやつ? # 依存してるプラグインがいくつかあるから入れてる [[plugins]] repo = 'kana/vim-textobj-user' # {operator}ae するとバッファ全体を対象にできる [[plugins]] repo = 'kana/vim-textobj-entire' depends = 'vim-textobj-user' on_map = { xo = '(textobj-entire-' } hook_add = ''' Keymap xo ie (textobj-entire-i) Keymap xo ae (textobj-entire-a) ''' [[plugins]] repo = 'kana/vim-operator-user' # r{textobj}で無名レジスタにあるテキストと選択範囲の文字を置き替えられる # rgnとかすると便利 [[plugins]] repo = 'kana/vim-operator-replace' depends = 'vim-operator-user' on_map = { nx = '(operator-replace)' } hook_add = ''' Keymap nx r (operator-replace) ''' # gciで行をコメントアウトできて便利 [[plugins]] # repo = 'tyru/caw.vim' repo = 'KentoOgata/caw.vim' rev = 'fix/treesitter-hl_map-removed' depends = 'vim-operator-user' on_map = { nx = '(caw:' } hook_add = ''' let g:caw_no_default_keymappings = 1 Keymap nx gc (caw:prefix) Keymap nx (caw:prefix)i (caw:hatpos:comment) Keymap nx (caw:prefix)ui (caw:hatpos:uncomment) Keymap nx (caw:prefix)I (caw:zeropos:comment) Keymap nx (caw:prefix)uI (caw:zeropos:uncomment) Keymap nx (caw:prefix)a (caw:dollarpos:comment) Keymap nx (caw:prefix)ua (caw:dollarpos:uncomment) Keymap nx (caw:prefix)w (caw:wrap:comment) Keymap nx (caw:prefix)uw (caw:wrap:uncomment) Keymap nx (caw:prefix)b (caw:box:comment) Keymap nx (caw:prefix)o (caw:jump:comment-next) Keymap nx (caw:prefix)O (caw:jump:comment-prev) nmap (caw:prefix)c (caw:wrap:toggle:operator) xmap (caw:prefix)c (caw:hatpos:toggle) ''' # 関数の引数の順番を入れ替えたりする [[plugins]] repo = 'machakann/vim-swap' on_map = { nxo = '(swap-' } hook_add = ''' nmap g< (swap-prev) nmap g> (swap-next) nmap gs (swap-interactive) Keymap xo is (swap-textobject-i) Keymap xo as (swap-textobject-a) ''' # denops製のskkプラグイン [[plugins]] repo = 'vim-skk/skkeleton' depends = 'denops.vim' # 初期化を待機しない # 本当は遅延読み込みにしたくないけど plugin/ ディレクトリが存在するので仕方なく遅延してる denops_wait = false on_map = { ic = '(skkeleton-enable)' } hook_add = ''' Keymap ic (skkeleton-enable) ''' hooks_file = '$DEIN_CONFIG_DIR/skkeleton.lua' # skkの辞書 # deinで管理するアイディアはkuuさんがslackで言及してたやつ [[plugins]] repo = 'skk-dev/dict' name = 'skk-dict' lazy = true hook_add = ''' function! g:GetDictPath(dictType) abort return [dein#get('skk-dict').path, 'SKK-JISYO.'..a:dictType]->join('/') endfunction ''' # QuickFixの項目を一気に置換できる [[plugins]] repo = 'thinca/vim-qfreplace' on_cmd = 'Qfreplace' # QuickFixから項目をddで消したりできる [[plugins]] repo = 'itchyny/vim-qfedit' on_ft = 'qf' # chezmoiで管理してるファイル dot_* にftをあてたりする [[plugins]] repo = 'alker0/chezmoi.vim' [[plugins]] repo = 'vim-jp/vital.vim' on_cmd = 'Vitalize' on_func = 'vital#vital#' # Vim/Neovim にいつ機能が入ったのかを確認できる [[plugins]] repo = 'tweekmonster/helpful.vim' on_cmd = 'HelpfulVersion' # :mes とかの内容をバッファーに展開できる [[plugins]] repo = 'tyru/capture.vim' on_cmd = 'Capture' # インデント位置にルーラーみたいなの表示してくれる [[plugins]] repo = 'lukas-reineke/indent-blankline.nvim' on_event = ['BufNewFile', 'BufReadPost'] hook_add = ''' let g:indentLine_fileTypeExclude = [ \ 'lspinfo', \ 'packer', \ 'checkhealth', \ 'help', \ 'man', \ 'fern', \ ] ''' # vim.ui.selectとかvim.ui.inputの良い感じの設定を提供する [[plugins]] repo = 'stevearc/dressing.nvim' depends = 'nui.nvim' on_event = 'CursorMoved' hooks_file = '$DEIN_CONFIG_DIR/dressing.nvim.lua' # 日本語help [[plugins]] repo = 'vim-jp/vimdoc-ja' lazy = true # サイズがでかいのとスクリプトを実行するわけではないのでマージしない merged = false hook_add = ''' set helplang=ja,en ''' # 選択範囲をChatGPTに投げつける [[plugins]] repo = 'yuki-yano/ai-review.nvim' if = '!empty($OPENAI_API_KEY)' depends = ['denops.vim', 'nui.nvim'] on_cmd = 'AiReview' [[plugins]] repo = 'nvim-lua/plenary.nvim' lazy = true # gfの拡張? 便利さはよくわかってない [[plugins]] repo = 'hrsh7th/nvim-gtd' on_map = '(gtd:' hook_add = ''' nmap gfH (gtd:splitleft) nmap gfJ (gtd:splitbelow) nmap gfK (gtd:splitabove) nmap gfL (gtd:splitright) ''' hooks_file = '$DEIN_CONFIG_DIR/nvim-gtd.lua' # p で貼り付ける内容をヤンク履歴から選べる # 貼り付け位置のインデントに合わせて貼り付けてくれるのが地味に便利 [[plugins]] repo = 'hrsh7th/nvim-pasta' on_lua = 'pasta' hook_add = ''' nmap p lua require('pasta.mappings').p() nmap P lua require('pasta.mappings').P() ''' lua_source = ''' require('pasta').setup { converters = { require('pasta.converters').indentation, }, paste_mode = true, prevent_diagnostics = false, next_key = vim.keycode '', prev_key = vim.keycode '', } ''' # したときにどこのWindowに飛ぶか選べる [[plugins]] repo = 'tkmpypy/chowcho.nvim' on_lua = 'chowcho' hooks_file = '$DEIN_CONFIG_DIR/chowcho.nvim.lua' [[plugins]] repo = 'nvim-tree/nvim-web-devicons' lazy = true [[plugins]] repo = 'MunifTanjim/nui.nvim' lazy = true # LSのkind(補完するitemの種類 classとかmethod)に応じたアイコンを提供する [[plugins]] repo = 'onsails/lspkind-nvim' lazy = true # tabline/winbar/statusline を格好よくする [[plugins]] repo = 'rebelot/heirline.nvim' depends = 'nvim-web-devicons' on_event = ['FileType', 'WinNew'] hooks_file = '$DEIN_CONFIG_DIR/heirline.nvim.lua' # ファイルの保存履歴とかを作ってくれるやつ # 他のプラグインと組み合わせて使ったりする [[plugins]] repo = 'lambdalisue/mr.vim' on_event = ['BufReadPre', 'BufNewFile'] # カラーピッカー # バッファー上のカラーコードをハイライト(こっちがメインで入れてる) [[plugins]] repo = 'uga-rosa/ccc.nvim' on_cmd = ['CccPick', 'CccHighlighterEnable'] on_event = ['BufReadPost', 'FileType'] lua_source = ''' local ccc = require 'ccc' ccc.setup { default_color = '#40bfbf', highlighter = { auto_enable = true, lsp = true, }, pickers = { ccc.picker.hex, ccc.picker.css_rgb, ccc.picker.css_hsl, ccc.picker.css_hwb, ccc.picker.css_lab, ccc.picker.css_lch, ccc.picker.css_oklab, ccc.picker.css_oklch, ccc.picker.trailing_space { enable = true, disable = { 'fzf', 'gin-diff', 'gitcommit', 'diff', 'gina-log', 'help', 'mason', '', }, }, }, } ''' # コマンドラインで`themis`と実行すると良い感じ [[plugins]] repo = 'thinca/vim-themis' hook_add = ''' let $THEMIS_VIM = 'nvim' let $THEMIS_HOME = dein#get('vim-themis').path let $PATH = [[$THEMIS_HOME, 'bin']->join('/'), $PATH]->join(':') ''' # yankした内容を端末の仕様を使ってクリップボードに入れてくれる [[plugins]] repo = 'ojroques/vim-oscyank' on_map = 'OSCYank' hook_add = ''' xmap y OSCYankVisual nmap y OSCYankOperator nmap p "+p ''' # vimでプレゼンテーション # markdownを開いて:ShowtimeStart [[plugins]] repo = 'thinca/vim-showtime' on_cmd = 'ShowtimeStart' # :terminalでnvim実行したときに新しいタブで開いてくれる # TODO: 遅延読み込み # plugin/あるから遅延したいけど遅延設定むずいすこれ [[plugins]] repo = 'lambdalisue/guise.vim' # `:ReadmeOpen {plugin}`を実行するとREADME.mdが見れる [[plugins]] repo = '4513ECHO/vim-readme-viewer' on_cmd = 'ReadmeOpen' hook_source = ''' let g:readme_viewer#plugin_manager = 'dein.vim' ''' # nvim-polyglot [[plugins]] repo = 'nvim-treesitter/nvim-treesitter' on_event = ['BufReadPost', 'BufNewFile'] hooks_file='$DEIN_CONFIG_DIR/nvim-treesitter.lua' # vim:ft=toml expandtab tabstop=2 shiftwidth=2