feat(python): add key binding for organize imports (#1670)
This commit is contained in:
1 parent
b3d46bc014
commit
8f42733ce5
1 file changed
+17
-1
@@ -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()
|
||||||
|
|||||||
Reference in new issue
Block a user