mirror of
https://github.com/kogakure/dotfiles.git
synced 2026-02-03 20:25:30 +00:00
feat(nvim): add svart plugin
This commit is contained in:
35
nvim/after/plugin/svart.lua
Normal file
35
nvim/after/plugin/svart.lua
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
-- https://gitlab.com/madyanov/svart.nvim
|
||||||
|
local status, svart = pcall(require, "svart")
|
||||||
|
if not status then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local keymap = vim.keymap.set
|
||||||
|
local opts = { noremap = true, silent = true }
|
||||||
|
|
||||||
|
svart.configure({
|
||||||
|
key_cancel = "<Esc>", -- cancel search
|
||||||
|
key_delete_char = "<BS>", -- delete query char
|
||||||
|
key_delete_word = "<C-W>", -- delete query word
|
||||||
|
key_delete_query = "<C-U>", -- delete whole query
|
||||||
|
key_best_match = "<CR>", -- jump to the best match
|
||||||
|
key_next_match = "<C-N>", -- select next match
|
||||||
|
key_prev_match = "<C-P>", -- select prev match
|
||||||
|
|
||||||
|
label_atoms = "jfkdlsahgnuvrbytmiceoxwpqz", -- allowed label chars
|
||||||
|
label_location = "end", -- possible values: "start" of the match, "end" of the match
|
||||||
|
label_max_len = 2, -- max label length
|
||||||
|
label_min_query_len = 1, -- min query length required to show labels
|
||||||
|
label_hide_irrelevant = true, -- hide irrelevant labels after start typing label to go to
|
||||||
|
|
||||||
|
search_update_register = true, -- update search (/) register with last used query after accepting match
|
||||||
|
search_wrap_around = true, -- wrap around when navigating to next/prev match
|
||||||
|
search_multi_window = true, -- search in multiple windows
|
||||||
|
|
||||||
|
ui_dim_content = true, -- dim buffer content during search
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Keymaps
|
||||||
|
keymap({ "n", "x", "o" }, "s", "<Cmd>Svart<CR>", opts) -- begin exact search
|
||||||
|
keymap({ "n", "x", "o" }, "S", "<Cmd>SvartRegex<CR>", opts) -- begin regex search
|
||||||
|
keymap({ "n", "x", "o" }, "gs", "<Cmd>SvartRepeat<CR>", opts)
|
||||||
@@ -141,6 +141,7 @@ return packer.startup(function(use)
|
|||||||
use("ray-x/guihua.lua") -- Lua GUI lib
|
use("ray-x/guihua.lua") -- Lua GUI lib
|
||||||
use("ray-x/sad.nvim") -- Find & Replace
|
use("ray-x/sad.nvim") -- Find & Replace
|
||||||
use("gorbit99/codewindow.nvim") -- Minimap
|
use("gorbit99/codewindow.nvim") -- Minimap
|
||||||
|
use("https://gitlab.com/madyanov/svart.nvim")
|
||||||
|
|
||||||
-- Editing Files
|
-- Editing Files
|
||||||
use("windwp/nvim-autopairs") -- Autopairs, integrates with both cmp and treesitter
|
use("windwp/nvim-autopairs") -- Autopairs, integrates with both cmp and treesitter
|
||||||
|
|||||||
Reference in New Issue
Block a user