Skip to content

dev: enable fortls navigation in VS Code#1676

Merged
sbryngelson merged 1 commit into
MFlowCode:masterfrom
sbryngelson:agent/enable-fortls-navigation
Jul 25, 2026
Merged

dev: enable fortls navigation in VS Code#1676
sbryngelson merged 1 commit into
MFlowCode:masterfrom
sbryngelson:agent/enable-fortls-navigation

Conversation

@sbryngelson

@sbryngelson sbryngelson commented Jul 25, 2026

Copy link
Copy Markdown
Member

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:

  • recommends the Modern Fortran extension instead of marking it unwanted
  • replaces obsolete or disabling extension settings with the current fortls provider settings
  • disables compiler-based linting through its supported Disabled value
  • removes duplicate source-tree indexing from .fortlsrc
  • passes preprocessor definitions as strings, as required by current fortls

The previous workspace configuration explicitly disabled fortls and ignored extension recommendations. Its empty linter compiler setting also caused Modern Fortran activation errors, while numeric preprocessor definitions caused parser failures in fortls 3.2.2.

MFC contains some intentionally repeated module names across pre_process, simulation, and post_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

  • Bug fix

Testing

  • Ran the complete MFC precheck suite; all seven checks passed.
  • Initialized fortls 3.2.2 using the updated .fortlsrc without parser tracebacks.
  • Verified definition resolution from src/pre_process/p_main.f90 to its startup implementation.
  • Verified definition resolution of m_derived_types to src/common/m_derived_types.fpp.
  • Ran git diff --check.

Checklist

Check these like this [x] to indicate which of the below applies.

  • I added or updated tests for new behavior
  • I updated documentation if user-facing behavior changed

See the developer guide for full coding standards.

GPU changes (expand if you modified src/simulation/)
  • GPU results match CPU results
  • Tested on NVIDIA GPU or AMD GPU

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)
  • Or add label claude-full-review — Claude full review via label

@sbryngelson
sbryngelson marked this pull request as ready for review July 25, 2026 22:54
Copilot AI review requested due to automatic review settings July 25, 2026 22:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 fortls provider settings in .vscode/settings.json, and disables compiler-based linting via "Disabled".
  • Updates .vscode/extensions.json to recommend the Modern Fortran extension instead of marking it unwanted.
  • Simplifies .fortlsrc indexing and fixes pp_defs typing 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.

@sbryngelson
sbryngelson merged commit 72c042a into MFlowCode:master Jul 25, 2026
42 of 48 checks passed
@sbryngelson
sbryngelson deleted the agent/enable-fortls-navigation branch July 25, 2026 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants