summaryrefslogtreecommitdiff
path: root/cli/lsp/config.rs
diff options
context:
space:
mode:
authorNayeem Rahman <nayeemrmn99@gmail.com>2023-12-08 17:04:56 +0000
committerGitHub <noreply@github.com>2023-12-08 17:04:56 +0000
commit123d9ea047a2e10803e260ebf00f31fcc98463ee (patch)
tree9b816532e907c7ae6490a77fedb1cc5872c3e8a5 /cli/lsp/config.rs
parentddfbe71cedbfe2ac31dbc7dbcf25761e5a7a1dce (diff)
feat(lsp): debug log file (#21500)
Diffstat (limited to 'cli/lsp/config.rs')
-rw-r--r--cli/lsp/config.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/cli/lsp/config.rs b/cli/lsp/config.rs
index 36d4c95c6..42478b593 100644
--- a/cli/lsp/config.rs
+++ b/cli/lsp/config.rs
@@ -454,6 +454,10 @@ pub struct WorkspaceSettings {
#[serde(default)]
pub internal_debug: bool,
+ /// Write logs to a file in a project-local directory.
+ #[serde(default)]
+ pub log_file: bool,
+
/// A flag that indicates if linting is enabled for the workspace.
#[serde(default = "default_to_true")]
pub lint: bool,
@@ -502,6 +506,7 @@ impl Default for WorkspaceSettings {
import_map: None,
code_lens: Default::default(),
internal_debug: false,
+ log_file: false,
lint: true,
document_preload_limit: default_document_preload_limit(),
suggest: Default::default(),
@@ -1071,6 +1076,10 @@ impl Config {
paths
}
+ pub fn log_file(&self) -> bool {
+ self.settings.unscoped.log_file
+ }
+
pub fn update_capabilities(
&mut self,
capabilities: &lsp::ClientCapabilities,
@@ -1321,6 +1330,7 @@ mod tests {
test: true,
},
internal_debug: false,
+ log_file: false,
lint: true,
document_preload_limit: 1_000,
suggest: DenoCompletionSettings {