I’m running QTCreator 17.0.0 under MSYS2, trying to get the FortLS (fortran language server) running as a custom language server – to help with working on some Fortran 90 source code.
I installed FortLS via pip, and it is version 3.2.2.
I have attempted to configure QTCreator to use FortLS via the following:
As you can see, I’ve passed the --config option to point it to a specific .fortlsrc file with its JSON-formatted configuration settings.
That configuration is just all the default values, with the exception of the source_dirs part:
{
"nthreads": 4,
"notify_init": false,
"incremental_sync": false,
"recursion_limit": 1000,
"sort_keywords": false,
"disable_autoupdate": false,
"debug_log": false,
"source_dirs": ["/c/source/myproject/module_a", "/c/source/myproject/module_b"],
"incl_suffixes": [],
"excl_suffixes": [],
"excl_paths": [],
"autocomplete_no_prefix": false,
"autocomplete_no_snippets": false,
"autocomplete_name_only": false,
"lowercase_intrinsics": false,
"use_signature_help": false,
"hover_signature": false,
"hover_language": "fortran90",
"max_line_length": -1,
"max_comment_line_length": -1,
"disable_diagnostics": false,
"pp_suffixes": [],
"include_dirs": [],
"pp_defs": {},
"symbol_skip_mem": false,
"enable_code_actions": false
}
I know that source_dirs isn’t recursive, which is fine. Both of those source directories are flat.
This all works, but the results are lackluster. All I get when looking at my Fortran source files is a big pile of Module "name" not found in project. I am not certain why. It should be able to find them given I pointed to all the source directories with source_dirs, so why can’t it find them?
No other features of FortLS seem to be working. No highlighting, no auto-completion, nada. I’d assume this is because it’s hung up on the modules – but I’m not sure. Maybe QTCreator’s generic language server support just isn’t rich enough to support FortLS?
I did attempt enabling the debug_log, but the output doesn’t seem to tell me much. It acts as if it’s running normally and only noticed the missing modules.
