dev: enable fortls navigation in VS Code#1676
Merged
sbryngelson merged 1 commit intoJul 25, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the repository’s VS Code workspace configuration to re-enable and correctly configure fortls (via the Modern Fortran extension) so Fortran editor navigation features (definition/reference/hover/symbols/autocomplete) work again for MFC’s Fypp-based source tree.
Changes:
- Replaces legacy/disablement Modern Fortran settings with the current
fortlsprovider settings in.vscode/settings.json, and disables compiler-based linting via"Disabled". - Updates
.vscode/extensions.jsonto recommend the Modern Fortran extension instead of marking it unwanted. - Simplifies
.fortlsrcindexing and fixespp_defstyping by passing preprocessor definitions as strings.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| .vscode/settings.json | Enables fortls providers for navigation/completions and disables compiler linting using the supported "Disabled" value. |
| .vscode/extensions.json | Switches Modern Fortran to a recommended extension for the workspace. |
| .fortlsrc | Removes redundant src/ indexing and converts pp_defs values to strings for fortls compatibility. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Enable the Modern Fortran language server in the VS Code workspace so editor navigation features such as Go to Definition, references, hover information, workspace symbols, and completion are available.
This change:
fortlsprovider settingsDisabledvalue.fortlsrcfortlsThe previous workspace configuration explicitly disabled
fortlsand ignored extension recommendations. Its empty linter compiler setting also caused Modern Fortran activation errors, while numeric preprocessor definitions caused parser failures infortls3.2.2.MFC contains some intentionally repeated module names across
pre_process,simulation, andpost_process. Definitions for those duplicate names can remain target-ambiguous; this change restores language-server operation but does not alter that source organization.Type of change
Testing
fortls3.2.2 using the updated.fortlsrcwithout parser tracebacks.src/pre_process/p_main.f90to its startup implementation.m_derived_typestosrc/common/m_derived_types.fpp.git diff --check.Checklist
Check these like this
[x]to indicate which of the below applies.See the developer guide for full coding standards.
GPU changes (expand if you modified
src/simulation/)AI code reviews
Reviews are not retriggered automatically. To request a review, comment on the PR:
@claude full review— Claude full review (also triggers on PR open/reopen/ready)claude-full-review— Claude full review via label