You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lspconfig.ruff.setup({ -- use ruff as python linteron_attach=function (client, bufnr)
-- lsp use ruff to formatterclient.server_capabilities.documentFormattingProvider=false-- enable vim.lsp.buf.format()client.server_capabilities.documentRangeFormattingProvider=false-- formatting will be used by confirm.nvimclient.server_capabilities.hoverProvider=false-- use pylspend,
-- cmp_nvim_lsp default_configuration add completionProvider. ruff_lsp don't use completionfiletype= {'python'},
root_dir=function (fname)
returnlsp_util.root_pattern('.git')(fname) orvim.fn.getcwd()
end,
single_file_support=true,
init_options= {
settings= {
configuration=paths.lsp.ruff.config_path,
logFile=paths.lsp.ruff.log_path,
logLevel='warn',
organizeImports=true, -- use code action for organizeImportsshowSyntaxErrors=true, -- show syntax error diagnosticscodeAction= {
disableRuleComment= { enable=false }, -- show code action about rule disablingfixViolation= { enable=false }, -- show code action for autofix violation
},
format= { -- use conform.nvimpreview=false,
},
lint= { -- it links with ruff, but lint.args are different with ruff configurationenable=true,
},
}
},
handlers= {
['textDocument/publishDiagnostics'] =vim.lsp.with(
vim.lsp.diagnostic.on_publish_diagnostics, {
virtual_text=false,
}
)
}
})
ruff remains showing virtual text diagnostics event though I set the setting false
The text was updated successfully, but these errors were encountered:
Description
ruff remains showing virtual text diagnostics event though I set the setting false
The text was updated successfully, but these errors were encountered: