[[plugins]] repo = "https://github.com/kana/vim-textobj-user" [[plugins]] repo = "https://github.com/kana/vim-textobj-line" depends = "vim-textobj-user" lua_add = """ local vimx = require("artemis") vimx.keymap.set({ "x", "o" }, "al", "<Plug>(textobj-line-a)") vimx.keymap.set({ "x", "o" }, "il", "<Plug>(textobj-line-i)") """ on_map = { x = "<Plug>", o = "<Plug>" } [[plugins]] repo = "https://github.com/thinca/vim-textobj-between" depends = ["vim-textobj-user"] lua_add = """ local vimx = require("artemis") vimx.keymap.set({ "x", "o" }, "af", "<Plug>(textobj-between-a)") vimx.keymap.set({ "x", "o" }, "if", "<Plug>(textobj-between-i)") """ on_map = { x = "<Plug>", o = "<Plug>" } [[plugins]] repo = "https://github.com/kana/vim-textobj-fold" lua_add = """ local vimx = require("artemis") vimx.keymap.set({ "x", "o" }, "az", "<Plug>(textobj-fold-a)") vimx.keymap.set({ "x", "o" }, "iz", "<Plug>(textobj-fold-i)") """ depends = ["vim-textobj-user"] on_map = { x = "<Plug>", o = "<Plug>" } [[plugins]] repo = "https://github.com/Omochice/vim-textobj-codeblock" depends = ["vim-textobj-user"] lua_add = ''' local vimx = require("artemis") vimx.g.textobj_codeblock_fence = { toml = [["""]] } vimx.keymap.set({ "x", "o" }, "ac", "<Plug>(textobj-codeblock-a)") vimx.keymap.set({ "x", "o" }, "ic", "<Plug>(textobj-codeblock-i)") ''' on_map = { x = "<Plug>", o = "<Plug>" } [[plugins]] repo = "https://github.com/Omochice/vim-textobj-bettertag" lua_add = """ require("artemis").keymap.set({ "x", "o" }, "it", "<Plug>(textobj-bettertag-i)") """ on_map = { x = "<Plug>", o = "<Plug>" } depends = ["vim-textobj-user"] [[plugins]] repo = "https://github.com/kana/vim-textobj-indent" depends = ["vim-textobj-user"] lua_add = """ local vimx = require("artemis") vimx.keymap.set({ "x", "o" }, "ai", "<Plug>(textobj-indent-a)") vimx.keymap.set({ "x", "o" }, "ii", "<Plug>(textobj-indent-i)") """ on_map = { x = "<Plug>", o = "<Plug>" } [[plugins]] repo = "https://github.com/kana/vim-operator-user" [[plugins]] repo = "https://github.com/kana/vim-repeat" [[plugins]] repo = "https://github.com/easymotion/vim-easymotion" hook_add = """ nmap <Space>j <Plug>(easymotion-j) nmap <Space>k <Plug>(easymotion-k) nmap <Space>l <Plug>(easymotion-lineforward) nmap <Space>h <Plug>(easymotion-linebackward) let g:EasyMotion_smartcase = v:true let g:EasyMotion_use_smartsign_jp = v:true """ on_map = { n = "<Plug>" } [[plugins]] repo = "https://github.com/hrsh7th/vim-searchx" hooks_file = "$DEIN_RC_DIR/hooks/searchx.lua" on_func = "searchx" [[plugins]] repo = "https://github.com/haya14busa/vim-asterisk" hook_add = """ nmap * <Plug>(asterisk-z*) xmap * <Plug>(asterisk-z*) """ on_map = { n = "<Plug>" } [[plugins]] repo = "https://github.com/hrsh7th/vim-vsnip" hooks_file = "$DEIN_RC_DIR/hooks/vsnip.lua" on_map = { x = "<Plug>", i = "<Plug>" } depends = ["lexima.vim"] # Need this for control order to sourcing on_event = "InsertEnter" [[plugins]] repo = "https://github.com/cohama/lexima.vim" hooks_file = "$DEIN_RC_DIR/hooks/lexima.lua" on_event = "InsertEnter" # Below not work # [[multiple_plugins]] # plugins = ["vim-vsnip", "lexima"] # hook_source = """ # " imap <silent><expr> <Tab> vsnip#jumpable(+1) ? '<Plug>(vsnip-jump-next)' : lexima#expand('<LT>Tab>', 'i') # " xmap <silent><expr> <Tab> vsnip#jumpable(+1) ? '<Plug>(vsnip-jump-next)' : lexima#expand('<LT>Tab>', 'i') # """ [[plugins]] repo = "https://github.com/prabirshrestha/vim-lsp" hooks_file = [ "$DEIN_RC_DIR/hooks/vim-lsp.lua", "$DEIN_RC_DIR/hooks/vim-lsp.vim", ] on_event = ["BufRead", "BufNewFile"] if = "!has('nvim')" [[plugins]] repo = "https://github.com/mattn/vim-lsp-settings" hook_add = """ let g:lsp_settings_enable_suggestions = v:false """ on_source = "vim-lsp" [[plugins]] repo = "https://github.com/neovim/nvim-lspconfig" on_lua = "lspconfig" if = "has('nvim')" [[plugins]] repo = "https://github.com/SmiteshP/nvim-navic" on_source = "nvim-lspconfig" hooks_file = "$DEIN_RC_DIR/hooks/nvim-navic.lua" [[plugins]] repo = "https://github.com/williamboman/mason.nvim" on_lua = "mason" if = "has('nvim')" [[plugins]] repo = "https://github.com/williamboman/mason-lspconfig.nvim" on_event = ["BufRead", "BufNewFile"] hooks_file = "$DEIN_RC_DIR/hooks/mason-lspconfig.lua" if = "has('nvim')" [[plugins]] repo = "https://github.com/machakann/vim-sandwich" hooks_file = "$DEIN_RC_DIR/hooks/sandwich.lua" depends = "vim-textobj-user" [plugins.on_map] n = "<Plug>" x = ["<Plug>", "<Plug>(textobj-sandwich"] o = "<Plug>(textobj-sandwich" [[plugins]] repo = "https://github.com/uga-rosa/contextment.vim" # repo = "~/Toy/contextment.vim" hooks_file = "$DEIN_RC_DIR/hooks/contextment.lua" depends = ["context_filetype.vim"] on_map = { nxo = "<Plug>" } if = "!has('nvim')" [[plugins]] repo = "https://github.com/markonm/traces.vim" on_event = "CmdlineEnter" [[plugins]] repo = "https://github.com/liuchengxu/vista.vim" depends = ["vim-lsp"] on_cmd = "Vista" hook_add = """ let g:vista_default_executive = has('nvim') ? 'nvim_lsp' : 'vim_lsp' """ [[plugins]] repo = "https://github.com/simeji/winresizer" hook_add = """ function s:number_of_non_float() abort " on floating / popup window is return 'popup'. return tabpagebuflist() \\ ->map({ _, nr -> win_findbuf(nr) }) \\ ->flatten() \\ ->sort() \\ ->uniq() \\ ->filter({ _, nr -> win_gettype(nr) != 'popup' }) \\ ->len() endfunction nnoremap <C-e> <Cmd>WinResizerStartResize<CR> nnoremap <expr><C-w><C-w> <SID>number_of_non_float() > 2 \\ ? '<cmd>WinResizerStartFocus<CR>' \\ : '<C-w><C-w>' let g:winresizer_vert_resize = 3 """ on_cmd = ["WinResizerStartResize", "WinResizerStartFocus"] [[plugins]] repo = "https://github.com/thinca/vim-quickrun" depends = ["vim-quickrun-neovim-job"] hooks_file = "$DEIN_RC_DIR/hooks/quickrun.lua" on_map = { n = "<Plug>" } on_cmd = ["QuickRun"] [[plugins]] repo = "https://github.com/lambdalisue/vim-quickrun-neovim-job" on_source = "vim-quickrun" # [[plugins]] # repo = "Omochice/TeXTable.vim" # on_cmd = "TeXTable" # [[plugins]] # repo = "Omochice/TeXOutline.vim" # on_cmd = "TeXOutline" [[plugins]] repo = "https://github.com/ntpeters/vim-better-whitespace" hook_add = """ let g:better_whitespace_enabled = !has('nvim') let g:strip_whitespace_on_save = v:false """ on_cmd = ["StripWhitespace", "StripWhitespaceOnChangedLines"] [[plugins]] repo = "https://github.com/heavenshell/vim-pydocstring" build = "make install" hook_add = """ let g:pydocstring_formatter = 'google' """ on_cmd = ["Pydocstring", "PydocstringFormat"] [[plugins]] repo = "https://github.com/mattn/vim-maketable" on_cmd = "MakeTable" [[plugins]] repo = "https://github.com/previm/previm" on_cmd = "PrevimOpen" hook_add = """ let g:previm_wsl_mode = has('wsl') let g:previm_show_header = v:false """ depends = ["open-browser.vim"] [[plugins]] repo = "https://github.com/tyru/open-browser.vim" hook_add = """ nmap gx <Plug>(openbrowser-open) """ on_map = { n = "<Plug>(openbrowser" } [[plugins]] repo = "https://github.com/ap/vim-css-color" on_ft = ["css", "scss", "vue"] [[plugins]] repo = "https://github.com/pechorin/any-jump.vim" hook_add = """ let g:any_jump_disable_default_keybindings = v:true """ on_cmd = ["AnyJump", "AnyJumpVisual", "AnyJumpBack", "AnyJumpLastResults"] [[plugins]] repo = "https://github.com/y0za/vim-reading-vimrc" on_cmd = [ "ReadingVimrcNext", "ReadingVimrcList", "ReadingVimrcLoad", "ReadingVimrcCopy", ] hook_source = """ function! s:reading_copy(line1, line2) abort " NOTE: 4 is ['next', {owner}, {repo}, {branch}] let l:file = expand('%')->substitute('readingvimrc://\\([^/]\\{1,\\}/\\)\\{4\\}', '', '') 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 call setreg(v:register, input('', printf('%s#%s ', l:file, l:line))) endfunction command! -range ReadingVimrcCopy call <SID>reading_copy(<line1>, <line2>) """ [[plugins]] repo = "https://github.com/lambdalisue/vim-suda" hook_add = """ let g:suda_smart_edit = v:true """ on_event = "BufRead" [[plugins]] repo = "https://github.com/Shougo/context_filetype.vim" lua_source = """ local vimx = require("artemis") vimx.g["context_filetype#ignore_patterns"] = { toml = [[^\\s*#\\s*]], } """ [[plugins]] repo = "https://github.com/nvim-treesitter/nvim-treesitter" if = "has('nvim')" on_event = ["BufRead", "BufNewFile"] hook_post_update = "TSUpdate" hooks_file = "$DEIN_RC_DIR/hooks/treesitter.lua" [[plugins]] repo = "https://github.com/nvim-treesitter/playground" on_source = "nvim-treesitter" [[plugins]] repo = "https://github.com/nvim-treesitter/nvim-treesitter-textobjects" on_source = "nvim-treesitter" # Use upper case for treesitter, it prevent to confuse at Vim's one. [[plugins]] repo = "https://github.com/nvim-treesitter/nvim-treesitter-context" # TODO: i wait to show context on top-right position # TODO: show context like A>B>C on_source = "nvim-treesitter" lua_source = """ require("treesitter-context").setup({ enable = true, max_lines = 0, trim_scope = "outer", patterns = { default = { "class", "function", "method", }, }, exact_patterns = { }, zindex = 20, mode = "cursor", }) """ if = false [[plugins]] repo = "https://github.com/Omochice/nvim-tree-docs" on_source = "nvim-treesitter" lua_source = """ require("nvim-treesitter.configs").setup({ tree_docs = { enable = false, }, }) """ [[plugins]] repo = "https://github.com/yuki-yano/vim-operator-replace" depends = "vim-operator-user" on_map = { n = "<Plug>", x = "<Plug>" } hook_add = """ nnoremap R <Plug>(operator-replace) xnoremap R <Plug>(operator-replace) """ [[plugins]] repo = "https://github.com/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 <silent> <M-h> <Cmd>TmuxNavigateLeft<CR> # nnoremap <silent> <M-j> <Cmd>TmuxNavigateDown<CR> # nnoremap <silent> <M-k> <Cmd>TmuxNavigateUp<CR> # nnoremap <silent> <M-l> <Cmd>TmuxNavigateRight<CR> # " xnoremap # xnoremap <silent> <M-h> <Cmd>TmuxNavigateLeft<CR> # xnoremap <silent> <M-j> <Cmd>TmuxNavigateDown<CR> # xnoremap <silent> <M-k> <Cmd>TmuxNavigateUp<CR> # xnoremap <silent> <M-l> <Cmd>TmuxNavigateRight<CR> # " lnoremap # lnoremap <silent> <M-h> <Cmd>TmuxNavigateLeft<CR> # lnoremap <silent> <M-j> <Cmd>TmuxNavigateDown<CR> # lnoremap <silent> <M-k> <Cmd>TmuxNavigateUp<CR> # lnoremap <silent> <M-l> <Cmd>TmuxNavigateRight<CR> # " tnoremap # tnoremap <silent> <M-h> <Cmd>TmuxNavigateLeft<CR> # tnoremap <silent> <M-j> <Cmd>TmuxNavigateDown<CR> # tnoremap <silent> <M-k> <Cmd>TmuxNavigateUp<CR> # tnoremap <silent> <M-l> <Cmd>TmuxNavigateRight<CR> # """ # on_cmd = [ # "TmuxNavigateLeft", # "TmuxNavigateDown", # "TmuxNavigateUp", # "TmuxNavigateRight", # ] # if = "has('wsl')" [[plugins]] repo = "https://github.com/machakann/vim-vimhelplint" on_cmd = ["VimhelpLint"] [plugins.ftplugin] help = """ nnoremap <silent><buffer><Space>d <Cmd>VimhelpLint!<CR> """ [[plugins]] repo = "https://github.com/mattn/vim-sonictemplate" on_cmd = ["Template"] hook_add = """ let g:sonictemplate_vim_template_dir = $'{g:config_dir}/templates' let g:sonictemplate_key = '' let g:sonictemplate_intelligent_key = '' let g:sonictemplate_postfix_key = '' """ [[plugins]] repo = "https://github.com/pappasam/vim-filetype-formatter" lua_add = """ local vimx = require('artemis') vimx.g.vim_filetype_formatter_commands = { ruby = 'rufo -x', json = 'jq .', go = 'goimports | gofmt', typescript = 'NO_COLOR= deno fmt -', sh = 'shfmt -ln bash -i 2 -bn -ci -sr -kp', fortran = 'fprettify -i 2 -S', elm = 'elm-format --stdin', dockerfile = 'dockfmt fmt', } vimx.g.vim_filetype_formatter_ft_maps = { bash = 'sh', } """ on_cmd = "FiletypeFormat" [plugins.ftplugin] ruby = "nnoremap <buffer><Space>f <Cmd>FiletypeFormat<CR>" json = "nnoremap <buffer><Space>f <Cmd>FiletypeFormat<CR>" python = "nnoremap <buffer><Space>f <Cmd>FiletypeFormat<CR>" go = "nnoremap <buffer><Space>f <Cmd>FiletypeFormat<CR>" sh = "nnoremap <buffer><Space>f <Cmd>FiletypeFormat<CR>" bash = "nnoremap <buffer><Space>f <Cmd>FiletypeFormat<CR>" fortran = "nnoremap <buffer><Space>f <Cmd>FiletypeFormat<CR>" elm = "nnoremap <buffer><Space>f <Cmd>FiletypeFormat<CR>" # typescript = """ # if !myvimrc#is_node_project#check() # nnoremap <buffer><Space>f <Cmd>FiletypeFormat<CR> # endif # """ dockerfile = "nnoremap <buffer><Space>f <Cmd>FiletypeFormat<CR>" [[plugins]] repo = "https://github.com/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 <C-g> <Cmd>Lazygit<CR> nnoremap <Space>t <Cmd>FloatermNew<CR> """ on_cmd = ["FloatermNew"] [plugins.ftplugin] floaterm = "tnoremap <buffer> <ESC> <ESC>" [[plugins]] repo = "https://github.com/vim-jp/vital.vim" on_cmd = ["Vitalize"] [[plugins]] repo = "https://github.com/thinca/vim-partedit" hook_add = """ let g:partedit#opener = 'vsplit' """ on_func = ["partedit#start"] [[plugins]] repo = "https://github.com/Omochice/vim-operator-partedit" depends = ["vim-operator-user", "vim-partedit"] hook_add = """ nmap qe <Plug>(operator-partedit-start) xmap qe <Plug>(operator-partedit-start) """ on_map = { x = "<Plug>", n = "<Plug>" } [plugins.ftplugin] markdown = """ nmap <buffer> qe <Plug>(operator-partedit-codeblock) xmap <buffer> qe <Plug>(operator-partedit-codeblock) """ [[plugins]] repo = "https://github.com/lambdalisue/vim-fern" hooks_file = "$DEIN_RC_DIR/hooks/fern.lua" on_cmd = "Fern" [[plugins]] repo = "https://github.com/lambdalisue/fern-hijack.vim" on_source = "fern.vim" [[plugins]] repo = "https://github.com/lambdalisue/fern-renderer-nerdfont.vim" hook_add = """ let g:fern#renderer = "nerdfont" let g:fern#renderer#nerdfont#indent_markers = 1 """ on_source = "fern.vim" [[plugins]] repo = "https://github.com/mattn/emmet-vim" hooks_file = "$DEIN_RC_DIR/hooks/emmet.lua" on_map = { i = "<Plug>" } [[plugins]] # repo = "~/Toy/toy-postfix.vim" repo = "https://github.com/Omochice/toy-postfix.vim" hooks_file = "$DEIN_RC_DIR/hooks/toy-postfix.lua" on_func = ["toy_postfix#expandable", "toy_postfix#expand"] [[multiple_hooks]] plugins = ["vim-vsnip", "emmet-vim", "toy-postfix.vim"] hook_add = """ function! s:expand_snippets() abort silent! doautocmd <nomodeline> User myvimrc#close_pum if toy_postfix#expandable() return "\\<Cmd>call toy_postfix#expand()\\<CR>" elseif vsnip#expandable() return "\\<Plug>(vsnip-expand)" else return "\\<Plug>(emmet-expand-abbr-with-cmd)" endif endfunction inoremap <expr><C-x><C-j> "\\<C-g>u" .. <SID>expand_snippets() """ [[plugins]] repo = "https://github.com/Omochice/yank-remote-url.vim" # repo = "~/Toy/yank-remote-url.vim" hook_add = """ let g:yank_remote_url#enable_cache = v:true let g:yank_remote_url#use_direct_hash = v:true let g:yank_remote_url#remote_name = 'origin' let g:yank_remote_url#_debug = v:false nnoremap <Space>gy <Cmd>YankRemoteURL<CR> """ on_cmd = "YankRemoteURL" [[plugins]] repo = "https://github.com/tweekmonster/helpful.vim" on_cmd = "HelpfulVersion" [[plugins]] repo = "https://github.com/rhysd/git-messenger.vim" lua_add = """ local vimx = require('artemis') vimx.g.git_messenger_no_default_mappings = false vimx.g.git_messenger_floating_win_opts = { border = 'single' } vimx.keymap.set('n', '<Space>gm', '<Plug>(git-messenger)') """ on_map = { n = "<Plug>" } if = "!has('nvim')" [[plugins]] repo = "https://github.com/tyru/capture.vim" hooks_file = "$DEIN_RC_DIR/hooks/capture.lua" on_cmd = "Capture" [[plugins]] repo = "https://github.com/lewis6991/gitsigns.nvim" hooks_file = "$DEIN_RC_DIR/hooks/gitsigns.lua" if = "has('nvim')" on_event = ["BufRead", "BufNewFile"] [[plugins]] repo = "https://github.com/thinca/vim-qfreplace" on_cmd = "Qfreplace" [[plugins]] repo = "https://github.com/rcarriga/nvim-notify" hooks_file = "$DEIN_RC_DIR/hooks/nvim-notify.lua" if = "has('nvim')" [[plugins]] repo = "https://github.com/MunifTanjim/nui.nvim" if = "has('nvim')" [[plugins]] repo = "https://github.com/folke/noice.nvim" hooks_file = "$DEIN_RC_DIR/hooks/noice.lua" depends = ["nui.nvim", "nvim-notify"] if = "has('nvim')" on_event = ["BufRead", "BufNewFile", "InsertEnter", "CmdlineEnter"] on_lua = "notify" [[plugins]] repo = "https://github.com/uga-rosa/ccc.nvim" hooks_file = "$DEIN_RC_DIR/hooks/ccc.lua" on_event = ["BufRead", "BufNewFile"] if = "has('nvim')" [[plugins]] repo = "https://github.com/shellRaining/hlchunk.nvim" hooks_file = "$DEIN_RC_DIR/hooks/hlchunk.lua" on_event = ["BufRead", "BufNewFile"] if = "has('nvim')" [[plugins]] repo = "https://github.com/zbirenbaum/copilot.lua" lua_source = """ require("copilot").setup({ panel = { enabled = false, }, suggestion = { auto_trigger = true, keymap = { accept = "<C-i>", }, }, }) """ if = "!exists('$COPILOT_DISABLE')" [[plugins]] repo = "https://github.com/CopilotC-Nvim/CopilotChat.nvim" lua_source = """ require("CopilotChat").setup({ help = false, }) """ depends = ["copilot.lua", "plenary.nvim"] on_cmd = [ "CopilotChat", "CopilotChatBuffer", "CopilotChatExplain", "CopilotChatTests", "CopilotChatVisual", "CopilotChatInPlace", ] if = "!exists('$COPILOT_DISABLE')" [[plugins]] repo = "https://github.com/nvim-lua/plenary.nvim" if = "has('nvim')" [[plugins]] repo = "https://github.com/Shougo/cmdline.vim" on_func = "cmdline" [[plugins]] repo = "https://github.com/stevearc/oil.nvim" on_lua = ["oil"] hooks_file = "$DEIN_RC_DIR/hooks/oil.lua" [[plugins]] repo = "https://github.com/Omochice/oil-nerdfont" on_lua = "oil-nerdfont" depends = ["oil.nvim", "vim-nerdfont"] [[plugins]] repo = "https://github.com/folke/zen-mode.nvim" on_lua = "zen-mode" on_cmd = "ZenMode" [[plugins]] repo = "https://github.com/frankroeder/parrot.nvim" depends = ["plenary.nvim"] on_cmd = [ "PrtChatNew", "PrtChatToggle", "PrtChatPaste", "PrtInfo", "PrtContext", "PrtChatFinder", "PrtChatDelete", "PrtChatRespond", "PrtStop", "PrtProvider", "PrtModel", "PrtStatus", "PrtRewrite", "PrtEdit", "PrtAppend", "PrtPrepend", "PrtNew", "PrtEnew", "PrtVnew", "PrtTabnew", "PrtRetry", "PrtImplement", "PrtAsk", ] hooks_file = "$DEIN_RC_DIR/hooks/parrot.lua"