added todo, commentary, snacks and oil
This commit is contained in:
parent
d89fb31004
commit
116c91c155
|
@ -2,6 +2,6 @@ tags
|
|||
test.sh
|
||||
.luarc.json
|
||||
nvim
|
||||
|
||||
init.lua.bak
|
||||
spell/
|
||||
lazy-lock.json
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
-- [plugins/editing.lua]
|
||||
|
||||
return {
|
||||
|
||||
|
||||
|
||||
{ -- Autoformat
|
||||
'stevearc/conform.nvim',
|
||||
event = { 'BufWritePre' },
|
||||
|
@ -102,4 +105,42 @@ return {
|
|||
},
|
||||
},
|
||||
},
|
||||
|
||||
{ -- Trouble.nvim: pretty diagnostics & quickfix
|
||||
'folke/trouble.nvim',
|
||||
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
||||
opts = {},
|
||||
cmd = "Trouble",
|
||||
keys = {
|
||||
{ "<leader>xx", "<cmd>Trouble diagnostics toggle<CR>", desc = "Diagnostics (Trouble)" },
|
||||
{ "<leader>xq", "<cmd>Trouble qflist toggle<CR>", desc = "Quickfix (Trouble)" },
|
||||
},
|
||||
},
|
||||
|
||||
{ -- Testing framework
|
||||
'vim-test/vim-test',
|
||||
config = function()
|
||||
vim.keymap.set("n", "<leader>tn", ":TestNearest<CR>", { desc = "Run nearest test" })
|
||||
vim.keymap.set("n", "<leader>tf", ":TestFile<CR>", { desc = "Run file tests" })
|
||||
vim.keymap.set("n", "<leader>tl", ":TestLast<CR>", { desc = "Run last test" })
|
||||
vim.keymap.set("n", "<leader>ts", ":TestSuite<CR>", { desc = "Run test suite" })
|
||||
end,
|
||||
},
|
||||
|
||||
{ -- Todo-comments: highlight and search TODO/FIX
|
||||
'folke/todo-comments.nvim',
|
||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||
opts = {},
|
||||
event = "VimEnter",
|
||||
config = function()
|
||||
require("todo-comments").setup()
|
||||
vim.keymap.set("n", "<leader>st", "<cmd>TodoTelescope<CR>", { desc = "Search TODOs" })
|
||||
end,
|
||||
},
|
||||
|
||||
{ -- Commenting
|
||||
'tpope/vim-commentary',
|
||||
-- usage: `gcc` (line), `gc` (visual selection)
|
||||
},
|
||||
|
||||
}
|
||||
|
|
|
@ -41,4 +41,21 @@ return {
|
|||
end,
|
||||
},
|
||||
},
|
||||
|
||||
{ -- Git wrapper
|
||||
'tpope/vim-fugitive',
|
||||
cmd = { "Git", "G" }, -- lazy load on :Git
|
||||
},
|
||||
|
||||
require('gitsigns').setup {
|
||||
current_line_blame = true, -- shows git blame at end of line
|
||||
current_line_blame_opts = {
|
||||
virt_text = true,
|
||||
virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align'
|
||||
delay = 500,
|
||||
ignore_whitespace = false,
|
||||
},
|
||||
current_line_blame_formatter = '<author>, <author_time:%Y-%m-%d> - <summary>',
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
-- [plugins/tools.lua]
|
||||
|
||||
return {
|
||||
|
||||
{ -- Fuzzy Finder (files, lsp, etc)
|
||||
'nvim-telescope/telescope.nvim',
|
||||
event = 'VimEnter',
|
||||
|
@ -45,6 +46,15 @@ return {
|
|||
end,
|
||||
},
|
||||
|
||||
{ -- Telescope frecency (smart recent files)
|
||||
'nvim-telescope/telescope-frecency.nvim',
|
||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||
config = function()
|
||||
require("telescope").load_extension("frecency")
|
||||
vim.keymap.set("n", "<leader>fr", "<cmd>Telescope frecency<CR>", { desc = "[F]ile [R]ecency" })
|
||||
end,
|
||||
},
|
||||
|
||||
{ -- Treesitter for better syntax highlighting
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
build = ':TSUpdate',
|
||||
|
@ -60,6 +70,44 @@ return {
|
|||
},
|
||||
},
|
||||
|
||||
{ -- Oil.nvim: directory navigation as buffers
|
||||
'stevearc/oil.nvim',
|
||||
opts = {},
|
||||
config = function(_, opts)
|
||||
require("oil").setup(opts)
|
||||
vim.keymap.set("n", "-", "<CMD>Oil<CR>", { desc = "Open parent directory with oil" })
|
||||
end,
|
||||
},
|
||||
|
||||
{ -- Harpoon: 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 file" })
|
||||
vim.keymap.set("n", "<leader>hh", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end, { desc = "Harpoon menu" })
|
||||
vim.keymap.set("n", "<leader>h1", function() harpoon:list():select(1) end, { desc = "Harpoon to file 1" })
|
||||
vim.keymap.set("n", "<leader>h2", function() harpoon:list():select(2) end, { desc = "Harpoon to file 2" })
|
||||
vim.keymap.set("n", "<leader>h3", function() harpoon:list():select(3) end, { desc = "Harpoon to file 3" })
|
||||
vim.keymap.set("n", "<leader>h4", function() harpoon:list():select(4) end, { desc = "Harpoon to file 4" })
|
||||
end,
|
||||
},
|
||||
|
||||
{ -- Snacks.nvim: utilities (scratch, terminal, etc.)
|
||||
'folke/snacks.nvim',
|
||||
config = function()
|
||||
require("snacks").setup({
|
||||
terminal = { win = { style = "float" } },
|
||||
scratch = true,
|
||||
})
|
||||
vim.keymap.set("n", "<leader>tt", function() require("snacks.terminal").toggle() end, { desc = "Toggle terminal" })
|
||||
vim.keymap.set("n", "<leader>ss", function() require("snacks.scratch").open() end, { desc = "Open scratch buffer" })
|
||||
end,
|
||||
},
|
||||
|
||||
{ -- Debugging (DAP)
|
||||
'mfussenegger/nvim-dap',
|
||||
dependencies = {
|
||||
|
|
Loading…
Reference in New Issue