dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

commit ff3b9e1a3c717954a66313076314f243a0c4cc37
parent 76e455d582cd5f12f26cabb4e33f7361f0150b2a
Author: Alex Balgavy <alexander.balgavy@spaceapplications.com>
Date:   Fri, 27 Mar 2026 18:52:33 +0100

nvim: config update

Diffstat:
Mnvim/lua/plugins/gitsigns.lua | 1+
Mnvim/lua/plugins/lsp.lua | 79+++++++++++++++++++++++++++++++++++++++++++------------------------------------
Mnvim/lua/plugins/snacks.lua | 4+++-
Mvim/vimrc | 1+
4 files changed, 48 insertions(+), 37 deletions(-)

diff --git a/nvim/lua/plugins/gitsigns.lua b/nvim/lua/plugins/gitsigns.lua @@ -16,6 +16,7 @@ return vim.keymap.set('n', ']~', function() require('gitsigns').diffthis() end, { buffer = true }) vim.keymap.set('n', ']-', function() require('gitsigns').preview_hunk() end, { buffer = true }) vim.keymap.set('n', ']+', function() require('gitsigns').select_hunk() end, { buffer = true }) + vim.keymap.set({ 'o', 'x' }, 'i+', '<Cmd>Gitsigns select_hunk<CR>') end, }, } diff --git a/nvim/lua/plugins/lsp.lua b/nvim/lua/plugins/lsp.lua @@ -95,6 +95,48 @@ local on_attach = function(_, bufnr) end, { desc = "Inspect LSP config" }) end + +local check_command_clippy = { + command = "clippy", + features = "all", + extraArgs = { + "--no-deps", + "--", + "-D", "clippy::pedantic", + "-D", "clippy::nursery", + "-D", "clippy::restriction", + "-A", "clippy::blanket_clippy_restriction_lints", + "-A", "clippy::missing_docs_in_private_items", + "-A", "clippy::implicit_return", + "-A", "clippy::question_mark_used", + "-A", "clippy::min_ident_chars", + "-A", "clippy::pattern_type_mismatch", + "-A", "clippy::single_call_fn", + "-A", "clippy::as_conversions", + "-A", "clippy::pub_with_shorthand", + "-A", "clippy::shadow_reuse", + "-A", "clippy::separated_literal_suffix", + "-A", "clippy::float_arithmetic", + "-A", "clippy::pub_use", + "-A", "clippy::single_char_lifetime_names", + "-A", "clippy::missing_trait_methods", + "-A", "clippy::mod_module_files", + "-A", "clippy::std_instead_of_alloc", + "-A", "clippy::integer_division_remainder_used", + "-D", "rust_2018_idioms", + "-D", "missing_docs", + "-D", "warnings", + "-A", "clippy::too_many_lines", + "-A", "clippy::arbitrary_source_item_ordering", + "-A", "clippy::redundant_test_prefix", + "-A", "clippy::cognitive_complexity", + }, + +} +local check_command = { + command = "check", + features = "all", +} -- :h lspconfig-all local config = function() vim.lsp.config("rust_analyzer", { @@ -108,42 +150,7 @@ local config = function() }, }, }, - check = { - command = "clippy", - features = "all", - extraArgs = { - "--", - "--no-deps", - "-D", "clippy::pedantic", - "-D", "clippy::nursery", - "-D", "clippy::restriction", - "-A", "clippy::blanket_clippy_restriction_lints", - "-A", "clippy::missing_docs_in_private_items", - "-A", "clippy::implicit_return", - "-A", "clippy::question_mark_used", - "-A", "clippy::min_ident_chars", - "-A", "clippy::pattern_type_mismatch", - "-A", "clippy::single_call_fn", - "-A", "clippy::as_conversions", - "-A", "clippy::pub_with_shorthand", - "-A", "clippy::shadow_reuse", - "-A", "clippy::separated_literal_suffix", - "-A", "clippy::float_arithmetic", - "-A", "clippy::pub_use", - "-A", "clippy::single_char_lifetime_names", - "-A", "clippy::missing_trait_methods", - "-A", "clippy::mod_module_files", - "-A", "clippy::std_instead_of_alloc", - "-A", "clippy::integer_division_remainder_used", - "-D", "rust_2018_idioms", - "-D", "missing_docs", - "-D", "warnings", - "-A", "clippy::too_many_lines", - "-A", "clippy::arbitrary_source_item_ordering", - "-A", "clippy::redundant_test_prefix", - "-A", "clippy::cognitive_complexity", - }, - }, + check = check_command_clippy, }, }, }) diff --git a/nvim/lua/plugins/snacks.lua b/nvim/lua/plugins/snacks.lua @@ -26,7 +26,7 @@ local keys = { end end if #explorer_pickers == 0 then - Snacks.picker.explorer() + Snacks.explorer.reveal() end end, @@ -75,6 +75,8 @@ local keys = { { "gd", function() Snacks.picker.lsp_definitions() end, desc = "Goto Definition" }, { "gD", function() Snacks.picker.lsp_declarations() end, desc = "Goto Declaration" }, { "<leader>sr", function() Snacks.picker.lsp_references() end, nowait = true, desc = "References" }, + { "<leader>s<", function() Snacks.picker.lsp_incoming_calls() end, nowait = true, desc = "Go to call sites" }, + { "<leader>s>", function() Snacks.picker.lsp_outgoing_calls() end, nowait = true, desc = "Go to called functions" }, { "gI", function() Snacks.picker.lsp_implementations() end, desc = "Goto Implementation" }, { "gy", function() Snacks.picker.lsp_type_definitions() end, desc = "Goto T[y]pe Definition" }, { "<leader>ss", symbols, desc = "LSP Symbols" }, diff --git a/vim/vimrc b/vim/vimrc @@ -862,6 +862,7 @@ if has('terminal') tnoremap <C-w>; <C-w>: endif +nnoremap <C-w>[ <C-w>v<C-]> " To keep the old functionality of ; nnoremap : ; vnoremap : ;