update nvim config

This commit is contained in:
2025-08-22 01:37:01 -07:00
parent ab82ecb001
commit 6317be3b2b
4 changed files with 23 additions and 2 deletions

View File

@@ -158,7 +158,8 @@ local lsp_mappings = {
{ mode = "n", key = "gDf", cmd = ":Telescope lsp_definitions<CR>", group = "LSP Definitions" },
{ mode = "n", key = "gF", cmd = ":edit <cfile><CR>", group = "Edit File" },
{ mode = "n", key = "gT", cmd = ":Telescope lsp_type_definitions<CR>", group = "LSP Type Definitions" },
{ mode = "n", key = "gb", cmd = ":Gitsigns blame_line<CR>", group = "Git Blame" },
{ mode = "n", key = "gb", cmd = ":Gitsigns blame_line<CR>", group = "Blame Line" },
{ mode = "n", key = "<leader>gb", cmd = ":Gitsigns blame<CR>", group = "Git Blame" },
{ mode = "n", key = "gi", cmd = ":Telescope lsp_implementations<CR>", group = "Telescope Implementations" },
{ mode = "n", key = "gj", cmd = ":Telescope jumplist<CR>", group = "Telescope Jumplist" },
{ mode = "n", key = "gr", cmd = ":Telescope lsp_references<CR>", goup = "LSP References" },

View File

@@ -29,7 +29,7 @@ return {
current_line_blame_opts = {
virt_text = true,
virt_text_pos = "eol", -- 'eol' | 'overlay' | 'right_align'
delay = 1000,
delay = 500,
ignore_whitespace = false,
virt_text_priority = 100,
},

View File

@@ -64,6 +64,7 @@ return {
-- Depending on the usage, you might want to add additional paths here.
-- "${3rd}/luv/library",
-- "${3rd}/busted/library",
"/usr/lib/lua-language-server/meta/3rd/busted/library",
},
-- or pull in all of 'runtimepath'. NOTE: this is a lot slower and will cause issues when working on your own configuration (see https://github.com/neovim/nvim-lspconfig/issues/3189)
-- library = vim.api.nvim_get_runtime_file("", true)
@@ -74,6 +75,11 @@ return {
Lua = {},
},
handlers = {},
root_dir = function(bufnr, on_dir)
if not vim.fn.bufname(bufnr):match("%.txt$") then
on_dir(vim.fn.getcwd())
end
end,
})
vim.lsp.enable(lsp)
elseif lsp == "basedpyright" then

View File

@@ -20,6 +20,20 @@ return {
"-e",
"2250",
}
-- Save original function
local orig_try_lint = lint.try_lint
lint.try_lint = function(...)
local bufnr = vim.api.nvim_get_current_buf()
local buftype = vim.api.nvim_get_option_value("buftype", { buf = bufnr })
-- Skip linting for non-file buffers (like hover docs)
if buftype ~= "" then
return
end
return orig_try_lint(...)
end
vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, {
callback = function()