diff --git a/crates/biome_service/src/file_handlers/json.rs b/crates/biome_service/src/file_handlers/json.rs index 754c141e578d..7b9ede3fe31a 100644 --- a/crates/biome_service/src/file_handlers/json.rs +++ b/crates/biome_service/src/file_handlers/json.rs @@ -32,6 +32,7 @@ use biome_json_syntax::{JsonLanguage, JsonRoot, JsonSyntaxNode}; use biome_parser::AnyParse; use biome_rowan::{AstNode, NodeCache}; use biome_rowan::{TextRange, TextSize, TokenAtOffset}; +use tracing::{debug_span, trace_span}; #[derive(Debug, Clone, Default, serde::Serialize, serde::Deserialize)] #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] @@ -428,10 +429,24 @@ fn lint(params: LintParams) -> LintResults { }) } -fn code_actions(_: CodeActionsParams) -> PullActionsResult { - PullActionsResult { - actions: Vec::new(), - } +fn code_actions(params: CodeActionsParams) -> PullActionsResult { + let CodeActionsParams { + parse, + range, + workspace, + path, + manifest, + language, + } = params; + + debug_span!("Code actions JSON", range =? range, path =? path).in_scope(move || { + let tree = parse.tree(); + trace_span!("Parsed file", tree =? tree).in_scope(move || { + PullActionsResult { + actions: Vec::new(), + } + }) + }) } fn fix_all(params: FixAllParams) -> Result {