diff options
Diffstat (limited to 'cli/lsp/config.rs')
-rw-r--r-- | cli/lsp/config.rs | 10 |
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 { |