more neovim plugins

This commit is contained in:
Mark Riedesel 2024-06-20 08:19:09 -05:00
parent bbf6641115
commit ef84f5b008
10 changed files with 81 additions and 18 deletions

View file

@ -1,15 +1,19 @@
{
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
"LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" },
"alpha-nvim": { "branch": "main", "commit": "41283fb402713fc8b327e60907f74e46166f4cfd" },
"auto-session": { "branch": "main", "commit": "af2219b9fa99c1d7ac409bd9eac094c459d3f52d" },
"bufferline.nvim": { "branch": "main", "commit": "99337f63f0a3c3ab9519f3d1da7618ca4f91cffe" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
"cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "031e6ba70b0ad5eee49fd2120ff7a2e325b17fa7" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"dressing.nvim": { "branch": "master", "commit": "6741f1062d3dc6e4755367a7e9b347b553623f04" },
"friendly-snippets": { "branch": "main", "commit": "682157939e57bd6a2c86277dfd4d6fbfce63dbac" },
"gist.nvim": { "branch": "main", "commit": "92b13e486dd9fd083750450e0d262fcc68a62b91" },
"gitsigns.nvim": { "branch": "main", "commit": "bcae8395fb1033ed0340dd00d61b3bf050b1bd8e" },
"indent-blankline.nvim": { "branch": "master", "commit": "d98f537c3492e87b6dc6c2e3f66ac517528f406f" },
"lazy.nvim": { "branch": "main", "commit": "bc620783663ab09d16bff9fdecc07da65b2a1528" },
"lazygit.nvim": { "branch": "main", "commit": "ad3e1ea592f9d13e86e0d4e850224d9d78069508" },
"lspkind.nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" },
@ -24,6 +28,7 @@
"nvim-tree.lua": { "branch": "master", "commit": "2086e564c4d23fea714e8a6d63b881e551af2f41" },
"nvim-treesitter": { "branch": "master", "commit": "66ae8748fd4e8550c8b17cf115c9739aea1e4067" },
"nvim-ts-autotag": { "branch": "main", "commit": "06fe07d7523ba8c755fac7c913fceba43b1720ee" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "cb064386e667def1d241317deed9fd1b38f0dc2e" },
"nvim-unception": { "branch": "main", "commit": "a0af21a27e2ba19ce6004d57d34006d18bc6bad4" },
"nvim-web-devicons": { "branch": "master", "commit": "c0cfc1738361b5da1cd0a962dd6f774cc444f856" },
"plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
@ -33,7 +38,6 @@
"todo-comments.nvim": { "branch": "main", "commit": "51e10f838e84b4756c16311d0b1ef0972c6482d2" },
"tokyonight.nvim": { "branch": "main", "commit": "81c867c5f638597a82c82094dcb90ed42444dabc" },
"trouble.nvim": { "branch": "main", "commit": "58a3acfc6d8d819324dab4c87068596319032e64" },
"vim-commentary": { "branch": "master", "commit": "c4b8f52cbb7142ec239494e5a2c4a512f92c4d07" },
"vim-fugitive": { "branch": "master", "commit": "64d6cafb9dcbacce18c26d7daf617ebb96b273f3" },
"vim-maximizer": { "branch": "master", "commit": "2e54952fe91e140a2e69f35f22131219fcd9c5f1" },
"vim-tmux-navigator": { "branch": "master", "commit": "5b3c701686fb4e6629c100ed32e827edf8dad01e" },

View file

@ -18,18 +18,12 @@ vim.g.maplocalleader = " "
-- options
local opt = vim.opt
opt.relativenumber = true
opt.number = true
-- opt.number = true
opt.autoread = true -- automatically reload modified files
opt.wildmenu = true -- handle autocompletion menu
opt.wrap = false
opt.list = true
--opt.listchars = {
-- { tab = '>' },
-- { trail = '▂' },
-- { extends = '»' },
-- { precedes = '«' },
--}
-- opt.list = true
opt.modelines = 5
opt.matchtime = 1

View file

@ -3,7 +3,7 @@ return {
event = "VimEnter",
config = function ()
local alpha = require('alpha')
local dashboard = require('alpha.themes.dashboard')
local dashboard = require 'alpha.themes.dashboard'
dashboard.section.header.val = {
" ▜█▙ ",

View file

@ -4,7 +4,6 @@ return {
version = "*",
opts = {
options = {
-- mode = "tabs",
separator_style = "slope",
diagnostics = "nvim_lsp",
},

View file

@ -0,0 +1,15 @@
return {
"numToStr/Comment.nvim",
event = { "BufReadPre", "BufNewFile" },
dependencies = {
"JoosepAlviste/nvim-ts-context-commentstring",
},
config = function ()
-- <leader>cc
local comment = require "Comment"
local ts_context_commentstring = require "ts_context_commentstring.integrations.comment_nvim"
comment.setup({
pre_hook = ts_context_commentstring.create_pre_hook(),
})
end,
}

View file

@ -0,0 +1,47 @@
return {
"lewis6991/gitsigns.nvim",
event = { "BufReadPre", "BufNewFile" },
opts = {
on_attach = function(bufnr)
local gs = package.loaded.gitsigns
local function map(mode, l, r, desc)
vim.keymap.set(mode, l, r, { buffer = bufnr, desc = desc })
end
-- Navigation
map("n", "]h", gs.next_hunk, "Next Hunk")
map("n", "[h", gs.prev_hunk, "Prev Hunk")
-- Actions
map("n", "<leader>hs", gs.stage_hunk, "Stage hunk")
map("n", "<leader>hr", gs.reset_hunk, "Reset hunk")
map("v", "<leader>hs", function()
gs.stage_hunk({ vim.fn.line("."), vim.fn.line("v") })
end, "Stage hunk")
map("v", "<leader>hr", function()
gs.reset_hunk({ vim.fn.line("."), vim.fn.line("v") })
end, "Reset hunk")
map("n", "<leader>hS", gs.stage_buffer, "Stage buffer")
map("n", "<leader>hR", gs.reset_buffer, "Reset buffer")
map("n", "<leader>hu", gs.undo_stage_hunk, "Undo stage hunk")
map("n", "<leader>hp", gs.preview_hunk, "Preview hunk")
map("n", "<leader>hb", function()
gs.blame_line({ full = true })
end, "Blame line")
map("n", "<leader>hB", gs.toggle_current_line_blame, "Toggle line blame")
map("n", "<leader>hd", gs.diffthis, "Diff this")
map("n", "<leader>hD", function()
gs.diffthis("~")
end, "Diff this ~")
-- Text object
map({ "o", "x" }, "ih", ":<C-U>Gitsigns select_hunk<CR>", "Gitsigns select hunk")
end,
},
}

View file

@ -0,0 +1,8 @@
return {
"lukas-reineke/indent-blankline.nvim",
event = { "BufReadPre", "BufNewFile" },
main = "ibl",
opts = {
indent = { char = "" },
},
}

View file

@ -3,6 +3,7 @@ return {
event = { "BufReadPre", "BufNewFile" },
dependencies = {
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-nvim-lsp-signature-help",
{ "antosha417/nvim-lsp-file-operations", config = true },
{ "folke/neodev.nvim", opts = {} },
},

View file

@ -4,6 +4,7 @@ return {
dependencies = {
"hrsh7th/cmp-buffer", -- source for text in buffer
"hrsh7th/cmp-path", -- source for file system paths
"hrsh7th/cmp-nvim-lsp-signature-help", -- show completion hints for function calls
{
"L3MON4D3/LuaSnip",
-- follow latest release.
@ -55,6 +56,7 @@ return {
{ name = "luasnip" }, -- snippets
{ name = "buffer" }, -- text within current buffer
{ name = "path" }, -- file system paths
{ name = "nvim_lsp_signature_help" }, -- function parameters
}),
-- configure lspkind for vs-code like pictograms in completion menu

View file

@ -1,7 +0,0 @@
return {
'tpope/vim-commentary',
keys = {
{ '<leader>c', '<Plug>Commentary', mode = {'n','o','x'}, desc = "Toggle commented"},
{ '<leader>cc', '<Plug>CommentaryLine', mode = 'n', desc = "Toggle commented"},
},
}