Hi gnikit,
Your work is great, however I am having problem launching fortls with Modern Fortran extension in vscode.
The setup I used is:
- macOS
- Modern Fortran version v3.0.2022050508
- fortls version 2.7.0
And I am connecting to a remote server using ssh extension.
With this setup, when I tried open an f90 file to launch the fortls, the following error occurs:
[“INFO” - 8:34:37 PM] Fortran Language Server
[“INFO” - 8:34:38 PM] Initialising Language Server for file: /home/yz167/GLX15/code/RCM-E/rcm-e.f90
[Error - 8:34:38 PM] Server initialization failed.
Message: ‘list’ object is not callable
Code: -32603
[object Object]
[Error - 8:34:38 PM] Starting client failed
Message: ‘list’ object is not callable
Code: -32603
[object Object]
error handling request {‘jsonrpc’: ‘2.0’, ‘id’: 0, ‘method’: ‘initialize’, ‘params’: {‘processId’: 33435, ‘clientInfo’: {‘name’: ‘Visual Studio Code’, ‘version’: ‘1.67.2’}, ‘locale’: ‘en’, ‘rootPath’: None, ‘rootUri’: None, ‘capabilities’: {‘workspace’: {‘applyEdit’: True, ‘workspaceEdit’: {‘documentChanges’: True, ‘resourceOperations’: [‘create’, ‘rename’, ‘delete’], ‘failureHandling’: ‘textOnlyTransactional’, ‘normalizesLineEndings’: True, ‘changeAnnotationSupport’: {‘groupsOnLabel’: True}}, ‘didChangeConfiguration’: {‘dynamicRegistration’: True}, ‘didChangeWatchedFiles’: {‘dynamicRegistration’: True}, ‘symbol’: {‘dynamicRegistration’: True, ‘symbolKind’: {‘valueSet’: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]}, ‘tagSupport’: {‘valueSet’: [1]}}, ‘codeLens’: {‘refreshSupport’: True}, ‘executeCommand’: {‘dynamicRegistration’: True}, ‘configuration’: True, ‘workspaceFolders’: True, ‘semanticTokens’: {‘refreshSupport’: True}, ‘fileOperations’: {‘dynamicRegistration’: True, ‘didCreate’: True, ‘didRename’: True, ‘didDelete’: True, ‘willCreate’: True, ‘willRename’: True, ‘willDelete’: True}}, ‘textDocument’: {‘publishDiagnostics’: {‘relatedInformation’: True, ‘versionSupport’: False, ‘tagSupport’: {‘valueSet’: [1, 2]}, ‘codeDescriptionSupport’: True, ‘dataSupport’: True}, ‘synchronization’: {‘dynamicRegistration’: True, ‘willSave’: True, ‘willSaveWaitUntil’: True, ‘didSave’: True}, ‘completion’: {‘dynamicRegistration’: True, ‘contextSupport’: True, ‘completionItem’: {‘snippetSupport’: True, ‘commitCharactersSupport’: True, ‘documentationFormat’: [‘markdown’, ‘plaintext’], ‘deprecatedSupport’: True, ‘preselectSupport’: True, ‘tagSupport’: {‘valueSet’: [1]}, ‘insertReplaceSupport’: True, ‘resolveSupport’: {‘properties’: [‘documentation’, ‘detail’, ‘additionalTextEdits’]}, ‘insertTextModeSupport’: {‘valueSet’: [1, 2]}}, ‘completionItemKind’: {‘valueSet’: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]}}, ‘hover’: {‘dynamicRegistration’: True, ‘contentFormat’: [‘markdown’, ‘plaintext’]}, ‘signatureHelp’: {‘dynamicRegistration’: True, ‘signatureInformation’: {‘documentationFormat’: [‘markdown’, ‘plaintext’], ‘parameterInformation’: {‘labelOffsetSupport’: True}, ‘activeParameterSupport’: True}, ‘contextSupport’: True}, ‘definition’: {‘dynamicRegistration’: True, ‘linkSupport’: True}, ‘references’: {‘dynamicRegistration’: True}, ‘documentHighlight’: {‘dynamicRegistration’: True}, ‘documentSymbol’: {‘dynamicRegistration’: True, ‘symbolKind’: {‘valueSet’: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]}, ‘hierarchicalDocumentSymbolSupport’: True, ‘tagSupport’: {‘valueSet’: [1]}, ‘labelSupport’: True}, ‘codeAction’: {‘dynamicRegistration’: True, ‘isPreferredSupport’: True, ‘disabledSupport’: True, ‘dataSupport’: True, ‘resolveSupport’: {‘properties’: [‘edit’]}, ‘codeActionLiteralSupport’: {‘codeActionKind’: {‘valueSet’: [’’, ‘quickfix’, ‘refactor’, ‘refactor.extract’, ‘refactor.inline’, ‘refactor.rewrite’, ‘source’, ‘source.organizeImports’]}}, ‘honorsChangeAnnotations’: False}, ‘codeLens’: {‘dynamicRegistration’: True}, ‘formatting’: {‘dynamicRegistration’: True}, ‘rangeFormatting’: {‘dynamicRegistration’: True}, ‘onTypeFormatting’: {‘dynamicRegistration’: True}, ‘rename’: {‘dynamicRegistration’: True, ‘prepareSupport’: True, ‘prepareSupportDefaultBehavior’: 1, ‘honorsChangeAnnotations’: True}, ‘documentLink’: {‘dynamicRegistration’: True, ‘tooltipSupport’: True}, ‘typeDefinition’: {‘dynamicRegistration’: True, ‘linkSupport’: True}, ‘implementation’: {‘dynamicRegistration’: True, ‘linkSupport’: True}, ‘colorProvider’: {‘dynamicRegistration’: True}, ‘foldingRange’: {‘dynamicRegistration’: True, ‘rangeLimit’: 5000, ‘lineFoldingOnly’: True}, ‘declaration’: {‘dynamicRegistration’: True, ‘linkSupport’: True}, ‘selectionRange’: {‘dynamicRegistration’: True}, ‘callHierarchy’: {‘dynamicRegistration’: True}, ‘semanticTokens’: {‘dynamicRegistration’: True, ‘tokenTypes’: [‘namespace’, ‘type’, ‘class’, ‘enum’, ‘interface’, ‘struct’, ‘typeParameter’, ‘parameter’, ‘variable’, ‘property’, ‘enumMember’, ‘event’, ‘function’, ‘method’, ‘macro’, ‘keyword’, ‘modifier’, ‘comment’, ‘string’, ‘number’, ‘regexp’, ‘operator’], ‘tokenModifiers’: [‘declaration’, ‘definition’, ‘readonly’, ‘static’, ‘deprecated’, ‘abstract’, ‘async’, ‘modification’, ‘documentation’, ‘defaultLibrary’], ‘formats’: [‘relative’], ‘requests’: {‘range’: True, ‘full’: {‘delta’: True}}, ‘multilineTokenSupport’: False, ‘overlappingTokenSupport’: False}, ‘linkedEditingRange’: {‘dynamicRegistration’: True}}, ‘window’: {‘showMessage’: {‘messageActionItem’: {‘additionalPropertiesSupport’: True}}, ‘showDocument’: {‘support’: True}, ‘workDoneProgress’: True}, ‘general’: {‘regularExpressions’: {‘engine’: ‘ECMAScript’, ‘version’: ‘ES2020’}, ‘markdown’: {‘parser’: ‘marked’, ‘version’: ‘1.1.0’}}}, ‘trace’: ‘off’, ‘workspaceFolders’: None}}
Traceback (most recent call last):
File “/home/yz167/pkg/miniconda/lib/python3.9/site-packages/fortls/langserver.py”, line 1505, in _load_config_file
config_dict = json.load(jsonfile)
File “/home/yz167/pkg/miniconda/lib/python3.9/json/init.py”, line 293, in load
return loads(fp.read(),
File “/home/yz167/pkg/miniconda/lib/python3.9/json/init.py”, line 346, in loads
return _default_decoder.decode(s)
File “/home/yz167/pkg/miniconda/lib/python3.9/json/decoder.py”, line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/home/yz167/pkg/miniconda/lib/python3.9/json/decoder.py”, line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 2 column 1 (char 2)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/home/yz167/pkg/miniconda/lib/python3.9/site-packages/fortls/langserver.py”, line 166, in handle
resp = handler(request)
File “/home/yz167/pkg/miniconda/lib/python3.9/site-packages/fortls/langserver.py”, line 193, in serve_initialize
self._load_config_file()
File “/home/yz167/pkg/miniconda/lib/python3.9/site-packages/fortls/langserver.py”, line 1529, in _load_config_file
self.post_messages(
TypeError: ‘list’ object is not callable
Could you help me with this?
Many thanks.