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

@@ -38,7 +38,7 @@ local to_installed = vim.tbl_keys({
-- Setup native diagnostic
vim.diagnostic.config({
underline = true,
underline = false,
update_in_insert = false,
severity_sort = true,
float = {
@@ -49,10 +49,10 @@ vim.diagnostic.config({
enabled = true,
severity = { min = vim.diagnostic.severity.ERROR },
},
virtual_lines = {
current_line = true,
severity = { min = vim.diagnostic.severity.INFO },
},
-- virtual_lines = {
-- current_line = true,
-- severity = { min = vim.diagnostic.severity.INFO },
-- },
})
-- Change diagnostic symbols in the sign column (gutter)
@@ -97,6 +97,16 @@ vim.api.nvim_create_autocmd("LspAttach", {
map("<leader>ct", require("telescope.builtin").lsp_type_definitions, "Goto Type Definition")
map("<leader>cd", require("telescope.builtin").diagnostics, "List Diagnostics")
Snacks.toggle({
name = "Diagnostics Virtual Text",
get = function()
return vim.diagnostic.config().virtual_text ~= false
end,
set = function(state)
vim.diagnostic.config({ virtual_text = state })
end,
}):map("<leader>dx")
-- Native lsp inline virtual text / inlay hints
if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint) then
vim.lsp.inlay_hint.enable(true)