configurating pyrefly
This commit is contained in:
@@ -35,36 +35,31 @@ vim.api.nvim_create_autocmd("BufWinEnter", {
|
||||
command = "let @/ = ''",
|
||||
})
|
||||
|
||||
-- vim.lsp.config("pyrefly", {
|
||||
-- -- example of how to run `uv` installed Pyrefly without adding to your path
|
||||
-- cmd = { "uvx", "pyrefly", "-c", "~/.config/nvim/pyrefly_config.yaml", "lsp" },
|
||||
-- capabilities = {
|
||||
-- textDocument = {
|
||||
-- completion = {
|
||||
-- completionItem = {
|
||||
-- snippetSupport = false,
|
||||
-- preselectSupport = false,
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- })
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = "markdown",
|
||||
callback = function() vim.opt_local.spell = false end,
|
||||
})
|
||||
|
||||
vim.lsp.enable "pyrefly"
|
||||
vim.lsp.config("pyrefly", {
|
||||
cmd = {
|
||||
"uvx",
|
||||
"pyrefly",
|
||||
"lsp",
|
||||
},
|
||||
capabilities = {
|
||||
textDocument = {
|
||||
completion = {
|
||||
completionItem = {
|
||||
snippetSupport = false,
|
||||
preselectSupport = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
-- example of how to run `uv` installed Pyrefly without adding to your path
|
||||
cmd = { "uvx", "pyrefly", "lsp" },
|
||||
filetypes = { 'python' },
|
||||
root_markers = {
|
||||
'pyrefly.toml',
|
||||
'pyproject.toml',
|
||||
'setup.py',
|
||||
'setup.cfg',
|
||||
'requirements.txt',
|
||||
'Pipfile',
|
||||
'.git',
|
||||
'.venv',
|
||||
'.env',
|
||||
},
|
||||
on_init = function(client)
|
||||
client.server_capabilities.definitionProvider = false
|
||||
client.server_capabilities.renameProvider = false
|
||||
client.server_capabilities.diagnosticProvider = false
|
||||
-- client.server_capabilities.inlayHintProvider = false
|
||||
end,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user