summaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua')
-rw-r--r--lua/config/flash.lua11
-rw-r--r--lua/plugins/init.lua16
2 files changed, 26 insertions, 1 deletions
diff --git a/lua/config/flash.lua b/lua/config/flash.lua
new file mode 100644
index 0000000..868d931
--- /dev/null
+++ b/lua/config/flash.lua
@@ -0,0 +1,11 @@
+-- ~/.config/nvim/lua/config/flash.lua
+return function()
+ local flash = require('flash')
+ flash.setup({})
+
+ vim.keymap.set({ 'n', 'x', 'o' }, 's', function() flash.jump() end, { desc = 'Flash' })
+ vim.keymap.set({ 'n', 'x', 'o' }, 'S', function() flash.treesitter() end, { desc = 'Flash Treesitter' })
+ vim.keymap.set('o', 'r', function() flash.remote() end, { desc = 'Remote Flash' })
+ vim.keymap.set({ 'o', 'x' }, 'R', function() flash.treesitter_search() end, { desc = 'Treesitter Search' })
+ vim.keymap.set({ 'c' }, '<c-s>', function() flash.toggle() end, { desc = 'Toggle Flash Search' })
+end
diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua
index 04eedf8..1ed53df 100644
--- a/lua/plugins/init.lua
+++ b/lua/plugins/init.lua
@@ -133,12 +133,26 @@ return {
-- Git
'tpope/vim-fugitive',
+ -- Commenting
+ 'tpope/vim-commentary',
+
+ -- Flash (quick navigation)
+ {
+ 'folke/flash.nvim',
+ event = 'VeryLazy',
+ config = function()
+ require('config.flash')()
+ end,
+ },
+
-- Markdown Rendering
{
'MeanderingProgrammer/render-markdown.nvim',
dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' },
ft = { 'markdown' },
- opts = {},
+ opts = {
+ enabled = false,
+ },
},
-- Copilot