Reputation: 2513
I currently work on a big Fortran project with emacs, but I have the feeling that my current setup is inadequate to the task.
I use f90-mode with auto-complete (without fortran-specific setup, so I only have completion for opened files), and I really miss function header information on hover (as in elisp code), code-folding, lists of subroutines in the current buffer, lists of included files, info on the origin of subroutines and used variables (C-xC-f to open the source file?), …
How can I best add modern supporting functionality for fortran in my emacs?
Mostly I need tools which help me understanding the projects code.
The project uses its own build tool and copies files from different directories into a build directory before building, actually overwriting some files with different versions of the code, so I need a quite flexible tool which can cope with that.
Upvotes: 10
Views: 5937
Reputation: 912
Using fortran-language-server (after installation simply start fortls
in the terminal) and lsp-mode in emacs works perfectly.
Upvotes: 3
Reputation: 1585
There's a small Emacs plugin called Fortran-tags. It can find the definition of any variable or procedure under the cursor, so it's similar to Ctags, except that it is able to correctly identify all local and global variables and has some additional features. Also, it is developed with the focus on modern Fortran.
Upvotes: 5
Reputation: 2513
I now found the f90-interface-browser in elpa.
If you use emacs 24 or later, you can just use
M-x package-list-packages
and then search for f90-interface-browser
.
You write (or work on) large, modern fortran code bases. These make heavy use of function overloading and generic interfaces. Your brain is too small to remember what all the specialisers are called. Therefore, your editor should help you.
Upvotes: 2