Update .config/nvim/init.lua
Update .config/nvim/lazy-lock.json Update .config/nvim/lua/plugin/10_hop.lua Add .config/nvim/lua/plugin/11_eyeliner.lua
This commit is contained in:
parent
d41eaefa7c
commit
b0e03a69ed
4 changed files with 54 additions and 12 deletions
|
|
@ -14,10 +14,12 @@
|
|||
-- ├──── 03_treesitter.lua Does anybody know what this does?
|
||||
-- ├──── 05_fzf.lua Pickers with fzf-lua
|
||||
-- ├──── 10_hop.lua Enables hopping to words in the current buffer
|
||||
-- ├──── 11_eyeliner.lua Highligts unique chars in words on f/F
|
||||
-- ├──── 15_lsp.lua Mason, LSP configurations
|
||||
-- ├──── 20_completion.lua Autocompletion with blink.cmp, and mini.snippets
|
||||
-- ├──── 25_git.lua Gitsigns
|
||||
-- ├──── 30_formatting.lua vim-sleuth and conform formatting configs
|
||||
-- ├──── 35_yanky.lua Yank and Put improvements
|
||||
-- ├ snippets/ Snippets definitions are in here
|
||||
-- ├── package.json Snippet repository metadata
|
||||
-- ├── global.json Global text snippets
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"blink.cmp": { "branch": "main", "commit": "327fff91fe6af358e990be7be1ec8b78037d2138" },
|
||||
"conform.nvim": { "branch": "master", "commit": "02736cf359a3235c6d7d601a2f6bdc909e557513" },
|
||||
"flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" },
|
||||
"eyeliner.nvim": { "branch": "main", "commit": "8f197eb30cecdf4c2cc9988a5eecc6bc34c0c7d6" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
||||
"fzf-lua": { "branch": "main", "commit": "a8458b79a957a6e3e217d84106a0fd4b9470ff4c" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "20ad4419564d6e22b189f6738116b38871082332" },
|
||||
|
|
@ -11,6 +11,7 @@
|
|||
"lazydev.nvim": { "branch": "main", "commit": "371cd7434cbf95606f1969c2c744da31b77fcfa6" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "d7b5feb6e769e995f7fcf44d92f49f811c51d10c" },
|
||||
"mason.nvim": { "branch": "main", "commit": "ad7146aa61dcaeb54fa900144d768f040090bff0" },
|
||||
"mini.ai": { "branch": "main", "commit": "11c57180bc9084089206e211ac7aa598bedc9673" },
|
||||
"mini.icons": { "branch": "main", "commit": "284798619aed9f4c1ac1b9417b9a5e3b4b85ef3a" },
|
||||
"mini.pairs": { "branch": "main", "commit": "b9aada8c0e59f2b938e98fbf4eae0799eba96ad9" },
|
||||
"mini.snippets": { "branch": "main", "commit": "7610dc3aaf7fb09b9cc428273a8ba15ef8aef495" },
|
||||
|
|
|
|||
|
|
@ -2,16 +2,44 @@ return {
|
|||
{
|
||||
"smoka7/hop.nvim",
|
||||
version = "*",
|
||||
opts = {
|
||||
keys = "etovxqpdygfblzhckisuran",
|
||||
},
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "gw", "<cmd>HopWordMW<CR>", mode = { "n", "x", "o" }, desc = "hop to word" },
|
||||
{ "gc", "<cmd>HopChar1MW<CR>", mode = { "n", "x", "o" }, desc = "hop to char" },
|
||||
{ "gl", "<cmd>HopLineStartMW<CR>", mode = { "n", "x", "o" }, desc = "hop to word" },
|
||||
{ "gn", "<cmd>HopNodes<CR>", mode = { "n", "x", "o" }, desc = "hop nodes" },
|
||||
{ "gp", "<cmd>HopPatternMW<CR>", mode = { "n", "x", "o" }, desc = "hop to pattern" },
|
||||
},
|
||||
config = function()
|
||||
local hop = require("hop")
|
||||
|
||||
hop.setup({
|
||||
keys = "etovxqpdygfblzhckisuran",
|
||||
})
|
||||
|
||||
-- Runs vim cmds ... if in visual mode
|
||||
local function run_if_visual(...)
|
||||
local mode = vim.fn.mode()
|
||||
if mode == "v" then
|
||||
for _, cmd in ipairs({ ... }) do
|
||||
vim.cmd(cmd)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- HopWordMW, and include whole word if in visual mode.
|
||||
local function hop_word_smart()
|
||||
---@diagnostic disable-next-line: missing-fields
|
||||
hop.hint_words({ multi_windows = true })
|
||||
run_if_visual("normal! iw")
|
||||
end
|
||||
|
||||
-- HopPatternMW, and include whole word if in visual mode.
|
||||
local function hop_pattern_smart()
|
||||
---@diagnostic disable-next-line: missing-fields
|
||||
hop.hint_patterns({ multi_windows = true })
|
||||
run_if_visual("normal! iw")
|
||||
end
|
||||
|
||||
-- stylua: ignore start
|
||||
vim.keymap.set({ "n", "x", "o" }, "gw", hop_word_smart, { desc = "hop to word" })
|
||||
vim.keymap.set({ "n", "x", "o" }, "gl", "<cmd>HopChar1MW<CR>", { desc = "hop to char" })
|
||||
vim.keymap.set({ "n", "x", "o" }, "g:", "<cmd>HopLineStartMW<CR>", { desc = "hop to line" })
|
||||
vim.keymap.set({ "n", "x", "o" }, "gn", "<cmd>HopNodes<CR>", { desc = "hop nodes" })
|
||||
vim.keymap.set({ "n", "x", "o" }, "gp", hop_pattern_smart, { desc = "hop to pattern" })
|
||||
-- stylua: ignore end
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
|||
11
private_dot_config/nvim/lua/plugin/11_eyeliner.lua
Normal file
11
private_dot_config/nvim/lua/plugin/11_eyeliner.lua
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
return {
|
||||
{
|
||||
"jinh0/eyeliner.nvim",
|
||||
opts = {
|
||||
highlight_on_key = true,
|
||||
dim = true,
|
||||
max_length = 9000,
|
||||
default_keymaps = true,
|
||||
},
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue