housekeeping

This commit is contained in:
Oliver Ladner 2024-03-05 21:26:01 +01:00
commit ccbe053f88
7 changed files with 64 additions and 104 deletions

View file

@ -2,12 +2,12 @@
My simple Neovim configuration. Made from scratch, inspired by My simple Neovim configuration. Made from scratch, inspired by
https://www.youtube.com/watch?v=w7i4amO_zaE https://www.youtube.com/watch?v=w7i4amO_zaE
EXTERNAL DEPENDENCIES MACOS NOTE: EXTERNAL DEPENDENCIES MACOS
- ripgrep (https://github.com/BurntSushi/ripgrep, used by telescope) - ripgrep (https://github.com/BurntSushi/ripgrep, used by telescope)
- fd (https://github.com/sharkdp/fd, used by telescope) - fd (https://github.com/sharkdp/fd, used by telescope)
- A Nerd font (https://www.nerdfonts.com/, used by nvim-web-devicons) - A Nerd font (https://www.nerdfonts.com/, used by nvim-web-devicons)
EXTERNAL DEPENDENCIES WINDOWS NOTE: EXTERNAL DEPENDENCIES WINDOWS
See https://blog.nikfp.com/how-to-install-and-set-up-neovim-on-windows See https://blog.nikfp.com/how-to-install-and-set-up-neovim-on-windows
- ripgrep (https://github.com/BurntSushi/ripgrep, used by telescope) - ripgrep (https://github.com/BurntSushi/ripgrep, used by telescope)
- fd (https://github.com/sharkdp/fd, used by telescope) - fd (https://github.com/sharkdp/fd, used by telescope)

View file

@ -1,29 +1,29 @@
{ {
"LuaSnip": { "branch": "master", "commit": "2dbef19461198630b3d7c39f414d09fb07d1fdd2" }, "LuaSnip": { "branch": "master", "commit": "2dbef19461198630b3d7c39f414d09fb07d1fdd2" },
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
"conform.nvim": { "branch": "master", "commit": "cbc5745bf7519acaf3a5cbaaa677fd556aa813d7" }, "conform.nvim": { "branch": "master", "commit": "3d59cbd01a4b74124c5a6fb23b8cc63e5c2db3d5" },
"gitsigns.nvim": { "branch": "main", "commit": "4aaacbf5e5e2218fd05eb75703fe9e0f85335803" }, "gitsigns.nvim": { "branch": "main", "commit": "2c2463dbd82eddd7dbab881c3a62cfbfbe3c67ae" },
"lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" }, "lazy.nvim": { "branch": "main", "commit": "aedcd79811d491b60d0a6577a9c1701063c2a609" },
"lazygit.nvim": { "branch": "main", "commit": "1e08e3f5ac1152339690140e61a4a32b3bdc7de5" }, "lsp-zero.nvim": { "branch": "v3.x", "commit": "abac76482ec3012a2b359ba956a74e2ffd33d46f" },
"lsp-zero.nvim": { "branch": "v3.x", "commit": "dec1c21204e2d9d49dad989b577c88958ed2c113" }, "lualine.nvim": { "branch": "master", "commit": "7d131a8d3ba5016229e8a1d08bf8782acea98852" },
"lualine.nvim": { "branch": "master", "commit": "566b7036f717f3d676362742630518a47f132fff" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "56e435e09f8729af2d41973e81a0db440f8fe9c9" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "56e435e09f8729af2d41973e81a0db440f8fe9c9" },
"mason.nvim": { "branch": "main", "commit": "baf99d94c3380640d19af9c70c0541bd6e7cd0cb" }, "mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" },
"nightfox.nvim": { "branch": "main", "commit": "a4bc2bd3d7ff1770ae104068458d3b0b8f8ec00d" }, "nightfox.nvim": { "branch": "main", "commit": "a408e6bb101066952b81de9c11be367114bd561f" },
"nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" }, "nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" },
"nvim-lspconfig": { "branch": "master", "commit": "042aa6b27b8b8d4f4e1bd42de2037c83d676a8a0" }, "nvim-lspconfig": { "branch": "master", "commit": "76251e810256dce4db531c98b8b746a38c0ed488" },
"nvim-treesitter": { "branch": "master", "commit": "090880c0f1fec219f7de838cb51b8dc07ce74a6d" }, "nvim-treesitter": { "branch": "master", "commit": "10d79b5dbbdffc3edf307b189284fb62e2e79a3e" },
"nvim-treesitter-context": { "branch": "master", "commit": "85cf977181fb8e816e47ac05df7f756e9cb72caf" }, "nvim-treesitter-context": { "branch": "master", "commit": "f2ef98cd18fca352448756d3feb6e58d82583274" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "19a91a38b02c1c28c14e0ba468d20ae1423c39b2" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "dd0b2036c3a27cb6e6486f8bd24188c6ca43af0b" },
"nvim-web-devicons": { "branch": "master", "commit": "140edfcf25093e8b321d13e154cbce89ee868ca0" }, "nvim-web-devicons": { "branch": "master", "commit": "7f30f2da3c3641841ceb0e2c150281f624445e8f" },
"oil.nvim": { "branch": "master", "commit": "bf753c3e3f8736939ad5597f92329dfe7b1df4f5" }, "oil.nvim": { "branch": "master", "commit": "bf753c3e3f8736939ad5597f92329dfe7b1df4f5" },
"plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" }, "plenary.nvim": { "branch": "master", "commit": "4f71c0c4a196ceb656c824a70792f3df3ce6bb6d" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" },
"telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" }, "telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" },
"tokyonight.nvim": { "branch": "main", "commit": "633039585dff7fd2b9b62fb190bf768702609d95" }, "todo-comments.nvim": { "branch": "main", "commit": "833d8dd8b07eeda37a09e99460f72a02616935cb" },
"tokyonight.nvim": { "branch": "main", "commit": "67c6050e1ca41260c919236a098ba278472c7520" },
"trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" }, "trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" },
"twilight.nvim": { "branch": "main", "commit": "8b7b50c0cb2dc781b2f4262a5ddd57571556d1e4" }, "twilight.nvim": { "branch": "main", "commit": "8b7b50c0cb2dc781b2f4262a5ddd57571556d1e4" },
"vim-illuminate": { "branch": "master", "commit": "3bd2ab64b5d63b29e05691e624927e5ebbf0fb86" }, "vim-illuminate": { "branch": "master", "commit": "305bf07b919ac526deb5193280379e2f8b599926" },
"which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" }, "which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" },
"zen-mode.nvim": { "branch": "main", "commit": "50e2e2a36cc97847d9ab3b1a3555ba2ef6839b50" } "zen-mode.nvim": { "branch": "main", "commit": "78557d972b4bfbb7488e17b5703d25164ae64e6a" }
} }

View file

@ -1,38 +1,43 @@
-- Adds git related signs to the gutter, as well as utilities for managing changes -- Adds git related signs to the gutter, as well as utilities for managing changes
return { return {
'lewis6991/gitsigns.nvim', "lewis6991/gitsigns.nvim",
opts = { opts = {
-- See `:help gitsigns.txt` -- See `:help gitsigns.txt`
signs = { signs = {
add = { text = '+' }, add = { text = "+" },
change = { text = '~' }, change = { text = "~" },
delete = { text = '_' }, delete = { text = "_" },
topdelete = { text = '' }, topdelete = { text = "" },
changedelete = { text = '~' }, changedelete = { text = "~" },
}, },
on_attach = function(bufnr) on_attach = function(bufnr)
--vim.keymap.set('n', '<leader>hp', require('gitsigns').preview_hunk, { buffer = bufnr, desc = 'Preview git hunk' }) vim.keymap.set(
"n",
"<leader>ggh",
require("gitsigns").preview_hunk,
{ buffer = bufnr, desc = "Preview git hunk" }
)
-- don't override the built-in and fugitive keymaps -- don't override the built-in and fugitive keymaps
local gs = package.loaded.gitsigns local gs = package.loaded.gitsigns
vim.keymap.set({ 'n', 'v' }, ']c', function() vim.keymap.set({ "n", "v" }, "]c", function()
if vim.wo.diff then if vim.wo.diff then
return ']c' return "]c"
end end
vim.schedule(function() vim.schedule(function()
gs.next_hunk() gs.next_hunk()
end) end)
return '<Ignore>' return "<Ignore>"
end, { expr = true, buffer = bufnr, desc = 'Jump to next hunk' }) end, { expr = true, buffer = bufnr, desc = "Jump to next hunk" })
vim.keymap.set({ 'n', 'v' }, '[c', function() vim.keymap.set({ "n", "v" }, "[c", function()
if vim.wo.diff then if vim.wo.diff then
return '[c' return "[c"
end end
vim.schedule(function() vim.schedule(function()
gs.prev_hunk() gs.prev_hunk()
end) end)
return '<Ignore>' return "<Ignore>"
end, { expr = true, buffer = bufnr, desc = 'Jump to previous hunk' }) end, { expr = true, buffer = bufnr, desc = "Jump to previous hunk" })
end, end,
}, },
} }

View file

@ -1,29 +0,0 @@
-- Git UI
-- https://github.com/kdheepak/lazygit.nvim
return {
"kdheepak/lazygit.nvim",
lazy = true,
event = "VeryLazy",
dependencies = {
"nvim-lua/plenary.nvim",
},
--config = function()
-- local oil = require("oil")
-- oil.setup({
-- default_file_explorer = true,
-- columns = {
-- --"size",
-- "icon",
-- },
-- view_options = {
-- show_hidden = true,
-- },
-- keymaps = {
-- -- This should be matched to the open action in remap.lua
-- ["<leader>e"] = "actions.close",
-- ["<C-v>"] = "actions.select_vsplit",
-- ["<C-x>"] = "actions.select_split",
-- },
-- })
--end,
}

View file

@ -20,8 +20,8 @@ return {
layout_config = { layout_config = {
horizontal = { horizontal = {
prompt_position = "top", prompt_position = "top",
preview_width = 0.4, preview_width = 0.45,
width = 0.75, width = 0.90,
height = 0.75, height = 0.75,
preview_cutoff = 90, preview_cutoff = 90,
}, },

View file

@ -41,6 +41,9 @@ return {
"python", "python",
"regex", "regex",
"json", "json",
"go",
"gomod",
"gosum",
}, },
incremental_selection = { incremental_selection = {
enable = true, enable = true,

View file

@ -6,23 +6,4 @@ return {
dependencies = { dependencies = {
"nvim-tree/nvim-web-devicons", "nvim-tree/nvim-web-devicons",
}, },
--config = function()
-- local oil = require("oil")
-- oil.setup({
-- default_file_explorer = true,
-- columns = {
-- --"size",
-- "icon",
-- },
-- view_options = {
-- show_hidden = true,
-- },
-- keymaps = {
-- -- This should be matched to the open action in remap.lua
-- ["<leader>e"] = "actions.close",
-- ["<C-v>"] = "actions.select_vsplit",
-- ["<C-x>"] = "actions.select_split",
-- },
-- })
--end,
} }