diff --git a/after/plugin/defaults.lua b/after/plugin/defaults.lua index e4277f8f..3617dbbd 100644 --- a/after/plugin/defaults.lua +++ b/after/plugin/defaults.lua @@ -58,43 +58,4 @@ for type, icon in pairs(signs) do vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl }) end --- null-ls --- @see: https://github.com/jay-babu/mason-null-ls.nvim --- might want to just use mason-null-ls. not yet sure what the advantage is. -local null_ls = require("null-ls") -null_ls.setup({ - sources = { - null_ls.builtins.formatting.prettierd, - }, -}) - --- nvim-autopairs + nvim-cmp -local cmp_autopairs = require('nvim-autopairs.completion.cmp') -local cmp = require('cmp') -cmp.event:on( - 'confirm_done', - cmp_autopairs.on_confirm_done() -) - --- neogen -vim.keymap.set('n', 'nf', ":Neogen func", { noremap = true, desc = '[D]ocument [F]unction' }) - --- hop -local hop = require('hop') -local directions = require('hop.hint').HintDirection - -vim.keymap.set( - '', - 'h', - function() hop.hint_char1({ direction = directions.AFTER_CURSOR }) end, - { remap = true, desc = '[H]opChar1 forwards' } -) - -vim.keymap.set( - '', - 'H', - function() hop.hint_char1({ direction = directions.BEFORE_CURSOR }) end, - { remap = true, desc = '[H]opChar1 backwards' } -) - -- vim: ts=2 sts=2 sw=2 et diff --git a/init.lua b/init.lua index 2e5e3c4e..4bbf1a21 100644 --- a/init.lua +++ b/init.lua @@ -192,7 +192,7 @@ require('lazy').setup({ -- NOTE: Next Step on Your Neovim Journey: Add/Configure additional "plugins" for kickstart -- These are some example plugins that I've included in the kickstart repository. -- Uncomment any of the lines below to enable them. - require 'kickstart.plugins.autoformat', + -- require 'kickstart.plugins.autoformat', -- require 'kickstart.plugins.debug', -- NOTE: The import below automatically adds your own plugins, configuration, etc from `lua/custom/plugins/*.lua` diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index 55a11dd2..5fab7e7a 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -14,13 +14,43 @@ return { { "danymat/neogen", dependencies = "nvim-treesitter/nvim-treesitter", - config = true, + config = function() + require('neogen').setup {} + vim.keymap.set('n', 'nf', ":Neogen func", { noremap = true, desc = '[D]ocument [F]unction' }) + end, + }, + + { + 'ggandor/leap.nvim', + dependencies = { "tpope/vim-repeat" }, + config = function() + require('leap').add_default_mappings() + end }, + { 'phaazon/hop.nvim', + cond = false, branch = 'v2', config = function() - require 'hop'.setup {} + local hop = require('hop') + local directions = require('hop.hint').HintDirection + + hop.setup {} + + vim.keymap.set( + '', + 'h', + function() hop.hint_char1({ direction = directions.AFTER_CURSOR }) end, + { remap = true, desc = '[H]opChar1 forwards' } + ) + + vim.keymap.set( + '', + 'H', + function() hop.hint_char1({ direction = directions.BEFORE_CURSOR }) end, + { remap = true, desc = '[H]opChar1 backwards' } + ) end }, @@ -29,6 +59,13 @@ return { lazy = true, config = function() require("nvim-autopairs").setup {} + + local cmp_autopairs = require('nvim-autopairs.completion.cmp') + local cmp = require('cmp') + cmp.event:on( + 'confirm_done', + cmp_autopairs.on_confirm_done() + ) end, }, @@ -41,5 +78,15 @@ return { "jose-elias-alvarez/null-ls.nvim", lazy = true, dependencies = { "nvim-lua/plenary.nvim" }, + config = function() + -- @see: https://github.com/jay-babu/mason-null-ls.nvim + -- might want to just use mason-null-ls. not yet sure what the advantage is. + local null_ls = require("null-ls") + null_ls.setup({ + sources = { + null_ls.builtins.formatting.prettierd, + }, + }) + end } }