[[plugins]] repo = 'Shougo/dein.vim' [[plugins]] repo = 'nvim-lua/plenary.nvim' [[plugins]] repo = 'kyazdani42/nvim-web-devicons' [[plugins]] repo = 'kkharji/sqlite.lua' [[plugins]] repo = 'Shougo/pum.vim' [[plugins]] repo = 'vim-denops/denops.vim' [[plugins]] repo = 'hrsh7th/nvim-kit' on_cmd = 'KitInstall' [[plugins]] repo = 'L3MON4D3/LuaSnip' on_event = 'InsertEnter' lua_source = ''' require("luasnip.loaders.from_snipmate").lazy_load({ paths = vim.fn.stdpath("config") .. "/snippets", }) require("rc.plugins.LuaSnip.help") require("rc.plugins.LuaSnip.text") ''' [[plugins]] repo = 'cohama/lexima.vim' on_event = 'InsertEnter' hook_source = ''' let g:lexima_ctrlh_as_backspace = 1 ''' [[plugins]] repo = 'kana/vim-operator-user' [[plugins]] repo = 'yuki-yano/vim-operator-replace' depends = 'vim-operator-user' on_map = '(operator-replace)' hook_add = ''' noremap r (operator-replace) sunmap r ''' [[plugins]] repo = 'ibhagwan/fzf-lua' depends = 'nvim-web-devicons' on_cmd = 'FzfLua' hook_add = ''' nnoremap r FzfLua resume nnoremap f FzfLua files nnoremap b FzfLua buffers nnoremap o FzfLua oldfiles nnoremap lg FzfLua live_grep nnoremap / FzfLua blines nnoremap gf FzfLua git_files nnoremap h FzfLua help_tags nnoremap q: FzfLua command_history nnoremap q/ FzfLua search_history nnoremap i FzfLua diagnostics_document nnoremap gd FzfLua lsp_definitions nnoremap gr FzfLua lsp_references ''' lua_source = ''' local actions = require("fzf-lua.actions") require("fzf-lua").setup({ actions = { files = { ["default"] = actions.file_edit_or_qf, ["ctrl-x"] = actions.file_split, ["ctrl-v"] = actions.file_vsplit, ["ctrl-t"] = actions.file_tabedit, ["alt-q"] = actions.file_sel_to_qf, ["alt-l"] = actions.file_sel_to_ll, }, buffers = { ["default"] = actions.buf_edit, ["ctrl-x"] = actions.buf_split, ["ctrl-v"] = actions.buf_vsplit, ["ctrl-t"] = actions.buf_tabedit, }, }, }) ''' [[plugins]] repo = 'nvim-treesitter/nvim-treesitter' depends = ['nvim-treesitter-textobjects', 'nvim-ts-rainbow'] on_event = 'BufRead' hook_post_update = 'TSUpdate' lua_source = ''' local parser_install_dir = vim.fn.stdpath("data") .. "/treesitter" vim.opt.runtimepath:prepend(parser_install_dir) require("nvim-treesitter.configs").setup({ ensure_installed = "all", parser_install_dir = parser_install_dir, highlight = { enable = true, disable = { "help", "typescript", }, }, textobjects = { select = { enable = true, lookahead = true, keymaps = { ["ib"] = "@block.inner", ["ab"] = "@block.outer", ["if"] = "@function.inner", ["af"] = "@function.outer", ["il"] = "@loop.inner", ["al"] = "@loop.outer", }, }, swap = { enable = true, swap_next = { [""] = "@parameter.inner", }, swap_previous = { [""] = "@parameter.inner", }, }, }, rainbow = { enable = true, extended_mode = true, max_file_lines = nil, }, }) ''' [[plugins]] repo = 'nvim-treesitter/nvim-treesitter-textobjects' [[plugins]] repo = 'p00f/nvim-ts-rainbow' [[plugins]] repo = 'nvim-treesitter/playground' on_cmd = 'TSPlaygroundToggle' [[plugins]] repo = 'lambdalisue/fern.vim' on_cmd = 'Fern' hook_add = ''' nnoremap Fern . -drawer -toggle ''' hook_source = ''' augroup my-fern au! au FileType fern call s:fern_mapping() augroup END function! s:fern_mapping() nnoremap (fern-action-open:split) nnoremap (fern-action-open:vsplit) endfunction ''' [[plugins]] repo = 'lewis6991/gitsigns.nvim' on_event = 'BufRead' lua_source = ''' local gs = require("gitsigns") gs.setup({ on_attach = function(bufnr) local function map(mode, l, r, opts) opts = vim.F.if_nil(opts, {}) opts.buffer = bufnr vim.keymap.set(mode, l, r, opts) end -- Navigates map("n", "]g", function() if vim.wo.diff then return "]g" end vim.schedule(function() gs.next_hunk() end) return "" end, { expr = true }) map("n", "[g", function() if vim.wo.diff then return "[g" end vim.schedule(function() gs.prev_hunk() end) return "" end, { expr = true }) -- Actions map({ "n", "v" }, "gs", ":Gitsigns stage_hunk") map({ "n", "v" }, "gu", ":Gitsigns undo_stage_hunk") map({ "n", "v" }, "gr", ":Gitsigns reset_hunk") -- Text object map({ "o", "x" }, "ig", ":Gitsigns select_hunk") end, }) ''' [[plugins]] repo = 'hrsh7th/vim-searchx' on_func = 'searchx#start' hook_add = ''' nnoremap / call searchx#start({'dir': 1}) xnoremap / call searchx#start({'dir': 1}) nnoremap ? call searchx#start({'dir': 0}) xnoremap ? call searchx#start({'dir': 0}) nnoremap n call searchx#next() xnoremap n call searchx#next() cnoremap call searchx#next() nnoremap N call searchx#prev() xnoremap N call searchx#prev() cnoremap call searchx#prev() cnoremap call searchx#clear() ''' lua_source = ''' vim.g.searchx = { auto_accept = true, scrolloff = vim.opt.scrolloff:get(), scrolltime = 0, nohlsearch = { jump = true, }, markers = vim.split("ASDFGHJKL:QWERTYUIOP", ""), } ''' [[plugins]] repo = 'yuki-yano/fuzzy-motion.vim' depends = 'denops.vim' on_cmd = 'FuzzyMotion' hook_add = ''' nnoremap ss FuzzyMotion ''' [[plugins]] repo = 'tyru/open-browser.vim' on_map = '(openbrowser-smart-search)' hook_add = ''' let g:openbrowser_browser_commands = [ \ { \ 'name': 'vivaldi.exe', \ 'args': ['{browser}', '{uri}'] \ } \] nnoremap (openbrowser-smart-search) xnoremap (openbrowser-smart-search) ''' [[plugins]] repo = 'simeji/winresizer' on_cmd = 'WinResizerStartResize' hook_add = ''' " nnoremap WinResizerStartResize ''' [[plugins]] repo = 'junegunn/vim-easy-align' on_map = '(EasyAlign)' hook_add = ''' nnoremap ga (EasyAlign) xnoremap ga (EasyAlign) ''' [[plugins]] repo = 'thinca/vim-quickrun' depends = 'vim-quickrun-neovim-job' on_cmd = 'QuickRun' hook_add = ''' nnoremap @r QuickRun ''' lua_source = ''' vim.g.quickrun_config = { _ = { runner = "neovim_job", outputter = "error", ["outputter/error/success"] = "buffer", ["outputter/error/error"] = "quickfix", ["outputter/buffer/opener"] = "botright 10sp", ["outputter/buffer/close_on_empty"] = true, }, lua = { command = ":luafile", exec = "%C %S", runner = "vimscript", }, lua_vusted = { command = "vusted", exec = "%C %s", }, nimble = { command = "nimble", exec = "%C run", }, nimble_test = { command = "nimble", exec = "%C test", }, } ''' [[plugins]] repo = 'lambdalisue/vim-quickrun-neovim-job' [[plugins]] repo = 'hrsh7th/vim-gindent' hook_add = ''' let g:indent = {} let g:indent.enabled = { -> index(['vim', 'lua'], &ft) != -1 } ''' [[plugins]] repo = 'monaqa/vim-partedit' rev = 'feat-prefix_pattern' on_cmd = 'Partedit' on_func = 'partedit#start' hook_add = ''' let g:partedit#prefix_pattern = '\V\s\*' let g:partedit#auto_prefix = 0 ''' [plugins.ftplugin] toml_markdown = ''' nnoremap call operator_partedit() function! s:operator_partedit() abort let context = context_filetype#get() if context.range == [[0, 0], [0, 0]] echohl WarningMsg echomsg 'Context is not found' echohl NONE return endif call partedit#start(context.range[0][0], context.range[1][0], \ {'filetype': context.filetype}) nnoremap Q ParteditEnd endfunction ''' [[plugins]] repo = 'uga-rosa/linkformat.vim' on_cmd = 'LinkFormatPaste' hook_add = ''' let g:linkformat_template = join(['[[plugins]]', "repo = '<>'"], "\n") ''' [[plugins]] repo = '4513ECHO/denops-gitter.vim' depends = 'denops.vim' on_path = 'gitter://' [[plugins]] repo = '~/plugin/translate.nvim' on_cmd = 'Translate' hook_add = ''' lua <Translate JA -source=EN %s"):format(v)) vim.keymap.set({"n", "x"}, "me" .. k, ("Translate EN -source=JA %s"):format(v)) end EOL ''' lua_source = ''' require("translate").setup({ default = { command = "translate_shell", }, preset = { output = { split = { append = true, }, }, }, }) ''' [plugins.ftplugin] translate = ''' nnoremap q quit ''' [[plugins]] repo = '~/plugin/ccc.nvim' on_event = 'BufRead' hook_add = ''' nnoremap CccPick ''' lua_source = ''' require("ccc").setup({ default_color = "#40bfbf", point_color = "#40bfbf", highlighter = { auto_enable = true, lsp = true, }, }) ''' [[plugins]] repo = 'vim-skk/skkeleton' depends = 'denops.vim' on_event = ['InsertEnter', 'CmdlineEnter'] hook_add = ''' inoremap (skkeleton-toggle) cnoremap (skkeleton-toggle) ''' hook_source = ''' call add(g:skkeleton#mapped_keys, '') call skkeleton#config(#{ \ eggLikeNewline: v:true, \ globalDictionaries: [ \ '~/.skk/SKK-JISYO.L', \ '~/.skk/SKK-JISYO.edict2', \ ], \ registerConvertResult: v:true, \ }) lua require("rc.plugins.skkeleton") au User skkeleton-enable-post call s:skkeleton_enable() function! s:skkeleton_enable() abort lua CmpSourceSelect("skkeleton") endfunction au User skkeleton-disable-post lua CmpSourceSelect("default") ''' [[plugins]] repo = 'tyru/capture.vim' on_cmd = 'Capture' [[plugins]] repo = '~/plugin/contextment.vim' on_map = '(contextment' hook_add = ''' nnoremap gc (contextment) xnoremap gc (contextment) nnoremap gcc (contextment-line) '''