feat(python): add key binding for organize imports (#1670)

This commit is contained in:
MoetaYuko 2023-10-14 23:49:23 +08:00 committed by GitHub
parent b3d46bc014
commit 8f42733ce5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,7 +12,23 @@ return {
opts = {
servers = {
pyright = {},
ruff_lsp = {},
ruff_lsp = {
keys = {
{
"<leader>co",
function()
vim.lsp.buf.code_action({
apply = true,
context = {
only = { "source.organizeImports" },
diagnostics = {},
},
})
end,
desc = "Organize Imports",
},
},
},
},
setup = {
ruff_lsp = function()