configurating pyrefly 2
This commit is contained in:
@@ -43,23 +43,43 @@ vim.api.nvim_create_autocmd("FileType", {
|
||||
vim.lsp.enable "pyrefly"
|
||||
vim.lsp.config("pyrefly", {
|
||||
-- example of how to run `uv` installed Pyrefly without adding to your path
|
||||
cmd = { "uvx", "pyrefly", "lsp" },
|
||||
filetypes = { 'python' },
|
||||
cmd = { "pyrefly", "lsp" },
|
||||
filetypes = { "python" },
|
||||
root_markers = {
|
||||
'pyrefly.toml',
|
||||
'pyproject.toml',
|
||||
'setup.py',
|
||||
'setup.cfg',
|
||||
'requirements.txt',
|
||||
'Pipfile',
|
||||
'.git',
|
||||
'.venv',
|
||||
'.env',
|
||||
"pyrefly.toml",
|
||||
"pyproject.toml",
|
||||
"setup.py",
|
||||
"setup.cfg",
|
||||
"requirements.txt",
|
||||
"Pipfile",
|
||||
".git",
|
||||
".venv",
|
||||
".env",
|
||||
},
|
||||
settings = {
|
||||
python = {
|
||||
pyrefly = {
|
||||
-- reportMissingTypeStubs = false,
|
||||
-- reportUnusedImport = false,
|
||||
-- reportUnusedVariable = false,
|
||||
-- strict = false,
|
||||
-- displayTypeErrors = false,
|
||||
-- analyzeUnannotatedFunctions = false,
|
||||
displayTypeErrors = "error-missing-imports",
|
||||
analysis = {
|
||||
diagnosticMode = "off",
|
||||
showHoverGoToLinks = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
handlers = {
|
||||
["textDocument/publishDiagnostics"] = function() end,
|
||||
},
|
||||
on_init = function(client)
|
||||
client.server_capabilities.definitionProvider = false
|
||||
client.server_capabilities.renameProvider = false
|
||||
client.server_capabilities.diagnosticProvider = false
|
||||
-- client.server_capabilities.inlayHintProvider = false
|
||||
client.server_capabilities.diagnosticProvider = nil
|
||||
-- client.server_capabilities.inlayHintProvider = nil
|
||||
end,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user