Skip to content

Commit a2b1d5c

Browse files
committed
added flash.nvim
1 parent 7f586f5 commit a2b1d5c

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

init.lua

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,6 @@ P.S. You can delete this when you're done too. It's your config now! :)
9090
vim.g.mapleader = ' '
9191
vim.g.maplocalleader = ' '
9292

93-
vim.g.tabstop = 2
94-
9593
-- Set to true if you have a Nerd Font installed and selected in the terminal
9694
vim.g.have_nerd_font = true
9795

@@ -797,7 +795,7 @@ require('lazy').setup({
797795
-- Disable "format_on_save lsp_fallback" for languages that don't
798796
-- have a well standardized coding style. You can add additional
799797
-- languages here or re-enable it for the disabled ones.
800-
local disable_filetypes = { c = true, cpp = true }
798+
local disable_filetypes = { c = false, cpp = false }
801799
local lsp_format_opt
802800
if disable_filetypes[vim.bo[bufnr].filetype] then
803801
lsp_format_opt = 'never'
@@ -1089,5 +1087,8 @@ vim.api.nvim_create_autocmd('BufReadPost', {
10891087
end,
10901088
})
10911089

1090+
vim.g.tabstop = 2
1091+
vim.cmd 'set tabstop=2'
1092+
10921093
-- The line beneath this is called `modeline`. See `:help modeline`
10931094
-- vim: ts=2 sts=2 sw=2 et

lua/custom/plugins/init.lua

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,4 +303,20 @@ return {
303303
},
304304
},
305305
},
306+
307+
-- flash.nvim
308+
{
309+
'folke/flash.nvim',
310+
event = 'VeryLazy',
311+
---@type Flash.Config
312+
opts = {},
313+
-- stylua: ignore
314+
keys = {
315+
{ "s", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" },
316+
{ "S", mode = { "n", "x", "o" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" },
317+
-- { "r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" },
318+
-- { "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" },
319+
{ "<c-s>", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" },
320+
},
321+
},
306322
}

0 commit comments

Comments
 (0)