summaryrefslogtreecommitdiff
path: root/cli/lsp/language_server.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/lsp/language_server.rs')
-rw-r--r--cli/lsp/language_server.rs16
1 files changed, 14 insertions, 2 deletions
diff --git a/cli/lsp/language_server.rs b/cli/lsp/language_server.rs
index f0da80bab..f532430c8 100644
--- a/cli/lsp/language_server.rs
+++ b/cli/lsp/language_server.rs
@@ -69,6 +69,7 @@ use super::text;
use super::tsc;
use super::tsc::Assets;
use super::tsc::AssetsSnapshot;
+use super::tsc::GetCompletionDetailsArgs;
use super::tsc::TsServer;
use super::urls;
use super::urls::LspClientUrl;
@@ -1899,6 +1900,7 @@ impl Inner {
line_index.offset_tsc(diagnostic.range.start)?
..line_index.offset_tsc(diagnostic.range.end)?,
codes,
+ (&self.fmt_options.options).into(),
)
.await;
for action in actions {
@@ -2007,7 +2009,11 @@ impl Inner {
})?;
let combined_code_actions = self
.ts_server
- .get_combined_code_fix(self.snapshot(), &code_action_data)
+ .get_combined_code_fix(
+ self.snapshot(),
+ &code_action_data,
+ (&self.fmt_options.options).into(),
+ )
.await?;
if combined_code_actions.commands.is_some() {
error!("Deno does not support code actions with commands.");
@@ -2047,6 +2053,7 @@ impl Inner {
.get_edits_for_refactor(
self.snapshot(),
action_data.specifier,
+ (&self.fmt_options.options).into(),
line_index.offset_tsc(action_data.range.start)?
..line_index.offset_tsc(action_data.range.end)?,
action_data.refactor_name,
@@ -2402,6 +2409,7 @@ impl Inner {
trigger_character,
trigger_kind,
},
+ (&self.fmt_options.options).into(),
)
.await;
@@ -2436,9 +2444,13 @@ impl Inner {
})?;
if let Some(data) = &data.tsc {
let specifier = &data.specifier;
+ let args = GetCompletionDetailsArgs {
+ format_code_settings: Some((&self.fmt_options.options).into()),
+ ..data.into()
+ };
let result = self
.ts_server
- .get_completion_details(self.snapshot(), data.into())
+ .get_completion_details(self.snapshot(), args)
.await;
match result {
Ok(maybe_completion_info) => {