add nvim plugins
Added: - flash.nvim for better movement - debugprint.nvim for insert print debug statements
This commit is contained in:
parent
d082d41624
commit
d870d23e79
7 changed files with 72 additions and 31 deletions
|
|
@ -11,7 +11,7 @@ local function default(desc)
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
local function fixIdentation()
|
local function fixIndentation()
|
||||||
local indent = 2
|
local indent = 2
|
||||||
vim.opt.tabstop = indent
|
vim.opt.tabstop = indent
|
||||||
vim.opt.shiftwidth = indent
|
vim.opt.shiftwidth = indent
|
||||||
|
|
@ -24,7 +24,7 @@ end
|
||||||
-- See `:help vim.keymap.set()`
|
-- See `:help vim.keymap.set()`
|
||||||
vim.keymap.set({ "n", "v" }, "<Space>", "<Nop>", { silent = true })
|
vim.keymap.set({ "n", "v" }, "<Space>", "<Nop>", { silent = true })
|
||||||
|
|
||||||
vim.keymap.set("n", "<C-s>", "<CMD>w<CR>", default("Keep cursor centered while junping"))
|
-- vim.keymap.set("n", "<C-s>", "<CMD>w<CR>", default("Keep cursor centered while junping"))
|
||||||
|
|
||||||
-- Remap for dealing with word wrap
|
-- Remap for dealing with word wrap
|
||||||
vim.keymap.set("n", "k", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
|
vim.keymap.set("n", "k", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
|
||||||
|
|
@ -50,14 +50,14 @@ vim.keymap.set(
|
||||||
default("Search and replace current word")
|
default("Search and replace current word")
|
||||||
)
|
)
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>rR", ":s/", default("Search and replace inline"))
|
-- vim.keymap.set("n", "<leader>rR", ":s/", default("Search and replace inline"))
|
||||||
vim.keymap.set("n", "<leader>rr", ":%s/", default("Search and replace globally"))
|
-- vim.keymap.set("n", "<leader>rr", ":%s/", default("Search and replace globally"))
|
||||||
vim.keymap.set("v", "<leader>r", ":s/", default("Search and replace in selection"))
|
-- vim.keymap.set("v", "<leader>r", ":s/", default("Search and replace in selection"))
|
||||||
|
|
||||||
vim.keymap.set("v", "p", [["_dP]], default("Paste whitout lossing yanked text"))
|
vim.keymap.set("v", "p", [["_dP]], default("Paste without lossing yanked text"))
|
||||||
|
|
||||||
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv", default("Move selection down"))
|
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv", default("Move selection down"))
|
||||||
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv", default("Move selection up"))
|
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv", default("Move selection up"))
|
||||||
vim.keymap.set("n", "<Leader>uI", fixIdentation, default("Fix identation"))
|
vim.keymap.set("n", "<Leader>uI", fixIndentation, default("Fix indentation"))
|
||||||
|
|
||||||
vim.keymap.set("n", "<Leader>uh", ":nohl<CR>", default("Remove search highlight"))
|
vim.keymap.set("n", "<Leader>uh", ":nohl<CR>", default("Remove search highlight"))
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
return {
|
||||||
|
"andrewferrier/debugprint.nvim",
|
||||||
|
opts = {},
|
||||||
|
-- Remove the following line to use development versions,
|
||||||
|
-- not just the formal releases
|
||||||
|
version = "*",
|
||||||
|
}
|
||||||
25
chezmoi/dot_config/nvim/lua/aleidk/plugins/flash.lua
Normal file
25
chezmoi/dot_config/nvim/lua/aleidk/plugins/flash.lua
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
return {
|
||||||
|
"folke/flash.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
---@type Flash.Config
|
||||||
|
opts = {
|
||||||
|
label = {
|
||||||
|
rainbow = {
|
||||||
|
enabled = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
modes = {
|
||||||
|
search = {
|
||||||
|
enabled = false, -- actibable with require("flash").toggle(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- stylua: ignore
|
||||||
|
keys = {
|
||||||
|
{ "s", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" },
|
||||||
|
{ "S", mode = { "n", "x", "o" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" },
|
||||||
|
{ "r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" },
|
||||||
|
{ "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" },
|
||||||
|
{ "<c-s>", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
return {
|
return {
|
||||||
"echasnovski/mini.surround",
|
"echasnovski/mini.surround",
|
||||||
|
disabled = true,
|
||||||
version = "*",
|
version = "*",
|
||||||
opts = {},
|
opts = {},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,10 @@
|
||||||
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
||||||
"comment-box.nvim": { "branch": "main", "commit": "dd1a48f8d06102e9b87ae1e0069bc365c006979b" },
|
"comment-box.nvim": { "branch": "main", "commit": "dd1a48f8d06102e9b87ae1e0069bc365c006979b" },
|
||||||
"conform.nvim": { "branch": "master", "commit": "e4ecb6e8ed3163c86d7e647f1dc3d94de77ca687" },
|
"conform.nvim": { "branch": "master", "commit": "e4ecb6e8ed3163c86d7e647f1dc3d94de77ca687" },
|
||||||
|
"debugprint.nvim": { "branch": "main", "commit": "159c7522438c6cf53540fb588fcf5bdad692d1bc" },
|
||||||
"diffview.nvim": { "branch": "main", "commit": "d38c1b5266850f77f75e006bcc26213684e1e141" },
|
"diffview.nvim": { "branch": "main", "commit": "d38c1b5266850f77f75e006bcc26213684e1e141" },
|
||||||
"dressing.nvim": { "branch": "master", "commit": "1f2d1206a03bd3add8aedf6251e4534611de577f" },
|
"dressing.nvim": { "branch": "master", "commit": "1f2d1206a03bd3add8aedf6251e4534611de577f" },
|
||||||
|
"flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" },
|
||||||
"friendly-snippets": { "branch": "main", "commit": "43727c2ff84240e55d4069ec3e6158d74cb534b6" },
|
"friendly-snippets": { "branch": "main", "commit": "43727c2ff84240e55d4069ec3e6158d74cb534b6" },
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "5a9a6ac29a7805c4783cda21b80a1e361964b3f2" },
|
"gitsigns.nvim": { "branch": "main", "commit": "5a9a6ac29a7805c4783cda21b80a1e361964b3f2" },
|
||||||
"indent-blankline.nvim": { "branch": "master", "commit": "046e2cf04e08ece927bacbfb87c5b35c0b636546" },
|
"indent-blankline.nvim": { "branch": "master", "commit": "046e2cf04e08ece927bacbfb87c5b35c0b636546" },
|
||||||
|
|
|
||||||
|
|
@ -60,3 +60,9 @@ function ya() {
|
||||||
fi
|
fi
|
||||||
rm -f -- "$tmp"
|
rm -f -- "$tmp"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Zellij
|
||||||
|
function zr() { zellij run --name "$*" -- zsh -ic "$*"; }
|
||||||
|
function zrf() { zellij run --name "$*" --floating -- zsh -ic "$*"; }
|
||||||
|
function ze() { zellij edit "$*"; }
|
||||||
|
function zef() { zellij edit --floating "$*"; }
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,8 @@ setopt GLOB_COMPLETE # Show autocompletion menu with globs
|
||||||
setopt MENU_COMPLETE # Automatically highlight first element of completion menu
|
setopt MENU_COMPLETE # Automatically highlight first element of completion menu
|
||||||
|
|
||||||
# fpath+=${ZSH_CUSTOM:-${ZSH:-$XDG_DATA_HOME/oh-my-zsh}/custom}/plugins/zsh-completions/src
|
# fpath+=${ZSH_CUSTOM:-${ZSH:-$XDG_DATA_HOME/oh-my-zsh}/custom}/plugins/zsh-completions/src
|
||||||
fpath+=${XDG_CONFIG_HOME:-$DOTS/config}/zsh/completions
|
fpath+=${XDG_CONFIG_HOME:-$HOME/.config}/zsh/completions
|
||||||
|
autoload -Uz ${XDG_CONFIG_HOME:-$HOME/.config}/zsh/completions/*
|
||||||
|
|
||||||
zstyle ':completion:*:descriptions' format '%U%B%d%b%u'
|
zstyle ':completion:*:descriptions' format '%U%B%d%b%u'
|
||||||
zstyle ':completion:*:warnings' format '%F{cyan}%BSorry, no matches for: %d%b%f'
|
zstyle ':completion:*:warnings' format '%F{cyan}%BSorry, no matches for: %d%b%f'
|
||||||
|
|
@ -108,7 +109,6 @@ if [[ "$ZPROF" = true ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
eval "$(starship init zsh)"
|
eval "$(starship init zsh)"
|
||||||
# eval "$(zellij setup --generate-auto-start zsh)"
|
|
||||||
eval "$(zoxide init zsh)"
|
eval "$(zoxide init zsh)"
|
||||||
eval "$(mise activate zsh)"
|
eval "$(mise activate zsh)"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue