LSP-pyright icon indicating copy to clipboard operation
LSP-pyright copied to clipboard

Expose "Organize Imports" as a server command in the command palette

Open rwols opened this issue 4 years ago • 2 comments

I would like to be able to run "LSP-pyright: Organize Imports" from the command palette.

rwols avatar Jul 31 '20 08:07 rwols

This issue should probably be in the LSP repo. It should be possible to provide that generally for all servers that support the generic source.organizeImports code action.

https://github.com/sublimelsp/LSP/blob/64002d3a263943ba394a9a61830eab6147b3e820/plugin/core/sessions.py#L702-L704

rchl avatar Jul 31 '20 08:07 rchl

And I guess it would make sense to have it together with other actions, in the context menu. That would be consistent.

rchl avatar Jul 31 '20 08:07 rchl