namelist support: highlighting; folding; outline#1302
namelist support: highlighting; folding; outline#1302MuellerSeb wants to merge 1 commit intofortran-lang:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1302 +/- ##
=======================================
Coverage 81.65% 81.65%
=======================================
Files 13 13
Lines 2436 2436
Branches 203 203
=======================================
Hits 1989 1989
Misses 442 442
Partials 5 5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@gnikit ping. 🙃 |
gnikit
left a comment
There was a problem hiding this comment.
I don't think this should be its own language id, see my comment
There was a problem hiding this comment.
I'm not sure if namelist should be its own language id. From a language perspective it is a Fortran feature. For how this extension is wired it should be defined in FreeForm injected like the other scopes, and then inherited via FixedForm without any need to modify.
The fact that it has dedicated extensions make it a bit annoying, but the above approach is reasonable and would work. As a side note an LSP would not consider them different entities so symbols will be parsed as normal sources and symbols will be displayed respectively, hence no need for the explicit fallback.
Closes: #1296
This pull request adds comprehensive support for Fortran Namelist files (
.nml,.namelist) to the extension. It introduces syntax highlighting, folding, outline (symbol) support, and proper language registration for these files. The changes include a new language configuration, a TextMate grammar, symbol provider logic, and updates to the extension's activation and manifest files.Fortran Namelist Language Support
package.json, including file extensions, configuration, and icon. (package.jsonR120-R135)language-configuration.namelist.json) to provide comment styles, bracket/quote pairs, and folding markers for Namelist files. (language-configuration.namelist.jsonR1-R30)syntaxes/fortran_namelist.tmLanguage.json) for Namelist syntax highlighting, including keywords, assignments, numbers, strings, booleans, and comments. (syntaxes/fortran_namelist.tmLanguage.jsonR1-R58)Namelist Outline/Symbol Support
NamelistDocumentSymbolProviderto provide outline support for Namelist files, enabling navigation of blocks and variables in the editor. Registered this provider in the extension activation logic. ([1], [2], [3])Documentation
README.mdto advertise Namelist syntax highlighting, folding, and outline support. (README.mdR35)