Add comment.nvim, nvim-surround, harpoon, flash.nvim, indent-blankline, todo-comments.nvim, trouble.nvim, undotree, and pywal.nvim + themeswitcher
This commit is contained in:
parent
a808085623
commit
1ae2321378
@ -117,6 +117,40 @@
|
|||||||
- `Tab` - Next completion item
|
- `Tab` - Next completion item
|
||||||
- `Shift+Tab` - Previous completion item
|
- `Shift+Tab` - Previous completion item
|
||||||
|
|
||||||
|
### Commenting (Comment.nvim)
|
||||||
|
- `gcc` - Toggle comment on line
|
||||||
|
- `gc{motion}` - Toggle comment with motion (e.g., `gc3j` comments 3 lines down)
|
||||||
|
- `gbc` - Toggle block comment
|
||||||
|
- Visual mode: `gc` - Comment selection
|
||||||
|
|
||||||
|
### Surround (nvim-surround)
|
||||||
|
- `ys{motion}{char}` - Add surround (e.g., `ysiw"` surrounds word with quotes)
|
||||||
|
- `ds{char}` - Delete surround (e.g., `ds"` removes quotes)
|
||||||
|
- `cs{old}{new}` - Change surround (e.g., `cs"'` changes `"` to `'`)
|
||||||
|
- Visual mode: `S{char}` - Surround selection
|
||||||
|
|
||||||
|
### Harpoon (quick file switching)
|
||||||
|
- `Space+ha` - Add current file to harpoon
|
||||||
|
- `Space+hh` - Open harpoon menu
|
||||||
|
- `Space+1/2/3/4` - Jump to harpoon file 1-4
|
||||||
|
|
||||||
|
### Flash (supercharged motions)
|
||||||
|
- `s` - Flash jump (type chars to jump to)
|
||||||
|
- `S` - Flash treesitter select
|
||||||
|
|
||||||
|
### Diagnostics (Trouble)
|
||||||
|
- `Space+xx` - Toggle diagnostics panel
|
||||||
|
- `Space+xX` - Buffer diagnostics only
|
||||||
|
- `Space+xl` - Location list
|
||||||
|
- `Space+xq` - Quickfix list
|
||||||
|
|
||||||
|
### Theme Switcher
|
||||||
|
- `Space+th` - Open theme picker (pywal, kanagawa variants, or pick new wallpaper)
|
||||||
|
|
||||||
|
### Utilities
|
||||||
|
- `Space+u` - Toggle undo tree
|
||||||
|
- `Space+ft` - Find TODOs in project
|
||||||
|
|
||||||
## Useful Tips
|
## Useful Tips
|
||||||
- **Repeat actions**: Number before command (e.g., `5dd` deletes 5 lines)
|
- **Repeat actions**: Number before command (e.g., `5dd` deletes 5 lines)
|
||||||
- **Combine motions**: `d3w` deletes 3 words, `y2j` yanks 2 lines down
|
- **Combine motions**: `d3w` deletes 3 words, `y2j` yanks 2 lines down
|
||||||
@ -150,4 +184,4 @@
|
|||||||
- System clipboard integration: Just yank normally with `y` - it copies to system clipboard! (You have `clipboard=unnamedplus` set)
|
- System clipboard integration: Just yank normally with `y` - it copies to system clipboard! (You have `clipboard=unnamedplus` set)
|
||||||
|
|
||||||
---
|
---
|
||||||
*Last updated: November 2025*
|
*Last updated: February 2026*
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"99": { "branch": "master", "commit": "0fb3b8b2d032289ea7088a37161e1c50bdfccfa9" },
|
"99": { "branch": "master", "commit": "0fb3b8b2d032289ea7088a37161e1c50bdfccfa9" },
|
||||||
|
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
||||||
"LuaSnip": { "branch": "master", "commit": "dae4f5aaa3574bd0c2b9dd20fb9542a02c10471c" },
|
"LuaSnip": { "branch": "master", "commit": "dae4f5aaa3574bd0c2b9dd20fb9542a02c10471c" },
|
||||||
"alpha-nvim": { "branch": "main", "commit": "3979b01cb05734331c7873049001d3f2bb8477f4" },
|
"alpha-nvim": { "branch": "main", "commit": "3979b01cb05734331c7873049001d3f2bb8477f4" },
|
||||||
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
||||||
@ -8,8 +9,11 @@
|
|||||||
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
||||||
"conform.nvim": { "branch": "master", "commit": "c2526f1cde528a66e086ab1668e996d162c75f4f" },
|
"conform.nvim": { "branch": "master", "commit": "c2526f1cde528a66e086ab1668e996d162c75f4f" },
|
||||||
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
|
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
|
||||||
|
"flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" },
|
||||||
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
|
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "1ce96a464fdbc24208e24c117e2021794259005d" },
|
"gitsigns.nvim": { "branch": "main", "commit": "1ce96a464fdbc24208e24c117e2021794259005d" },
|
||||||
|
"harpoon": { "branch": "harpoon2", "commit": "87b1a3506211538f460786c23f98ec63ad9af4e5" },
|
||||||
|
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
|
||||||
"kanagawa": { "branch": "master", "commit": "aef7f5cec0a40dbe7f3304214850c472e2264b10" },
|
"kanagawa": { "branch": "master", "commit": "aef7f5cec0a40dbe7f3304214850c472e2264b10" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
|
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
|
||||||
@ -19,11 +23,16 @@
|
|||||||
"nvim-cmp": { "branch": "main", "commit": "da88697d7f45d16852c6b2769dc52387d1ddc45f" },
|
"nvim-cmp": { "branch": "main", "commit": "da88697d7f45d16852c6b2769dc52387d1ddc45f" },
|
||||||
"nvim-colorizer.lua": { "branch": "master", "commit": "338409dd8a6ed74767bad3eb5269f1b903ffb3cf" },
|
"nvim-colorizer.lua": { "branch": "master", "commit": "338409dd8a6ed74767bad3eb5269f1b903ffb3cf" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "0480b120318ec8bab27b530ffab6ee76a8c4d806" },
|
"nvim-lspconfig": { "branch": "master", "commit": "0480b120318ec8bab27b530ffab6ee76a8c4d806" },
|
||||||
|
"nvim-surround": { "branch": "main", "commit": "1098d7b3c34adcfa7feb3289ee434529abd4afd1" },
|
||||||
"nvim-tree.lua": { "branch": "master", "commit": "037d89e60fb01a6c11a48a19540253b8c72a3c32" },
|
"nvim-tree.lua": { "branch": "master", "commit": "037d89e60fb01a6c11a48a19540253b8c72a3c32" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "746ffbb17975ebd6c40142362eee1b0249969c5c" },
|
"nvim-web-devicons": { "branch": "master", "commit": "746ffbb17975ebd6c40142362eee1b0249969c5c" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||||
|
"pywal": { "branch": "main", "commit": "d11b673c0e3d6eb8cbee7ea8cf4a8911f6ee24b9" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "ad7d9580338354ccc136e5b8f0aa4f880434dcdc" },
|
"telescope.nvim": { "branch": "master", "commit": "ad7d9580338354ccc136e5b8f0aa4f880434dcdc" },
|
||||||
|
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
|
||||||
|
"trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
|
||||||
"typescript-tools.nvim": { "branch": "master", "commit": "c2f5910074103705661e9651aa841e0d7eea9932" },
|
"typescript-tools.nvim": { "branch": "master", "commit": "c2f5910074103705661e9651aa841e0d7eea9932" },
|
||||||
|
"undotree": { "branch": "master", "commit": "fc28931fbfba66ab75d9af23fe46ffbbb9de6e8c" },
|
||||||
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
|
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
|
||||||
}
|
}
|
||||||
|
|||||||
0
lua/plugins/colors.lua
Normal file
0
lua/plugins/colors.lua
Normal file
@ -6,33 +6,119 @@ return {
|
|||||||
priority = 1000,
|
priority = 1000,
|
||||||
config = function()
|
config = function()
|
||||||
require('kanagawa').setup({
|
require('kanagawa').setup({
|
||||||
compile = true, -- enable compiling the colorscheme
|
compile = true,
|
||||||
undercurl = true, -- enable undercurls
|
undercurl = true,
|
||||||
commentStyle = { italic = true },
|
commentStyle = { italic = true },
|
||||||
functionStyle = {},
|
functionStyle = {},
|
||||||
keywordStyle = { italic = true },
|
keywordStyle = { italic = true },
|
||||||
statementStyle = { bold = true },
|
statementStyle = { bold = true },
|
||||||
typeStyle = {},
|
typeStyle = {},
|
||||||
transparent = false, -- do not set background color
|
transparent = false,
|
||||||
dimInactive = false, -- dim inactive window `:h hl-NormalNC`
|
dimInactive = false,
|
||||||
terminalColors = true, -- define vim.g.terminal_color_{0,17}
|
terminalColors = true,
|
||||||
colors = { -- add/modify theme and palette colors
|
colors = {
|
||||||
palette = {},
|
palette = {},
|
||||||
theme = { wave = {}, lotus = {}, dragon = {}, all = {} },
|
theme = { wave = {}, lotus = {}, dragon = {}, all = {} },
|
||||||
},
|
},
|
||||||
overrides = function(colors) -- add/modify highlights
|
overrides = function(colors)
|
||||||
return {}
|
return {}
|
||||||
end,
|
end,
|
||||||
theme = "wave", -- Load "wave" theme
|
theme = "wave",
|
||||||
background = { -- map the value of 'background' option to a theme
|
background = {
|
||||||
dark = "wave", -- try "dragon" !
|
dark = "wave",
|
||||||
light = "lotus"
|
light = "lotus"
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
-- only set kanagawa if pywal colors don't exist
|
||||||
|
if vim.fn.filereadable(vim.fn.expand("~/.cache/wal/colors")) == 0 then
|
||||||
vim.cmd("colorscheme kanagawa")
|
vim.cmd("colorscheme kanagawa")
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
-- Pywal colorscheme (syncs with terminal)
|
||||||
|
{
|
||||||
|
"AlphaTechnolog/pywal.nvim",
|
||||||
|
name = "pywal",
|
||||||
|
priority = 1000,
|
||||||
|
config = function()
|
||||||
|
-- auto-load pywal if colors exist
|
||||||
|
if vim.fn.filereadable(vim.fn.expand("~/.cache/wal/colors")) == 1 then
|
||||||
|
vim.cmd("colorscheme pywal")
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Theme switcher
|
||||||
|
{
|
||||||
|
"nvim-telescope/telescope.nvim",
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<leader>th",
|
||||||
|
function()
|
||||||
|
local pickers = require("telescope.pickers")
|
||||||
|
local finders = require("telescope.finders")
|
||||||
|
local conf = require("telescope.config").values
|
||||||
|
local actions = require("telescope.actions")
|
||||||
|
local action_state = require("telescope.actions.state")
|
||||||
|
|
||||||
|
local themes = {
|
||||||
|
{ name = "pywal (from wallpaper)", value = "pywal" },
|
||||||
|
{ name = "Pick new wallpaper...", value = "_wallpaper_picker" },
|
||||||
|
{ name = "kanagawa", value = "kanagawa" },
|
||||||
|
{ name = "kanagawa-wave", value = "kanagawa-wave" },
|
||||||
|
{ name = "kanagawa-dragon", value = "kanagawa-dragon" },
|
||||||
|
{ name = "kanagawa-lotus", value = "kanagawa-lotus" },
|
||||||
|
}
|
||||||
|
|
||||||
|
pickers.new({}, {
|
||||||
|
prompt_title = "Theme Switcher",
|
||||||
|
finder = finders.new_table({
|
||||||
|
results = themes,
|
||||||
|
entry_maker = function(entry)
|
||||||
|
return {
|
||||||
|
value = entry.value,
|
||||||
|
display = entry.name,
|
||||||
|
ordinal = entry.name,
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
}),
|
||||||
|
sorter = conf.generic_sorter({}),
|
||||||
|
attach_mappings = function(prompt_bufnr, map)
|
||||||
|
actions.select_default:replace(function()
|
||||||
|
actions.close(prompt_bufnr)
|
||||||
|
local selection = action_state.get_selected_entry()
|
||||||
|
if selection.value == "_wallpaper_picker" then
|
||||||
|
-- launch wallpaper picker, then reload pywal
|
||||||
|
vim.fn.jobstart(
|
||||||
|
{ "bash", "-c", "~/scripts/pywal/wallpapermenu.sh && sleep 1" },
|
||||||
|
{
|
||||||
|
on_exit = function()
|
||||||
|
vim.schedule(function()
|
||||||
|
vim.cmd("colorscheme pywal")
|
||||||
|
require("lualine").setup({ options = { theme = "pywal" } })
|
||||||
|
vim.notify("Pywal theme applied", vim.log.levels.INFO)
|
||||||
|
end)
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
else
|
||||||
|
vim.cmd("colorscheme " .. selection.value)
|
||||||
|
-- update lualine theme
|
||||||
|
local lualine_theme = selection.value:match("^kanagawa") and "kanagawa" or selection.value
|
||||||
|
require("lualine").setup({ options = { theme = lualine_theme } })
|
||||||
|
vim.notify("Theme: " .. selection.value, vim.log.levels.INFO)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
return true
|
||||||
|
end,
|
||||||
|
}):find()
|
||||||
|
end,
|
||||||
|
desc = "Theme switcher",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
-- File explorer
|
-- File explorer
|
||||||
{
|
{
|
||||||
"nvim-tree/nvim-tree.lua",
|
"nvim-tree/nvim-tree.lua",
|
||||||
@ -236,6 +322,95 @@ return {
|
|||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
-- Commenting
|
||||||
|
{
|
||||||
|
"numToStr/Comment.nvim",
|
||||||
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Surround text objects
|
||||||
|
{
|
||||||
|
"kylechui/nvim-surround",
|
||||||
|
version = "*",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Quick file navigation
|
||||||
|
{
|
||||||
|
"ThePrimeagen/harpoon",
|
||||||
|
branch = "harpoon2",
|
||||||
|
dependencies = { "nvim-lua/plenary.nvim" },
|
||||||
|
config = function()
|
||||||
|
local harpoon = require("harpoon")
|
||||||
|
harpoon:setup()
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>ha", function() harpoon:list():add() end, { desc = "Harpoon add" })
|
||||||
|
vim.keymap.set("n", "<leader>hh", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end, { desc = "Harpoon menu" })
|
||||||
|
vim.keymap.set("n", "<leader>1", function() harpoon:list():select(1) end, { desc = "Harpoon 1" })
|
||||||
|
vim.keymap.set("n", "<leader>2", function() harpoon:list():select(2) end, { desc = "Harpoon 2" })
|
||||||
|
vim.keymap.set("n", "<leader>3", function() harpoon:list():select(3) end, { desc = "Harpoon 3" })
|
||||||
|
vim.keymap.set("n", "<leader>4", function() harpoon:list():select(4) end, { desc = "Harpoon 4" })
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Flash motions
|
||||||
|
{
|
||||||
|
"folke/flash.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = {},
|
||||||
|
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" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Indent guides
|
||||||
|
{
|
||||||
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
|
main = "ibl",
|
||||||
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
|
opts = {
|
||||||
|
indent = { char = "│" },
|
||||||
|
scope = { enabled = true },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- TODO comments
|
||||||
|
{
|
||||||
|
"folke/todo-comments.nvim",
|
||||||
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
|
dependencies = { "nvim-lua/plenary.nvim" },
|
||||||
|
opts = {},
|
||||||
|
keys = {
|
||||||
|
{ "<leader>ft", "<cmd>TodoTelescope<cr>", desc = "Find TODOs" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Diagnostics list
|
||||||
|
{
|
||||||
|
"folke/trouble.nvim",
|
||||||
|
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||||
|
cmd = "Trouble",
|
||||||
|
keys = {
|
||||||
|
{ "<leader>xx", "<cmd>Trouble diagnostics toggle<cr>", desc = "Diagnostics" },
|
||||||
|
{ "<leader>xX", "<cmd>Trouble diagnostics toggle filter.buf=0<cr>", desc = "Buffer diagnostics" },
|
||||||
|
{ "<leader>xl", "<cmd>Trouble loclist toggle<cr>", desc = "Location list" },
|
||||||
|
{ "<leader>xq", "<cmd>Trouble qflist toggle<cr>", desc = "Quickfix list" },
|
||||||
|
},
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Undo tree
|
||||||
|
{
|
||||||
|
"mbbill/undotree",
|
||||||
|
cmd = "UndotreeToggle",
|
||||||
|
keys = {
|
||||||
|
{ "<leader>u", "<cmd>UndotreeToggle<cr>", desc = "Toggle undotree" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
-- Which-key
|
-- Which-key
|
||||||
{
|
{
|
||||||
"folke/which-key.nvim",
|
"folke/which-key.nvim",
|
||||||
@ -252,9 +427,15 @@ return {
|
|||||||
{ "<leader>ff", desc = "Find files" },
|
{ "<leader>ff", desc = "Find files" },
|
||||||
{ "<leader>fg", desc = "Live grep" },
|
{ "<leader>fg", desc = "Live grep" },
|
||||||
{ "<leader>fb", desc = "Find buffers" },
|
{ "<leader>fb", desc = "Find buffers" },
|
||||||
|
{ "<leader>ft", desc = "Find TODOs" },
|
||||||
{ "<leader>g", group = "Git" },
|
{ "<leader>g", group = "Git" },
|
||||||
|
{ "<leader>h", group = "Harpoon" },
|
||||||
|
{ "<leader>t", group = "Theme" },
|
||||||
|
{ "<leader>th", desc = "Theme switcher" },
|
||||||
|
{ "<leader>x", group = "Trouble" },
|
||||||
{ "<leader>w", desc = "Save" },
|
{ "<leader>w", desc = "Save" },
|
||||||
{ "<leader>q", desc = "Quit" },
|
{ "<leader>q", desc = "Quit" },
|
||||||
|
{ "<leader>u", desc = "Undo tree" },
|
||||||
{ "<leader>9", group = "AI (99)" },
|
{ "<leader>9", group = "AI (99)" },
|
||||||
{ "<leader>9f", desc = "Fill Function" },
|
{ "<leader>9f", desc = "Fill Function" },
|
||||||
{ "<leader>9v", desc = "Visual AI" },
|
{ "<leader>9v", desc = "Visual AI" },
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user