Add boilerplate keyword completion and diagnostic quick fixes - #50
Merged
magnesj merged 1 commit intoJun 29, 2026
Merged
Conversation
* Add boilerplate keyword completion and diagnostic quick fixes Completing a keyword now inserts a sample data record as a tab-navigable snippet (typed placeholders or manual defaults, terminated to match the keyword's size_kind) instead of just the bare name. A new opm-flow.completion.keywordInsert setting selects template or name-only. Diagnostics with an unambiguous correction now carry a stable code, and a CodeActionProvider offers one-click fixes: uppercase a lowercase keyword, move a keyword to column 1, add a missing record / list / array terminator, and replace an unknown keyword with its nearest known match. * Document boilerplate completion and quick fixes Add README feature sections for template keyword completion and diagnostic quick fixes, the opm-flow.completion.keywordInsert setting, and an Unreleased release-notes entry.
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.
Summary
Two related editor features for OPM Flow decks:
Boilerplate keyword completion — accepting a keyword completion now inserts a sample data record as a tab-navigable snippet (typed placeholders or manual defaults, terminated to match the keyword's
size_kind) instead of just the bare keyword name. A newopm-flow.completion.keywordInsertsetting selectstemplate(default) orname-onlyinsertion.Diagnostic quick fixes — diagnostics with an unambiguous correction now carry a stable
code, and aCodeActionProvideroffers one-click fixes:Documentation (README feature sections, the new setting, and a release-notes entry) is included.
Notes
This ports the work from magnesj
#20onto current upstreammain. The diagnosticcode/suggestionadditions attach to the existing diagnostic emission sites already present upstream.Verification
npm run compile— cleannpm test— 235 passed, 6 suites