mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-29 05:15:12 +00:00
ruff server
now supports source.fixAll
source action (#10597)
## Summary
`ruff server` now has source action `source.fixAll` as an available code
action.
This also fixes https://github.com/astral-sh/ruff/issues/10593 in the
process of revising the code for quick fix code actions.
## Test Plan
f4c07425
-e68a-445f-a4ed-949c9197a6be
This commit is contained in:
parent
d467aa78c2
commit
257964a8bc
15 changed files with 564 additions and 191 deletions
|
@ -1,9 +1,11 @@
|
|||
//! ## The Ruff Language Server
|
||||
|
||||
pub use edit::{Document, PositionEncoding};
|
||||
use lsp_types::CodeActionKind;
|
||||
pub use server::Server;
|
||||
|
||||
mod edit;
|
||||
mod fix;
|
||||
mod format;
|
||||
mod lint;
|
||||
mod server;
|
||||
|
@ -12,6 +14,10 @@ mod session;
|
|||
pub(crate) const SERVER_NAME: &str = "ruff";
|
||||
pub(crate) const DIAGNOSTIC_NAME: &str = "Ruff";
|
||||
|
||||
pub(crate) const SOURCE_FIX_ALL_RUFF: CodeActionKind = CodeActionKind::new("source.fixAll.ruff");
|
||||
pub(crate) const SOURCE_ORGANIZE_IMPORTS_RUFF: CodeActionKind =
|
||||
CodeActionKind::new("source.organizeImports.ruff");
|
||||
|
||||
/// A common result type used in most cases where a
|
||||
/// result type is needed.
|
||||
pub(crate) type Result<T> = anyhow::Result<T>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue