-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Help with using fortls (in vscode) #173
Comments
Hey, Can you give a minimal example? |
@JHenneberg Well, if I clone one of the projects I work on:
and then open that folder in Code and then open, say,
|
for now I can confirm I am getting the same error so it is not your specific machine. I would guess it is a problem with the precompiler includes which are causing a circular structure. Edit: When you add a {
"source_dirs": ["base", "include", "tests", "shared"],
"pp_suffixes": [".H", ".h"],
"debug_log": false
} |
Hi @mathomp4, thanks for the report. I have been able to track down the issue, which appears to be related to handling the macros in
we can expand it on multiple lines as if( A/=0) then
if(present(rc)) rc=A; PRINT *, Iam, __LINE__; return
endif and that middle inline if statement is tripping things up since currently the parser crudely treats semi-colons by inserting line breaks. I will try work on better handling of semi-colons, which should fix this. If you want a quick fix in the meantime you can replace these macros with all "then" and "endif" closed if statements. For example the
Obviously, the solution to "change your code" isn't great when it is working fine but figured I'd let you know as a quick workaround. You can also exclude the file |
All,
I decided to try out VSCode with fortls today and when I tried it on my code, I got this from the VSCode...uh...bottom terminal/problems/debug thing? Not sure what it's called, but this was in the Output tab:
I did see #100 which seems to be like what this is, but #100 is closed so I'm not sure. Any ideas on what I might be doing wrong? I'm new to even VSCode so any help is nice (perhaps this is in the wrong repo?).
The text was updated successfully, but these errors were encountered: