fix(neovim): Rust test-coverage plugin & coding qol improvements

- Rust: `nvim-coverage` for generating code-coverage report
- Rust: Keymaps & nvim-job for test-coverage report display
- Coding-QOL: Remove distracting & noisy diagnostic virtual-line
- Coding-QOL: Keymaps to disable diagnostic virtual text
- Coding-QOL: Disable diagnostic underlines
- Fix: Disable telescope `hightlight` to fix frequent crash
- Coding-QOL: Telescope Keymaps to move between loops
- Coding-QOL: Disable auto fn doc hover through `blink`; `LSPSaga` does
  it better
- Coding-QOL: Adding back `quick-scope` with proper config
- Keymap: Use `ctrl-p` to search files; same as vscode
This commit is contained in:
Pratik Tripathy
2025-08-11 12:39:22 +05:30
parent 67fb24d532
commit c572ed6a46
6 changed files with 80 additions and 37 deletions

View File

@@ -241,31 +241,7 @@ return {
require("lazy.core.loader").add_to_rtp(plugin)
require("nvim-treesitter.query_predicates")
end,
dependencies = {
"nvim-treesitter/nvim-treesitter-textobjects",
config = function()
-- When in diff mode, we want to use the default
-- vim text objects c & C instead of the treesitter ones.
local move = require("nvim-treesitter.textobjects.move") ---@type table<string,fun(...)>
local configs = require("nvim-treesitter.configs")
for name, fn in pairs(move) do
if name:find("goto") == 1 then
move[name] = function(q, ...)
if vim.wo.diff then
local config = configs.get_module("textobjects.move")[name] ---@type table<string,string>
for key, query in pairs(config or {}) do
if q == query and key:find("[%]%[][cC]") then
vim.cmd("normal! " .. key)
return
end
end
end
return fn(q, ...)
end
end
end
end,
},
dependencies = { "nvim-treesitter/nvim-treesitter-textobjects" },
config = function()
-- See `:help nvim-treesitter`
@@ -301,7 +277,7 @@ return {
},
auto_install = true,
highlight = { enable = true },
-- highlight = { enable = true },
indent = { enable = true },
incremental_selection = {
@@ -339,18 +315,22 @@ return {
goto_next_start = {
["]f"] = { query = "@function.outer", desc = "Goto next inner function start" },
["]c"] = { query = "@class.outer", desc = "Goto next inner class start" },
["]o"] = { query = "@loop.*", desc = "Goto next loop start" },
},
goto_next_end = {
["]F"] = { query = "@function.outer", desc = "Goto next outer function end" },
["]C"] = { query = "@class.outer", desc = "Goto next outer class end" },
["]O"] = { query = "@loop.*", desc = "Goto next loop end" },
},
goto_previous_start = {
["[f"] = { query = "@function.outer", desc = "Goto goto previous inner function start" },
["[c"] = { query = "@class.outer", desc = "Previous inner class start" },
["[o"] = { query = "@loop.*", desc = "Goto previous loop start" },
},
goto_previous_end = {
["[F"] = { query = "@function.outer", desc = "Goto goto previous outer function start" },
["[C"] = { query = "@class.outer", desc = "Goto previous outer class start" },
["[O"] = { query = "@loop.*", desc = "Goto previous loop start" },
},
},