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

This commit is contained in:
MoetaYuko authored and GitHub committed 2023-10-14 17:49:23 +02:00
1 parent b3d46bc014
commit 8f42733ce5
1 file changed
+17 -1
+17 -1
View File
@@ -12,7 +12,23 @@ return {
opts = { opts = {
servers = { servers = {
pyright = {}, 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 = { setup = {
ruff_lsp = function() ruff_lsp = function()