VS Code MODFLOW 6 Syntax
January 18, 2026 ยท View on GitHub
![]()
Note
This project is currently in beta. Features and functionality may change, and there may be bugs. Feedback and contributions to help improve the project are welcome.
This VS Code extension provides rich language features for MODFLOW 6. It aims to enhance the user experience when working with MF6 input and output text files by leveraging specifications directly from MF6 DFN files.
Features
Note: data files used below are from the FloPy GitHub repository
Syntax highlighting
- MF6 input files and output list files

Hover
- for block structure, keyword description and recarray items

Go-to-definition
- via
Ctrl + clickorGo To Definitionkeybinding (default:F12)

Document symbols
- for integration with VS Code features such as go-to-symbol, outline view, breadcrumbs, sticky scroll, minimap, etc.

Others:
- Block folding
- Snippet (MF6 block)
- Comment-toggling
- Auto-closing quotes
- Surrounding quotes
Commands
MF6 Syntax: Go to parent file- opens the parent file of the current MF6 file, if it exists
- for example:
- if
freyberg.disfile is active, it opensfreyberg.nam - if
freyberg.namfile is active, it opensmfsim.nam - if
mfsim.namfile is active, no-op since it is the top-level file
- if
MF6 Syntax: Set language to MF6- useful if extension is not activated automatically (based on file extension)
Settings
-
mf6Syntax.maxFileSizeMB: Maximum file size (in MB) that can be opened through the go-to-definition feature or go-to-parent command (default:50MB). -
mf6Syntax.mf6Version: Specifies the MF6 version used for programmatic language features such as hover and symbol definitions.