VSCode support for working on Galacticus.
- Embedded syntax highlighting inside
.F90source files:- XML directive blocks —
!![ ... !!] - reStructuredText docstrings —
!!{RST ... !!}
- XML directive blocks —
- Open Documentation for functionClass — a command (also on the editor
right-click menu for
.F90files) that deep-links to the online documentation for the class defined in the current file. It works both on afunctionClassbase class (_class.F90) and on a concrete implementation, opening the family page at the correctphysics-<name>anchor. Run it from the Command Palette (Galacticus: Open Documentation for functionClass), the context menu, or the keybindingCtrl+K Ctrl+G(Cmd+K Cmd+Gon macOS) while a.F90file is focused. If a file defines more than one class, you are prompted to choose.
Install it from the Marketplace in VSCode.
Depends on:
- Modern Fortran — provides the Fortran grammar the highlighting injects into.
- reStructuredText Syntax highlighting — provides the RST grammar used for docstring blocks.
Both are installed automatically as dependencies.
galacticus.docsBaseUrl(defaulthttps://galacticus.readthedocs.io/en/latest/) — base URL used by the documentation command. Point it at a different build (e.g. a local or versioned docs build) if needed. The command constructs<base>/physics/<family>.html#physics-<name>.
Enjoy!