fortran-lang / vscode-fortran-support Goto Github PK
View Code? Open in Web Editor NEWFortran language support for Visual Studio Code
Home Page: https://marketplace.visualstudio.com/items?itemName=fortran-lang.linter-gfortran
License: MIT License
Fortran language support for Visual Studio Code
Home Page: https://marketplace.visualstudio.com/items?itemName=fortran-lang.linter-gfortran
License: MIT License
Something wrong with the syntax highlight:
the angweight(ith, iphi) messed the syntax highlighting for the rest of the codes. If I delete the spaces on both sides of the "*" before the angweight(ith, iphi), then it works just fine (or adding a parentheses to wrap up the angweight also fix the problem)
Add .FOR to "extensions" to "fortran_fixed-form" in package.json
I have installed MinGW-w64 and set a path to environment variable.
But when I open a '.f90' file I cannot find a available environment to debug or run it.
Could you tell me the solution to me?
Thank you
When auto-completing functions, such as dot_product or matmul, it makes them all-caps (i.e. DOT_PRODUCT, MATMUL). To me this seems to be a poor default, as the all-caps style of Fortran is from FORTRAN77.
I am using Intel Fortran compiler because of error messages coming from the extension I would like to disable linter. Could you please to help with required settings?
Last commit (#66) made all user variables on file to be highlighted. In fact every thing you type is now highlighted some how. Don't know if this was the intention... or is a collateral effect from openmp directives.
Please complete the Fortran Symbols outlining!
There are open code in the net can be useful for this regards like Code::Blocks.
can I use ifort as the compiler?
thanks.
I really really want to have the ability to navigate to the declaration of a function by Cmd+Click in any statement including that function call. Wanna anyone to work on that?
Hey, you guys do awesome work. like seriously being able to code fortran in VSC is amazing. I just have one suggestion. When implementing !$ it comes out as a comment, anyways to change this so that is shows the module being called?
for example:
I am calling the omp_lib module, but it shows up as a comment
Same fix applied in PR #72 for subroutine
need to be done in function
regex ...
Forgot that ... 👎
In certain cases, some are shown below in the MWE, the syntax highlighting marks the 73rd character as a comment.
Make the number of characters in a line that are coloured as input (and not comments) a user input variable.
C F77 MWE syntax highlighting breaking at line
PROGRAM TEST
integer :: i = 10
! Character 73 begins here -------------------------------------->
print*, i, i, i, i, i, i, i, i, i, i, i, i, i, i, i, i, i, i, i, i, i, i,
print*, i, i, i, i, i, i, i, i, i, i, i, i, i, i, i, i, i, i, i, i,i, i,
print*, i, i, i, i, i, i, i, i, i, i, i, i, i, i, i, i, i, i, i,i,i, i
print*, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19
print*, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,18, 19
print*, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, (1), 18, 19
print*, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 1, 18, 19
END PROGRAM TEST
Hi,
I use fixed-form Fortran with 132 columns. Visual Studio already has a setting for increasing the line width, but none of the VScode Fortran extensions have it. Is it possible to add the line width as a variable that can be changed in the settings? Thanks!
Hi, thanks for your modern fortran extension. Do you have any advice on how to get PGI fortran working with your addin and vscode? Also, have you experienced any diffulculties with linking programs in the light of rowhammer, and what companies such as apple are doing to aslr and kaslr? Cheers!
Thanks for this incredibly helpful extension!
I have some issue when hovering over a variable. For folders with many files, instead of showing the documentation, the little pop up message just says "Loading..." and Code Helper uses 100% of my CPU.
This continues after closing Visual Studio Code and I have to force quit Code Helper to go back to normal CPU usage.
The only way to avoid this issue is to disable the extension. I would be happy if there's a fix for it, though. Maybe some setting that I am not aware of?
Visual Studio Code for Mac 1.19.1 with Modern Fortran 0.6.2 extension.
a snippet for if-else blocks would be nice.
maybe even another one for the one-line version?
UPDATE
why not add alot more snippets? i found snippets in the atom/fortran package:
https://github.com/dparkins/language-fortran/blob/master/snippets/language-fortran.cson
The subroutine and function dummy-arguments are not highlighted if inserted the like break symbol &
.
A code like this:
subroutine something_large(igxw,igyw,igzw,nxw,nyw,nzw,&
igxaux,igyaux,igzaux,nxaux,&
nyaux,nzaux,sx,sy,sz,layers,a,b,ngc_aux)
implicit none
end subroutine something_large
The highlight fix needs to be done for functions as well.
First of all, thank you for creating and maintaining this extension.
I have to explicitly include directories with my mod files in settings.json, in my case like this:
"fortran.includePaths": [
"/home/certik/repos/hfsolver/src",
],
But my project has many subdirectories etc. I use cmake to manage it. Is there some better way to specify the paths for the linter? If not, is the intended usage that I will simply list all directories where one can find the .mod files my project specific settings for vscode?
Also, my project can be build both in tree and out of tree using cmake. In the out of tree build, the mod files will be at different location. Is there a solution to that?
Thanks for any tips.
I noticed that the declaration: double precision function test(a,b)
doesn't highlight correctly but is recognized as a symbol.
The code below freezes the extension when the Symbol List (Ctrl+Shift+O) command is used. The extension keeps running in the background with 100% CPU even after VScode is closed.
module symbol_test
implicit none
contains
subroutine Much_dummy_arguments(headlev, rhs, rho, rhof, mu, u, u1, v, v1, w, w1, sx, sy, sz, &
kindv, crlx, rlx_down, rlx_up, shift, t, dt, alfa, theta, tol_vel, ap_simple)
implicit none
end subroutine Much_dummy_arguments
end module symbol_test
The screenshot below illustrates what is happening:
After pressing Ctrl+Shift+O it is not possible to type anything, the editor freezes.
If you kill the code process that is using 100% CPU it is possible to type in editor once again, but the symbol list shows No symbol information for the file
and the following window pops up:
HI,thanks a lot for you working of this extend,may you consider add some fortran format,
I feel so tired to press Tab to make a space
for example:if(a>b) then
return 1
end if
there are some auto-space,I will be happy
I've been using the extension for a while and for some reason the linting stopped working.
The syntax highlight is working perfectly fine for me it's just that the errors are no longer underlined.
The option to change the autocompletion to lowercase doesnt affect the autocompletion. It still only suggests uppercase intrinsic functions.
What do i have to type in the user setting in order to being able to compile my code? I have typed in {"fortran.gfortranExecutable": "gfortran"} but it doesn't work, it says in the terminal it is an unknown command.
With the default command "toggle line comment", I can not toggle line comments for fixed format fortran files.
This is due to the "configuration" is missing for language id "fortran_fixed-form" in the "package.json".
If you add line
"configuration": "./language-configuration.json"
after line 55 of file package.json, this problem will be resolved.
I am sorry that I am not familiar with github so that I can not prepare a pull request.
At last, thank you very much for your marvelous works on this extension!
Some tests needs to be added to cover all the code and increase code coverage up to 80%
The documentation says that include paths can be controlled with the fortran.includePaths setting. But the example that is shown has the variable fortran.includePath (no final "s").
Even in the most basic file the symbol list feature (Ctrl+O) is not working anymore.
An amazing implementation of FORTRAN editing.
A FORTRAN formatter would be very helpful enhancement (at least for the free format FORTRAN code file structure, FORTRAN 90 and up) .
Format document and format selected like in the c/c++ extension.
After PR #56 the command npm run lint
exits with error.
npm ERR! Linux 4.4.76-1-default
npm ERR! argv "/usr/bin/node6" "/usr/bin/npm-default" "run" "lint"
npm ERR! node v6.12.2
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] lint: `node ./node_modules/tslint/bin/tslint ./src/**/*.ts `
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] lint script 'node ./node_modules/tslint/bin/tslint ./src/**/*.ts '.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the linter-gfortran package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./node_modules/tslint/bin/tslint ./src/**/*.ts
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs linter-gfortran
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls linter-gfortran
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/pedro/Softwares/fortran-vscode/npm-debug.log
In past master commit d0f2b04ce
everything works fine.
Syntax highlighting is incomplete. E.g. call is not highlighted. Neither is program. This would be very useful to add.
In large files the Symbol List (Ctrl-Shift-O) fails too, CPU goes to 100%, and VS-conde needs to be killed manually.
In this case i think it is because the extension mark as a symbol all declared variables and functions on the file, instead of only the keywords function, subroutine, program and module.
In my opinion, to take all variables as symbols isn't correct, but let's discuss this ...
The allocatable
declaration statement isn't highlighted, as well as some Intrinsic functions like dsqrt
and move_alloc
. Logical statements like .and.
, .or.
, >=
and ==
are missing too. More examples in the figure below:
If adding this keywords is as simple as adding names to a file, tell me the file i have to look at and i can do it if you want.
Do you intend to implement "Go to Definition" feature? How do you deal with code navigation today?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.