nvim pyright root_dir

This commit is contained in:
Henrik Bakken
2025-09-10 21:57:37 +02:00
parent 517d0111aa
commit f9a270ac3e
+12
View File
@@ -442,6 +442,18 @@ local function makespec_lspconfig()
lspconfig.pyright.setup({
cmd = { "pyright-langserver", "--stdio", "--threads", "20" },
filetypes = { "python" },
root_dir = function(fname)
local root_files = {
".git",
"pyproject.toml",
"setup.py",
"setup.cfg",
"requirements.txt",
"Pipfile",
"pyrightconfig.json",
}
return lspconfig.util.root_pattern(unpack(root_files))(fname)
end,
settings = {
python = {
analysis = {