mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-07-04 06:24:39 +02:00
feat(python): add key binding for organize imports (#1670)
This commit is contained in:
parent
b3d46bc014
commit
8f42733ce5
1 changed files with 17 additions and 1 deletions
|
@ -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()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue