From dcb6f9e1b419b60264953678156a3c32238c6096 Mon Sep 17 00:00:00 2001 From: Azzam Husain <63924876+azzamh15@users.noreply.github.com> Date: Sat, 13 Apr 2024 01:18:29 +0530 Subject: [PATCH] Display final options --- fortls/langserver.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/fortls/langserver.py b/fortls/langserver.py index 422061d9..c22a0439 100644 --- a/fortls/langserver.py +++ b/fortls/langserver.py @@ -86,7 +86,7 @@ def __init__(self, conn, settings: dict): if k.startswith("debug_") and k != "debug_log": continue setattr(self, k, v) - + self.arguments_list = list(settings.keys()) self.sync_type: int = 2 if self.incremental_sync else 1 self.post_messages = [] self.FORTRAN_SRC_EXT_REGEX: Pattern[str] = create_src_file_exts_str( @@ -234,6 +234,15 @@ def serve_initialize(self, request: dict): server_capabilities["codeActionProvider"] = True if self.notify_init: self.post_message("fortls initialization complete", Severity.info) + + # Log final options + final_options = {} + for param in self.arguments_list: + if param.startswith("debug_") and param != "debug_log": + continue + final_options[param] = getattr(self, param) + log.debug("Final options: %s", final_options) + return {"capabilities": server_capabilities} def serve_workspace_symbol(self, request):