Replies: 5 comments
-
What you are requesting is already present in fortls but it is not exposed in vscode by design, since it makes code very verbose and generally I prefer relying on better variable names and smaller methods rather than very explicit argument parsing interfaces. To get it to work, you want to disable To do so, you will have to create a JSON configuration file. By default a file with the name {
"use_signature_help": false
} For more about fortls' file configuration, see the this docs section |
Beta Was this translation helpful? Give feedback.
-
Let me know if this works. |
Beta Was this translation helpful? Give feedback.
-
Unfortunately it did not work for me.
with
This only resulted in vscode spamming error messages every second upon initialization:
|
Beta Was this translation helpful? Give feedback.
-
Download the modern Fortran pre release and set the log level to debug.
Then in the output window (where the terminal area is) choose modern
Fortran from the top right dropout menu. There you will see all the stuff
that the extension does including fortls initialization and input arguments.
You might also want to download the dev version of fortls from git with
pip.
…On Thu, 12 Oct 2023, 07:56 alexksr, ***@***.***> wrote:
Unfortunately it did not work for me.
1. The local .fortls.json file had no effect even after multiple
editor reloads. IDK if this is due to not loading the config file or
another reason. How do I access the log data for fortls initialization?
2. I also tried a wrapper script to fortls which I referenced in
vscode:
#!/bin/bash
fortls --debug_log --config /home/.../bin/myfortls/.fortls.json
with
cat .fortls.json
{
"use_signature_help": false
}
This only resulted in vscode spamming error messages every second upon
initialization:
[ERROR - 08:51:19] [lsp.client] Unable to verify input arguments with LS:
—
Reply to this email directly, view it on GitHub
<#327 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD3FKZERZP74G4YRCGVQHWDX66ICVANCNFSM6AAAAAA53Q6KVY>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I already was on the pre-release branch of Modern Fortran. Here is my log:
There is no config file loaded. The passed arguments seem to be the default ones. Sorry for having to ask: Where can I get the dev version? |
Beta Was this translation helpful? Give feedback.
-
Is your feature request related to a problem? Please describe.
When calling a function or subroutine with a long list of arguments, there is no autocomplete support, meaning I have to typewrite the arguments names manually reading it from the hover information.
Describe the solution you'd like
Parse the list of arguments from the routines signature and autocomplete the dummy argument names.
Additional context
I'm using fortls via Modern-Fortran in VScode. I hope this is the right place to ask for help.
Could the auto-completion be improved to provide the routines full signature?
When hovering the function declaration shows up, so the information should be there already. Could the hover-info be parsed to extract the list arguments and auto-complete them?
For example if I have a routine like
I want the line "call io_sav" to be auto-completed to
(Optionally with the cursor set to the indicated position.)
Beta Was this translation helpful? Give feedback.
All reactions