I have Modern Fortran and Fortran Intellisense installed and also Fortran language server installed, but when I open the .f90 file I get an error about Fortran Intellisense
Error launching fortls: Please check that all selected options are supported by your language server version.
I’ve never encountered anything like this before, but it came up a few days ago, and what I did was uninstall python2.7 and install anaconda3.
Can someone help me? Thank you so much
I am a student, and I have been learning fortran through vscode. Recently, this problem suddenly occurred, and when the statement is wrong, the error underline will not be displayed, and the error will only appear in the run. I checked that it was the problem of Modern Fortran, but I could not find the problem
It sounds like your fortls installation is somehow not valid. This can be a for any number of reasons:
- Missing fortls
- Very outdated version of fortls
- Using an unsupported Python version (needs Python 3.7+)
- Not having the root path where fortls is installed being part of your PYTHONPATH (can happen when you use a local virtual environment and don’t include the base dir e.g.
$PWD/venv to your
PYTHONPATH and hence fortls is not able to load it’s modules. FYI Any other Python package installed in that venv would fail similarly, not just fortls)
These are the instructions for installing fortls
and this is one of the main options for pointing to
fortls if vscode has trouble finding it
If you are still having trouble getting
fortls to work please post additional info to help us narrow down the problem:
- fortls version
- Modern Fortran version
- Python version
- VS Code version
- VS Code settings
- VS Code Log Channel output from Modern Fortran
Thank you very much
I have read the reasons you have given.I have fortls, here are a few command lines from my terminal
VS Code version:v1.72
Modern Fortran version:v3.2.0
“workbench.colorTheme”: “Atom One Dark”,
“C_Cpp.default.compilerPath”: “D:\vs code\complier\mingw64\bin\g++.exe”,
“python.pythonPath”: “D:\vs code\Python”,
I don’t know what the problem is.
The problem is Fortran Intellisense. It’s not compatible with Modern Fortran (it’s a dead extension). You should uninstall it from your system. Same as with fprettify. I am surprised you are not getting pop up errors asking you to uninstall.
You only need Modern Fortran. If you want to try the latest features I would install the prerelease
I have unloaded fortran Intellisense and fprettify.
I installed fprettify because modern fortran can’t format code for me and it can’t report an error problem, it only reports an error at compile time.
Now my fortran extensions are only fortran and Modern Fortran.What do I need to do?
You shouldn’t need to do anything. Modem Fortran does support a Language server, substantially more functional than Fortran Intellisense and formatters, hence why there is no need for the deprecated extensions.
You shouldn’t have fortran either, just Modern Fortran. These extensions were meant to do the same thing but fortan stopped receiving updates back in 2017, while we kept up to date.
Modern fortran is great, but it hasn’t been helping me with errors and auto-formatting code since a few days ago.
When I Alt+Shift+F,It comes:
There is no formatter for ‘fortran-modern’ files installed
I installed modern Fortran, but it didn’t do all the work
- GoTo/Peek implementation and Find/Peek references
- Project-wide and Document symbol detection and Renaming
What is the problem?
I suggest you have a read at the Documentation for the extension. Settings do not come under the “modern-fortran” tag.
As I mentioned above, the functionality is there, it is tested and does work. I should know given I wrote all of these programs, so please read the docs and adjust your setup accordingly.
Modern Fortran WILL NOT WORK with any of the other 3 extensions you had installed alongside and it will fail quite visibly throwing pop up errors asking you to disable/uninstall the other extensions. I think that is a pretty clear indicator as to why it hasn’t been working.