From 0528620263987001e262152cf705b4faa6028bbb 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..1f95a9fe 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 argument in self.arguments_list: + if argument.startswith("debug_") and argument != "debug_log": + continue + final_options[argument] = getattr(self, argument) + log.debug("Final options: %s", final_options) + return {"capabilities": server_capabilities} def serve_workspace_symbol(self, request):