Title: Quick fixes and autoformat do not work from emacs · Issue #110 · python-lsp/python-lsp-ruff · GitHub
Open Graph Title: Quick fixes and autoformat do not work from emacs · Issue #110 · python-lsp/python-lsp-ruff
X Title: Quick fixes and autoformat do not work from emacs · Issue #110 · python-lsp/python-lsp-ruff
Description: When using python-lsp-ruff from emacs with eglot, most things work fine, including autocomplete, linting, jump to definition. Two things do not work at all, though: auto-formatting and quick fixes. Those do work when I use the ruff serve...
Open Graph Description: When using python-lsp-ruff from emacs with eglot, most things work fine, including autocomplete, linting, jump to definition. Two things do not work at all, though: auto-formatting and quick fixes....
X Description: When using python-lsp-ruff from emacs with eglot, most things work fine, including autocomplete, linting, jump to definition. Two things do not work at all, though: auto-formatting and quick fixes....
Opengraph URL: https://github.com/python-lsp/python-lsp-ruff/issues/110
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Quick fixes and autoformat do not work from emacs","articleBody":"When using python-lsp-ruff from emacs with eglot, most things work fine, including autocomplete, linting, jump to definition. Two things do not work at all, though: auto-formatting and quick fixes. Those do work when I use the ruff server, so they are supported by eglot/emacs.\n\nI use the following config in emacs:\n\n```\n (with-eval-after-load 'eglot\n (add-to-list 'eglot-server-programs\n '(python-base-mode . (\"pylsp\" :initializationOptions\n (:pylsp (:plugins (:ruff\n (:enabled t\n :formatEnabled t))))))))\n```\n\n\nBelow is a log of a short session where I try to format and ask for fixes.\n\n----- Start log ----\n[jsonrpc] D[00:18:10.925] Running language server: pylsp\n[jsonrpc] e[00:18:10.925] --\u003e initialize[1] {\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"initialize\",\"params\":{\"processId\":83283,\"clientInfo\":{\"name\":\"Eglot\",\"version\":\"1.17.30\"},\"rootPath\":\"/tmp/test/\",\"rootUri\":\"file:///private/tmp/test\",\"initializationOptions\":{\"pylsp\":{\"plugins\":{\"ruff\":{\"enabled\":true,\"formatEnabled\":true}}}},\"capabilities\":{\"workspace\":{\"applyEdit\":true,\"executeCommand\":{\"dynamicRegistration\":false},\"workspaceEdit\":{\"documentChanges\":true},\"didChangeWatchedFiles\":{\"dynamicRegistration\":true},\"symbol\":{\"dynamicRegistration\":false},\"configuration\":true,\"workspaceFolders\":true},\"textDocument\":{\"synchronization\":{\"dynamicRegistration\":false,\"willSave\":true,\"willSaveWaitUntil\":true,\"didSave\":true},\"completion\":{\"dynamicRegistration\":false,\"completionItem\":{\"snippetSupport\":true,\"deprecatedSupport\":true,\"resolveSupport\":{\"properties\":[\"documentation\",\"details\",\"additionalTextEdits\"]},\"tagSupport\":{\"valueSet\":[1]}},\"contextSupport\":true},\"hover\":{\"dynamicRegistration\":false,\"contentFormat\":[\"markdown\",\"plaintext\"]},\"signatureHelp\":{\"dynamicRegistration\":false,\"signatureInformation\":{\"parameterInformation\":{\"labelOffsetSupport\":true},\"documentationFormat\":[\"markdown\",\"plaintext\"],\"activeParameterSupport\":true}},\"references\":{\"dynamicRegistration\":false},\"definition\":{\"dynamicRegistration\":false,\"linkSupport\":true},\"declaration\":{\"dynamicRegistration\":false,\"linkSupport\":true},\"implementation\":{\"dynamicRegistration\":false,\"linkSupport\":true},\"typeDefinition\":{\"dynamicRegistration\":false,\"linkSupport\":true},\"documentSymbol\":{\"dynamicRegistration\":false,\"hierarchicalDocumentSymbolSupport\":true,\"symbolKind\":{\"valueSet\":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}},\"documentHighlight\":{\"dynamicRegistration\":false},\"codeAction\":{\"dynamicRegistration\":false,\"resolveSupport\":{\"properties\":[\"edit\",\"command\"]},\"dataSupport\":true,\"codeActionLiteralSupport\":{\"codeActionKind\":{\"valueSet\":[\"quickfix\",\"refactor\",\"refactor.extract\",\"refactor.inline\",\"refactor.rewrite\",\"source\",\"source.organizeImports\"]}},\"isPreferredSupport\":true},\"formatting\":{\"dynamicRegistration\":false},\"rangeFormatting\":{\"dynamicRegistration\":false},\"rename\":{\"dynamicRegistration\":false},\"inlayHint\":{\"dynamicRegistration\":false},\"publishDiagnostics\":{\"relatedInformation\":false,\"codeDescriptionSupport\":false,\"tagSupport\":{\"valueSet\":[1,2]}}},\"window\":{\"showDocument\":{\"support\":true},\"workDoneProgress\":true},\"general\":{\"positionEncodings\":[\"utf-32\",\"utf-8\",\"utf-16\"]},\"experimental\":{}},\"workspaceFolders\":[{\"uri\":\"file:///private/tmp/test\",\"name\":\"/tmp/test/\"}]}}\n[jsonrpc] e[00:18:11.430] \u003c-- initialize[1] {\"jsonrpc\":\"2.0\",\"id\":1,\"result\":{\"capabilities\":{\"codeActionProvider\":true,\"codeLensProvider\":{\"resolveProvider\":false},\"completionProvider\":{\"resolveProvider\":true,\"triggerCharacters\":[\".\"]},\"documentFormattingProvider\":true,\"documentHighlightProvider\":true,\"documentRangeFormattingProvider\":true,\"documentSymbolProvider\":true,\"definitionProvider\":true,\"typeDefinitionProvider\":true,\"executeCommandProvider\":{\"commands\":[]},\"hoverProvider\":true,\"referencesProvider\":true,\"renameProvider\":true,\"foldingRangeProvider\":true,\"signatureHelpProvider\":{\"triggerCharacters\":[\"(\",\",\",\"=\"]},\"textDocumentSync\":{\"change\":2,\"save\":{\"includeText\":true},\"openClose\":true},\"notebookDocumentSync\":{\"notebookSelector\":[{\"cells\":[{\"language\":\"python\"}]}]},\"workspace\":{\"workspaceFolders\":{\"supported\":true,\"changeNotifications\":true}},\"experimental\":{}},\"serverInfo\":{\"name\":\"pylsp\",\"version\":\"1.14.0\"}}}\n[jsonrpc] e[00:18:11.430] --\u003e initialized {\"jsonrpc\":\"2.0\",\"method\":\"initialized\",\"params\":{}}\n[jsonrpc] e[00:18:11.431] --\u003e textDocument/didOpen {\"jsonrpc\":\"2.0\",\"method\":\"textDocument/didOpen\",\"params\":{\"textDocument\":{\"uri\":\"file:///private/tmp/test/test.py\",\"version\":0,\"languageId\":\"python-base\",\"text\":\"import sys\\n\\nprint(sys.argv )\\n\"}}}\n[jsonrpc] e[00:18:11.431] --\u003e workspace/didChangeConfiguration {\"jsonrpc\":\"2.0\",\"method\":\"workspace/didChangeConfiguration\",\"params\":{\"settings\":{}}}\n[jsonrpc] e[00:18:11.943] \u003c-- textDocument/publishDiagnostics {\"jsonrpc\":\"2.0\",\"method\":\"textDocument\\/publishDiagnostics\",\"params\":{\"uri\":\"file:\\/\\/\\/private\\/tmp\\/test\\/test.py\",\"diagnostics\":[]}}\n[jsonrpc] e[00:18:16.700] --\u003e textDocument/hover[2] {\"jsonrpc\":\"2.0\",\"id\":2,\"method\":\"textDocument/hover\",\"params\":{\"textDocument\":{\"uri\":\"file:///private/tmp/test/test.py\"},\"position\":{\"line\":1,\"character\":0}}}\n[jsonrpc] e[00:18:16.700] --\u003e textDocument/documentHighlight[3] {\"jsonrpc\":\"2.0\",\"id\":3,\"method\":\"textDocument/documentHighlight\",\"params\":{\"textDocument\":{\"uri\":\"file:///private/tmp/test/test.py\"},\"position\":{\"line\":1,\"character\":0}}}\n[jsonrpc] e[00:18:16.700] --\u003e textDocument/signatureHelp[4] {\"jsonrpc\":\"2.0\",\"id\":4,\"method\":\"textDocument/signatureHelp\",\"params\":{\"textDocument\":{\"uri\":\"file:///private/tmp/test/test.py\"},\"position\":{\"line\":1,\"character\":0}}}\n[jsonrpc] e[00:18:16.795] \u003c-- textDocument/hover[2] {\"jsonrpc\":\"2.0\",\"id\":2,\"result\":{\"contents\":\"\"}}\n[jsonrpc] e[00:18:16.820] \u003c-- textDocument/documentHighlight[3] {\"jsonrpc\":\"2.0\",\"id\":3,\"result\":null}\n[jsonrpc] e[00:18:16.820] \u003c-- textDocument/signatureHelp[4] {\"jsonrpc\":\"2.0\",\"id\":4,\"result\":{\"signatures\":[]}}\n[jsonrpc] e[00:18:19.194] --\u003e textDocument/formatting[5] {\"jsonrpc\":\"2.0\",\"id\":5,\"method\":\"textDocument/formatting\",\"params\":{\"textDocument\":{\"uri\":\"file:///private/tmp/test/test.py\"},\"options\":{\"tabSize\":8,\"insertSpaces\":true,\"insertFinalNewline\":true,\"trimFinalNewlines\":true}}}\n[jsonrpc] e[00:18:19.195] \u003c-- textDocument/formatting[5] {\"jsonrpc\":\"2.0\",\"id\":5,\"result\":null}\n[jsonrpc] e[00:18:44.840] --\u003e textDocument/codeAction[6] {\"jsonrpc\":\"2.0\",\"id\":6,\"method\":\"textDocument/codeAction\",\"params\":{\"textDocument\":{\"uri\":\"file:///private/tmp/test/test.py\"},\"range\":{\"start\":{\"line\":1,\"character\":0},\"end\":{\"line\":1,\"character\":0}},\"context\":{\"diagnostics\":[]}}}\n[jsonrpc] e[00:18:44.841] \u003c-- textDocument/codeAction[6] {\"jsonrpc\":\"2.0\",\"id\":6,\"result\":[]}\n\n\n","author":{"url":"https://github.com/rjekker","@type":"Person","name":"rjekker"},"datePublished":"2025-12-11T23:23:16.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/110/python-lsp-ruff/issues/110"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d5d3caaa-06fa-c0c2-1cba-69076ce4d1a9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8B98:26FE0E:337AABE:342BD60:697035EB |
| html-safe-nonce | 285f4f712c24d18ead3d44fb511439ac8e900e87ac6a3411c5c60627c2dceba9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4Qjk4OjI2RkUwRTozMzdBQUJFOjM0MkJENjA6Njk3MDM1RUIiLCJ2aXNpdG9yX2lkIjoiMTQ2MjIyMzI4ODQzNDQzOTY1OSIsInJlZ2lvbl9lZGdlIjoic2VhIiwicmVnaW9uX3JlbmRlciI6InNlYSJ9 |
| visitor-hmac | 0814e4e9f7f003b04897adb43e97bddf6c9c5cdbfbc0d92e964fb042ee83d6fa |
| hovercard-subject-tag | issue:3721300638 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-lsp/python-lsp-ruff/110/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4ad48d0c3d7a995e37a48639f226a5bd08b9a00579db0a52064419e9ec5647a8/python-lsp/python-lsp-ruff/issues/110 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4ad48d0c3d7a995e37a48639f226a5bd08b9a00579db0a52064419e9ec5647a8/python-lsp/python-lsp-ruff/issues/110 |
| og:image:alt | When using python-lsp-ruff from emacs with eglot, most things work fine, including autocomplete, linting, jump to definition. Two things do not work at all, though: auto-formatting and quick fixes.... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | rjekker |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9920a62ba22d06470388e2904804fb7e5ec51c9e35f81784e9191394c74b2bd2 |
| turbo-cache-control | no-preview |
| go-import | github.com/python-lsp/python-lsp-ruff git https://github.com/python-lsp/python-lsp-ruff.git |
| octolytics-dimension-user_id | 51609341 |
| octolytics-dimension-user_login | python-lsp |
| octolytics-dimension-repository_id | 574578348 |
| octolytics-dimension-repository_nwo | python-lsp/python-lsp-ruff |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 574578348 |
| octolytics-dimension-repository_network_root_nwo | python-lsp/python-lsp-ruff |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f643964067a552f02067066d6a910b2f90a5721f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width