Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

Commit

Permalink
fix(rome_lsp): remove code assists from code actions (#4411)
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico authored Apr 26, 2023
1 parent fc1fc10 commit be3c71c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ when there are breaking changes.

### Configuration
### Editors
- Fixed an issue where the VSCode extension duplicates text when using VSCode git utilities [#4338]

- Fix an issue where the VSCode extension duplicates text when using VSCode git utilities [#4338]
- Remove code assists from being added to the code actions when apply fixes;
-
### Formatter

- Fix an issue where formatting of JSX string literals property values were using incorrect quotes [#4054](https://github.com/rome/tools/issues/4054)
Expand Down
4 changes: 2 additions & 2 deletions crates/rome_lsp/tests/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -928,7 +928,7 @@ async fn pull_refactors() -> Result<()> {
],
);

let expected_action = lsp::CodeActionOrCommand::CodeAction(lsp::CodeAction {
let _expected_action = lsp::CodeActionOrCommand::CodeAction(lsp::CodeAction {
title: String::from("Inline variable"),
kind: Some(lsp::CodeActionKind::new(
"refactor.inline.rome.correctness.inlineVariable",
Expand All @@ -945,7 +945,7 @@ async fn pull_refactors() -> Result<()> {
data: None,
});

assert_eq!(res, vec![expected_action]);
assert_eq!(res, vec![]);

server.close_document().await?;

Expand Down
2 changes: 1 addition & 1 deletion crates/rome_service/src/file_handlers/javascript.rs
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ fn code_actions(
_ => AnalysisFilter::default(),
};

filter.categories = RuleCategories::default();
filter.categories = RuleCategories::SYNTAX | RuleCategories::LINT;
filter.range = Some(range);

let analyzer_options = compute_analyzer_options(&settings, PathBuf::from(path.as_path()));
Expand Down

0 comments on commit be3c71c

Please sign in to comment.