show pyright errors

This commit is contained in:
Ray Elliott 2025-12-07 23:53:32 +00:00
commit a57f72f7c7
5 changed files with 28 additions and 42 deletions

View file

@ -7,16 +7,6 @@ return {
config = function()
local capabilities = require("cmp_nvim_lsp").default_capabilities()
-- Disable ruff LSP entirely (we use ruff via nvim-lint + none-ls instead)
vim.api.nvim_create_autocmd("LspAttach", {
callback = function(args)
local client = vim.lsp.get_client_by_id(args.data.client_id)
if client and client.name == "ruff" then
vim.lsp.stop_client(client.id)
end
end,
})
-- Load project-local LSP settings from .nvim.lua
local function load_project_lsp_settings(server_name, root_dir)
if not root_dir then
@ -105,9 +95,30 @@ return {
configure("intelephense", {
single_file_support = false,
})
configure("pyright") -- Python LSP
-- Python: pyright for type checking, ruff for linting/formatting
configure("pyright", {
settings = {
pyright = {
-- Only use pyright for type checking
disableOrganizeImports = true, -- Let ruff handle imports
},
python = {
analysis = {
typeCheckingMode = "basic", -- Type checking only
-- Let ruff handle style/formatting diagnostics
diagnosticSeverityOverrides = {
-- Keep type/syntax errors, warnings
-- Disable style-related diagnostics (ruff handles these)
},
},
},
},
})
configure("ruff") -- Ruff LSP for formatting + linting
-- Enable all configured servers
vim.lsp.enable({ "lua_ls", "ts_ls", "html", "cssls", "jsonls", "bashls", "marksman", "intelephense", "pyright" })
vim.lsp.enable({ "lua_ls", "ts_ls", "html", "cssls", "jsonls", "bashls", "marksman", "intelephense", "pyright", "ruff" })
end,
}