Skip to main content

Editor

Includes the following extras

neo-tree.nvim

file explorer

opts = {
sources = { "filesystem", "buffers", "git_status" },
open_files_do_not_replace_types = { "terminal", "Trouble", "trouble", "qf", "Outline" },
filesystem = {
bind_to_cwd = false,
follow_current_file = { enabled = true },
use_libuv_file_watcher = true,
},
window = {
mappings = {
["l"] = "open",
["h"] = "close_node",
["<space>"] = "none",
["Y"] = {
function(state)
local node = state.tree:get_node()
local path = node:get_id()
vim.fn.setreg("+", path, "c")
end,
desc = "Copy Path to Clipboard",
},
["O"] = {
function(state)
require("lazy.util").open(state.tree:get_node().path, { system = true })
end,
desc = "Open with System Application",
},
["P"] = { "toggle_preview", config = { use_float = false } },
},
},
default_component_configs = {
indent = {
with_expanders = true, -- if nil and file nesting is enabled, will enable expanders
expander_collapsed = "",
expander_expanded = "",
expander_highlight = "NeoTreeExpander",
},
git_status = {
symbols = {
unstaged = "󰄱",
staged = "󰱒",
},
},
},
}

grug-far.nvim

search/replace in multiple files

opts = { headerMaxWidth = 80 }

flash.nvim

Flash enhances the built-in search functionality by showing labels at the end of each match, letting you quickly jump to a specific location.

opts = {}

which-key.nvim

which-key helps you remember key bindings by showing a popup with the active keybindings of the command you started typing.

opts = {
preset = "helix",
defaults = {},
spec = {
{
mode = { "n", "v" },
{ "<leader><tab>", group = "tabs" },
{ "<leader>c", group = "code" },
{ "<leader>d", group = "debug" },
{ "<leader>dp", group = "profiler" },
{ "<leader>f", group = "file/find" },
{ "<leader>g", group = "git" },
{ "<leader>gh", group = "hunks" },
{ "<leader>q", group = "quit/session" },
{ "<leader>s", group = "search" },
{ "<leader>u", group = "ui", icon = { icon = "󰙵 ", color = "cyan" } },
{ "<leader>x", group = "diagnostics/quickfix", icon = { icon = "󱖫 ", color = "green" } },
{ "[", group = "prev" },
{ "]", group = "next" },
{ "g", group = "goto" },
{ "gs", group = "surround" },
{ "z", group = "fold" },
{
"<leader>b",
group = "buffer",
expand = function()
return require("which-key.extras").expand.buf()
end,
},
{
"<leader>w",
group = "windows",
proxy = "<c-w>",
expand = function()
return require("which-key.extras").expand.win()
end,
},
-- better descriptions
{ "gx", desc = "Open with system app" },
},
},
}

gitsigns.nvim

git signs highlights text that has changed since the list git commit, and also lets you interactively stage & unstage hunks in a commit.

opts = {
signs = {
add = { text = "▎" },
change = { text = "▎" },
delete = { text = "" },
topdelete = { text = "" },
changedelete = { text = "▎" },
untracked = { text = "▎" },
},
signs_staged = {
add = { text = "▎" },
change = { text = "▎" },
delete = { text = "" },
topdelete = { text = "" },
changedelete = { text = "▎" },
},
on_attach = function(buffer)
local gs = package.loaded.gitsigns

local function map(mode, l, r, desc)
vim.keymap.set(mode, l, r, { buffer = buffer, desc = desc })
end

-- stylua: ignore start
map("n", "]h", function()
if vim.wo.diff then
vim.cmd.normal({ "]c", bang = true })
else
gs.nav_hunk("next")
end
end, "Next Hunk")
map("n", "[h", function()
if vim.wo.diff then
vim.cmd.normal({ "[c", bang = true })
else
gs.nav_hunk("prev")
end
end, "Prev Hunk")
map("n", "]H", function() gs.nav_hunk("last") end, "Last Hunk")
map("n", "[H", function() gs.nav_hunk("first") end, "First Hunk")
map({ "n", "v" }, "<leader>ghs", ":Gitsigns stage_hunk<CR>", "Stage Hunk")
map({ "n", "v" }, "<leader>ghr", ":Gitsigns reset_hunk<CR>", "Reset Hunk")
map("n", "<leader>ghS", gs.stage_buffer, "Stage Buffer")
map("n", "<leader>ghu", gs.undo_stage_hunk, "Undo Stage Hunk")
map("n", "<leader>ghR", gs.reset_buffer, "Reset Buffer")
map("n", "<leader>ghp", gs.preview_hunk_inline, "Preview Hunk Inline")
map("n", "<leader>ghb", function() gs.blame_line({ full = true }) end, "Blame Line")
map("n", "<leader>ghB", function() gs.blame() end, "Blame Buffer")
map("n", "<leader>ghd", gs.diffthis, "Diff This")
map("n", "<leader>ghD", function() gs.diffthis("~") end, "Diff This ~")
map({ "o", "x" }, "ih", ":<C-U>Gitsigns select_hunk<CR>", "GitSigns Select Hunk")
end,
}

gitsigns.nvim

opts = function()
Snacks.toggle({
name = "Git Signs",
get = function()
return require("gitsigns.config").config.signcolumn
end,
set = function(state)
require("gitsigns").toggle_signs(state)
end,
}):map("<leader>uG")
end

trouble.nvim

better diagnostics list and others

opts = {
modes = {
lsp = {
win = { position = "right" },
},
},
}

todo-comments.nvim

Finds and lists all of the TODO, HACK, BUG, etc comment in your project and loads them into a browsable list.

opts = {}