diff options
| author | christianchiarulli <[email protected]> | 2021-06-28 01:46:25 -0400 | 
|---|---|---|
| committer | christianchiarulli <[email protected]> | 2021-06-28 01:46:25 -0400 | 
| commit | 89ea86f0ae322fa9a207f03fcd6974c3ae9f35a2 (patch) | |
| tree | bbecfd22a8025a9d751243a3bca64da23840121e | |
| parent | f99b82bd6e7d4d317e082411f5192c76097b7149 (diff) | |
handsome new plugin config
| -rw-r--r-- | lua/default-config.lua | 10 | ||||
| -rw-r--r-- | lua/lv-autocommands/init.lua | 4 | ||||
| -rw-r--r-- | lua/lv-hop/init.lua | 10 | ||||
| -rw-r--r-- | lua/plugins.lua | 12 | ||||
| -rw-r--r-- | lv-config.lua | 3 | 
5 files changed, 32 insertions, 7 deletions
| diff --git a/lua/default-config.lua b/lua/default-config.lua index 803b603d..5c2027e2 100644 --- a/lua/default-config.lua +++ b/lua/default-config.lua @@ -27,6 +27,8 @@ O = {      database = {save_location = '~/.config/nvcode_db', auto_execute = 1}, +    plugins = {hop = {active = false}}, +      lang = {          python = {              active = false, @@ -143,10 +145,10 @@ O = {          css = {              active = false, -            formatter = '', autoformat = false, virtual_text = true}, -        json = { -            active = false, -            formatter = '', autoformat = false, virtual_text = true} +            formatter = '', +            autoformat = false, +            virtual_text = true +        }      }, diff --git a/lua/lv-autocommands/init.lua b/lua/lv-autocommands/init.lua index e6674292..02f8f39e 100644 --- a/lua/lv-autocommands/init.lua +++ b/lua/lv-autocommands/init.lua @@ -36,6 +36,9 @@ utils.define_augroups({          {'BufNewFile', '*', 'setlocal formatoptions-=c formatoptions-=r formatoptions-=o'},          {'VimLeavePre', '*', 'set title set titleold='},          {'FileType', 'qf', 'set nobuflisted'}, +        {'BufWinEnter', 'lv-config.lua', 'PackerCompile'}, +        {'BufWinLeave', 'lv-config.lua', 'PackerCompile'}, +        {'BufWritePost', 'lv-config.lua', 'PackerCompile'}          -- {'User', 'GoyoLeave', 'lua require(\'galaxyline\').disable_galaxyline()'},          -- {'User', 'GoyoEnter', 'lua require(\'galaxyline\').galaxyline_augroup()'}, @@ -44,6 +47,7 @@ utils.define_augroups({          -- {'FileType', 'java', 'luafile '..CONFIG_PATH..'/lua/lsp/java-ls.lua'},          {'FileType', 'java', 'nnoremap ca <Cmd>lua require(\'jdtls\').code_action()<CR>'}      }, +      _go = {          -- Go generally requires Tabs instead of spaces.          {'FileType', 'go', 'setlocal tabstop=4'}, diff --git a/lua/lv-hop/init.lua b/lua/lv-hop/init.lua index acd4cd78..21003374 100644 --- a/lua/lv-hop/init.lua +++ b/lua/lv-hop/init.lua @@ -1,2 +1,8 @@ -vim.api.nvim_set_keymap('n', 's', ":HopChar2<cr>", {silent = true}) -vim.api.nvim_set_keymap('n', 'S', ":HopWord<cr>", {silent = true}) +local M = {} + +M.config = function() +    vim.api.nvim_set_keymap('n', 's', ":HopChar2<cr>", {silent = true}) +    vim.api.nvim_set_keymap('n', 'S', ":HopWord<cr>", {silent = true}) +end + +return M diff --git a/lua/plugins.lua b/lua/plugins.lua index 20d0a167..9aa56b56 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -27,7 +27,8 @@ local function require_plugin(plugin)      return ok, err, code  end --- vim.cmd "autocmd BufWritePost plugins.lua PackerCompile" -- Auto compile when there are changes in plugins.lua +vim.cmd "autocmd BufWritePost plugins.lua PackerCompile" -- Auto compile when there are changes in plugins.lua +-- vim.cmd "autocmd BufWritePost lv-config.lua PackerCompile" -- Auto compile when there are changes in plugins.lua  return require("packer").startup(function(use)      -- Packer can manage itself as an optional plugin @@ -109,6 +110,15 @@ return require("packer").startup(function(use)      }      use {"hrsh7th/vim-vsnip"} +    use { +        event = 'BufRead', +        'phaazon/hop.nvim', +        config = function() +            require('lv-hop').config() +        end, +        disable = not O.plugins.hop.active, +        opt = true +    }      -- extras      -- if O.matchup then require('lv-matchup') end diff --git a/lv-config.lua b/lv-config.lua index e32cab4a..ff272a0c 100644 --- a/lv-config.lua +++ b/lv-config.lua @@ -16,6 +16,9 @@ O.document_highlight = true  O.extras = false  O.leader_key = ' ' +-- After changing plugin config it is recommended to run :PackerCompile +O.plugins.hop.active = true +  -- dashboard  -- O.dashboard.custom_header = {""}  -- O.dashboard.footer = {""} | 
