# Lazy load plugins # Colorscheme {{{ [[plugins]] # nvim-treesitter repo = 'nvim-treesitter/nvim-treesitter' on_event = 'BufRead' hook_post_update = 'TSUpdate' lua_source = ''' -- <% ./dein_toml/treesitter.lua require("nvim-treesitter.configs").setup({ ensure_installed = "all", highlight = { enable = true, disable = { 'help', }, }, indent = { enable = true, disable = { 'help', }, }, }) -- %> ''' hook_source = ''' set foldmethod=expr set foldexpr=nvim_treesitter#foldexpr() set nofoldenable augroup treesitter_fold autocmd! autocmd FileType toml,help set foldmethod=marker foldenable augroup END ''' [[plugins]] # treesitter playground repo = 'nvim-treesitter/playground' depends = 'nvim-treesitter' on_cmd = 'TSPlaygroundToggle' lua_source = ''' -- <% ./dein_toml/ts_playground.lua require("nvim-treesitter.configs").setup({ playground = { enable = true, disable = {}, updatetime = 25, persist_queries = true, keybindings = { toggle_query_editor = "o", toggle_hl_groups = "i", toggle_injected_languages = "t", toggle_anonymous_nodes = "a", toggle_language_display = "I", focus_language = "f", unfocus_language = "F", update = "R", goto_node = "", show_help = "?", }, }, }) -- %> ''' [[plugins]] # nightfox.nvim repo = 'EdenEast/nightfox.nvim' depends = ['nvim-treesitter'] on_event = 'VimEnter' lua_source = ''' -- <% ./dein_toml/nightfox_settings.lua local nightfox = require("nightfox") local compile_path = vim.fn.stdpath("cache") .. "/nightfox" nightfox.setup({ options = { -- Compiled file's destination location compile_path = compile_path, compile_file_suffix = "_compiled", -- Compiled file suffix transparent = false, -- Disable setting background terminal_colors = true, -- Set terminal colors (vim.g.terminal_color_*) dim_inactive = false, -- Non focused panes set to alternative background module_default = true, styles = { -- Style to be applied to different syntax groups comments = "italic", conditionals = "NONE", constants = "NONE", functions = "bold", keywords = "NONE", numbers = "NONE", operators = "NONE", strings = "NONE", types = "NONE", variables = "NONE", }, inverse = { -- Inverse highlight for different types match_paren = false, visual = true, search = false, }, modules = { -- List of various plugins and additional options fidget = true, lsp_saga = true, notify = true, treesitter = true, }, }, }) vim.cmd([[colorscheme nordfox]]) -- %> ''' lua_post_source = ''' -- <% ./dein_toml/nightfox_compile.lua local nightfox = require("nightfox") local compile_path = vim.fn.stdpath("cache") .. "/nightfox" if vim.fn.isdirectory(compile_path) then if vim.fn.empty(vim.fn.systemlist("ls " .. compile_path)) > 0 then nightfox.compile() end else nightfox.compile() end -- %> ''' [[plugins]] # lightline.vim repo = 'itchyny/lightline.vim' #on_event = ['InsertEnter', 'CmdlineEnter'] on_event = ['VimEnter'] depends = ['vim-gitbranch'] hook_source = ''' " <% ./dein_toml/lightline.vim set noshowmode set showtabline=2 set laststatus=3 let g:lightline = {} let g:lightline.colorscheme = 'nordfox' " active let g:lightline.active = {} let g:lightline.active.left = [ \ ['mode', 'paste', 'skk_mode'], \ ['relativepath', 'modified'], \ ] let g:lightline.active.right = [ \ ['percent', 'lineinfo'], \ ['fileformat', 'fileencoding', 'filetype'], \ ] " inactive let g:lightline.inactive = {} let g:lightline.inactive.left = [ \ ['filename'] \ ] let g:lightline.inactive.right = [ \ ['lineinfo'], \ ['percent'], \ ] let g:lightline.tabline = {} let g:lightline.tabline.left = [ \ ['tabs'], \ ] let g:lightline.tabline.right = [ \ ['git_branch'], \ ] let g:lightline.tab = {} let g:lightline.tab.active = ['tabnum', 'filename', 'modified'] let g:lightline.tab.inactive = ['tabnum', 'filename'] let g:lightline.separator = { \ 'left': '', \ 'right': '', \ } let g:lightline.subseparator = { \ 'left': '', \ 'right': ' ', \ } let g:lightline.component_function = { \ 'git_branch': 'vimrc#lightline_git_branch', \ 'mode': 'vimrc#lightline_custom_mode', \ 'skk_mode': 'lightline_skk#mode', \ } let g:lightline.component_expand = { \ 'lsp_ok': 'lightline_lsp#ok', \ 'lsp_errors': 'lightline_lsp#errors', \ 'lsp_warnings': 'lightline_lsp#warnings', \ } let g:lightline.component_expand_type = { \ 'lsp_ok': 'middle', \ 'lsp_errors': 'error', \ 'lsp_warnings': 'warning', \ } command! -bar LightlineUpdate call lightline#init()| call lightline#colorscheme()| call lightline#update() " %> ''' # }}} # Editor support plugins {{{ [[plugins]] # context_filetype.vim repo = 'Shougo/context_filetype.vim' hook_source = ''' let g:context_filetype#ignore_patterns = { \ 'toml': ['^\s*#\s*'], \ } ''' [[plugins]] # vimproc.vim repo = 'Shougo/vimproc.vim' build = 'make' [[plugins]] repo = 'LeafCage/vimhelpgenerator' on_cmd = ['VimHelpGenerator', 'VimHelpGeneratorVirtual'] hook_source = ''' let g:vimhelpgenerator_author = 'yasunori-kirin0418' let g:vimhelpgenerator_uri = 'https://github.com/yasunori-kirin0418' ''' [[plugins]] # nvim-notify repo = 'rcarriga/nvim-notify' on_source = 'nightfox.nvim' lua_source = ''' -- <% ./dein_toml/notify.lua require("notify").setup({ stages = "slide", background_color = "NormalFloat", }) vim.notify = require("notify") -- %> ''' [[plugins]] # suda.vim repo = 'lambdalisue/suda.vim' on_cmd = ['SudaRead', 'SudaWrite'] [[plugins]] # vim-quickrun repo = 'thinca/vim-quickrun' on_cmd = 'QuickRun' [[plugins]] # vim-molder repo = 'mattn/vim-molder' hook_add = ''' augroup vimrc_molder autocmd BufEnter * call vimrc#molder_init() augroup END ''' hook_source = ''' let g:molder_show_hidden = v:true ''' [[plugins]] # vim-molder-operations repo = 'mattn/vim-molder-operations' on_source = 'vim-molder' [plugins.ftplugin] molder = ''' nmap .. (molder-up) nmap (molder-reload) nmap N (molder-operations-newdir) nmap D (molder-operations-delete) nmap R (molder-operations-rename) nmap S (molder-operations-shell) nmap ! (molder-operations-command) nmap C call vimrc#molder_change_cwd() ''' [[plugins]] # helpful.vim repo = 'tweekmonster/helpful.vim' on_cmd = 'HelpfulVersion' [[plugins]] # bracey.vim repo = 'turbio/bracey.vim' on_cmd = 'Bracey' [[plugins]] # deol.nvim repo = 'Shougo/deol.nvim' on_cmd = 'Deol' hook_add = ''' nnoremap nmap s nnoremap a Deol \ -no-auto-cd \ -no-start-insert \ -split=floating \ -winheight=30 \ -winwidth=120 \ -toggle nnoremap t tabnewDeol -no-start-insert nnoremap c execute 'Deol' \ '-cwd=' . fnamemodify(expand('%'), ':h') \ '-no-auto-cd' \ '-no-start-insert' \ '-split=floating' \ '-winheight=30' \ '-winwidth=120' \ '-toggle' nnoremap h Deol \ -cwd=~ \ -no-start-insert \ -split=floating \ -winheight=30 \ -winwidth=120 \ -toggle " Escape deol tnoremap ''' hook_source = ''' " let g:deol#prompt_pattern = '^❯ \?' " let g:deol#enable_ddc_completion = v:true let g:deol#shell_history_path = '~/.zsh_history' let g:deol#enable_dir_changed = v:false let g:deol#nvim_server = '~/.cache/nvim/server.pipe' let g:deol#custom_map = { \ 'edit': '', \ } let g:deol#floating_border = 'double' ''' [[plugins]] # open-browser.vim repo = 'tyru/open-browser.vim' on_map = { 'nx' = '(openbrowser-smart-search)' } hook_add = ''' " open-browser.vim let g:netrw_nogx = 1 " disable netrw's gx mapping. nmap gx (openbrowser-smart-search) xmap gx (openbrowser-smart-search) ''' [[plugins]] repo = 'glidenote/memolist.vim' on_cmd = ['MemoNew', 'MemoList', 'MemoNewWithMeta', 'MemoGrep'] hook_source = ''' let g:memolist_path = expand('~/Documents/memo') ''' # }}} # Coding support plugins {{{ [[plugins]] # lexima.vim repo = 'cohama/lexima.vim' on_event = 'InsertEnter' hook_add = ''' let g:lexima_ctrlh_as_backspace = 1 ''' [[plugins]] # vim-eft repo = 'hrsh7th/vim-eft' on_map = { nxo = '(eft-' } hook_add = ''' nmap f (eft-f) xmap f (eft-f) omap f (eft-f) nmap F (eft-F) xmap F (eft-F) omap F (eft-F) nmap ; (eft-repeat) xmap ; (eft-repeat) ''' hook_source = ''' let g:eft_ignorecase = v:true ''' [[plugins]] # vim-cursorword repo = 'itchyny/vim-cursorword' on_source = 'nightfox.nvim' [[plugins]] # indent-blankline.nvim repo = 'lukas-reineke/indent-blankline.nvim' depends = 'nvim-treesitter' on_source = 'nightfox.nvim' lua_source = ''' -- <% ./dein_toml/indent_blankline.lua require("indent_blankline").setup({ char_list = { "│", "|", "¦", "┆", "┊" }, char_list_blankline = { "│", "|", "¦", "┆", "┊" }, show_current_context = true, show_current_context_start = true, show_current_context_start_on_current_line = true, show_end_of_line = true, show_first_indent_level = true, show_trailing_blankline_indent = true, space_char_blankline = " ", strict_tabs = true, use_treesitter = true, filetype_exclude = { "lspinfo", "packer", "checkhealth", "help", "man", "", }, buftype_exclude = { "terminal", "nofile", "quickfix", "prompt", }, bufname_exclude = {}, }) -- %> ''' [[plugins]] # matchparen.nvim repo = 'monkoose/matchparen.nvim' depends = 'nvim-treesitter' on_source = 'nightfox.nvim' lua_source = ''' require('matchparen').setup() ''' [[plugins]] # vim-sandwich repo = 'machakann/vim-sandwich' on_map = { nxo = '(sandwich-' } hook_add = ''' let g:sandwich_no_default_key_mappings = 1 " add nmap sa (sandwich-add) xmap sa (sandwich-add) omap sa (sandwich-add) " delete nmap sd (sandwich-delete) xmap sd (sandwich-delete) nmap sdb (sandwich-delete-auto) " replace nmap sr (sandwich-replace) xmap sr (sandwich-replace) nmap srb (sandwich-replace-auto) ''' [[plugins]] # vim-partedit repo = 'thinca/vim-partedit' depends = 'context_filetype.vim' on_func = 'partedit#start()' hook_add = ''' nnoremap e call partedit#start( \ context_filetype#get_range()[0][0], \ context_filetype#get_range()[1][0], \ #{ filetype: context_filetype#get_filetype() }) ''' hook_source = ''' let g:partedit#opener = 'vsplit' ''' [[plugins]] repo = 'yasunori-kirin0418/partial.vim' on_cmd = [ 'PartialOpen', 'PartialEdit', 'PartialTabedit', 'PartialVsplit', 'PartialSplit', 'PartialCreate', 'PartialUpdate', 'PartialSurround', ] hook_source = ''' let g:partial#partial_path_prefix = ' ' let g:partial#origin_path_prefix = ' ' let g:partial#relative_base_path = '~/.cache/partial.vim' ''' [[plugins]] # Comment.nvim repo = 'numToStr/Comment.nvim' depends = 'nvim-treesitter' on_map = { nox = '(comment_toggle_' } hook_add = ''' omap gc (comment_toggle_linewise) omap gb (comment_toggle_blockwise) nmap gc (comment_toggle_linewise) nmap gb (comment_toggle_blockwise) nmap gcc v:count == 0 ? '(comment_toggle_linewise_current)' : '(comment_toggle_linewise_count)' nmap gbc v:count == 0 ? '(comment_toggle_blockwise_current)' : '(comment_toggle_blockwise_count)' xmap gc (comment_toggle_linewise_visual) xmap gb (comment_toggle_blockwise_visual) ''' lua_source = ''' require('plugins.comment') ''' [[plugins]] # vim-themis repo = 'thinca/vim-themis' on_cmd = 'StartThemis' hook_add = ''' command! StartThemis call dein#source('vim-themis') ''' # }}} # Filetype plugins {{{ [[plugins]] # emmet-vim repo = 'mattn/emmet-vim' on_ft = ['html', 'css', 'scss', 'php'] hook_add = ''' let g:user_emmet_install_global = 0 let g:user_emmet_leader_key = '' autocmd FileType html,css,scss,php EmmetInstall let g:user_emmet_settings = { \ 'variables': { \ 'lang': "ja" \ }, \ 'html': { \ 'snippets': { \ 'html:5': "\n" \ ."\n" \ ."\t\n" \ ."\t\t\n" \ ."\t\t\n" \ ."\t\t\n" \ ."\t\t\n" \ ."\t\t\n" \ ."\t\n" \ ."\t\n\t${child}|\n\t\n" \ ."", \ 'lrl:s': "{{ | }}", \ 'lrl:e': "{!! | !!}", \ } \ }, \ 'php': { \ 'snippets': { \ 'php:s': "", \ 'php:e': "", \ 'lrl:s': "{{ | }}", \ 'lrl:e': "{!! | !!}", \ } \ } \ } ''' [[plugins]] # vim-json repo = 'elzr/vim-json' on_ft = 'json' hook_source = ''' augroup json_autocmd autocmd! autocmd FileType json setlocal autoindent autocmd FileType json setlocal formatoptions=tcq2l autocmd FileType json setlocal textwidth=78 shiftwidth=2 autocmd FileType json setlocal softtabstop=2 tabstop=2 autocmd FileType json setlocal expandtab autocmd FileType json setlocal foldmethod=syntax augroup END ''' [[plugins]] # plantuml-syntax repo = 'aklt/plantuml-syntax' on_ft = 'plantuml' [[plugins]] # vim-maketable repo = 'mattn/vim-maketable' on_ft = 'markdown' [[plugins]] # previm repo = 'previm/previm' depends = 'open-browser.vim' on_ft = 'markdown' on_cmd = 'PrevimOpen' hook_add = ''' nnoremap nmap p nnoremap o PrevimOpen nnoremap r call previm#refresh() ''' hook_source = ''' let g:previm_enable_realtime = 1 let g:previm_disable_default_css = 1 let g:previm_custom_css_path = expand('~/dotfiles/tmp/previm_markdown.css') let g:previm_plantuml_imageprefix = 'http://localhost:58080/png/' ''' [[plugins]] repo = 'atusy/tsnode-marker.nvim' on_ft = 'markdown' lua_source = ''' -- <% dein_toml/tsnode-marker.lua vim.api.nvim_create_autocmd("FileType", { group = vim.api.nvim_create_augroup("tsnode-marker-markdown", {}), pattern = "markdown", callback = function(ctx) require("tsnode-marker").set_automark(ctx.buf, { target = { "code_fence_content", "fenced_code_block_delimiter", "language" }, hl_group = "DiffChange", }) end, }) -- %> ''' # }}}