Skip to content

Add ANSYS APDL and NASTRAN highlighting, folding, and column guides - #6074

Closed
ZHBHFUT wants to merge 10 commits into
rizonesoft:masterfrom
ZHBHFUT:master
Closed

ZHBHFUT wants to merge 10 commits into
rizonesoft:masterfrom
ZHBHFUT:master

Conversation

@ZHBHFUT

@ZHBHFUT ZHBHFUT commented Oct 31, 2026

Copy link
Copy Markdown

Summary

Add editing support for ANSYS APDL and NASTRAN input files, including syntax highlighting and code folding.

  • Register APDL and NASTRAN lexers with file associations, styles, dark themes, and language resources.
  • Support APDL control structures and CDB data blocks, and NASTRAN sections, fixed/free/large fields, and continuation records.
  • Add NASTRAN 8- and 16-character column-guide presets, with boundaries at columns 72 and 80, a toggle shortcut, and preferences isolated from ordinary long-line markers. Suppress guides when font metrics are incompatible with fixed-column display.
  • Include visual fixtures, a Windows GUI regression script, build/package automation, documentation, and screenshots.

Validation

  • Compared against upstream master at 8c96c2185481bcecded3a41e2c90b3de998fe604; source head is 9290c8023a2279a707e69b7185e462dc946b07c2.
  • git diff --check reports trailing spaces on four NASTRAN fixture lines. The fixture instructions require preserving fixed-column bytes.
  • Windows build and GUI tests were not run in this Linux session. The included Windows workflow runs the build, documentation validation, and column-guide GUI checks; its run results have not been verified in this session.

Screenshots

APDL syntax highlighting and folding

NASTRAN column guides

@hpwamr
hpwamr requested a review from RaiKoHoff October 31, 2026 19:29

@RaiKoHoff RaiKoHoff left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Non standard Lexilla lexers

@RaiKoHoff

Copy link
Copy Markdown
Collaborator

Your pull request appears to be very well engineered, and we sincerely appreciate the time and effort you have invested in it.

Unfortunately, one of our current goals is to reduce the number of custom ("home-grown") lexers (lexer_x) and rely as much as possible on the lexers provided by Lexilla. This helps us keep the codebase maintainable and reduces our long-term maintenance burden.

For this reason, we regret that we cannot accept your pull request.

However, if you are interested in maintaining your own version of Notepad3, including support for ANSYS APDL and NASTRAN, in your GitHub repository, we would be very happy to reference your project on our website. This would allow users interested in these additional lexers to discover and benefit from your work.

Thank you again for your valuable contribution, your understanding, and the effort you have put into this.

@RaiKoHoff RaiKoHoff closed this Nov 2, 2026
@ZHBHFUT

ZHBHFUT commented Nov 2, 2026

Copy link
Copy Markdown
Author

Your pull request appears to be very well engineered, and we sincerely appreciate the time and effort you have invested in it.

Unfortunately, one of our current goals is to reduce the number of custom ("home-grown") lexers (lexer_x) and rely as much as possible on the lexers provided by Lexilla. This helps us keep the codebase maintainable and reduces our long-term maintenance burden.

For this reason, we regret that we cannot accept your pull request.

However, if you are interested in maintaining your own version of Notepad3, including support for ANSYS APDL and NASTRAN, in your GitHub repository, we would be very happy to reference your project on our website. This would allow users interested in these additional lexers to discover and benefit from your work.

Thank you again for your valuable contribution, your understanding, and the effort you have put into this.

Hi RaiKoHoff,

Thank you for reviewing my contribution and for explaining the project’s direction. I understand the goal of reducing custom lexers and the associated maintenance burden.

After checking the upstream sources, I noticed that Lexilla already provides an APDL lexer in lexers/LexAPDL.cxx (SCLEX_APDL). Notepad3’s current lexer catalogue does not register it.

My submitted PR added custom implementations under lexers_x, so your concern about the current implementation is valid. Would you be open to a smaller, separate PR that enables APDL using the existing upstream Lexilla lexer, with only the necessary build/catalogue integration, syntax styles, keyword lists, and language selection/file associations?

I would leave the custom APDL implementation, NASTRAN support, and column-guide features out of that proposal. Any APDL lexer improvements needed beyond the existing upstream implementation could be proposed to Lexilla first.

For NASTRAN, I found Lexilla’s MSC Nastran DMAP lexer, but that targets a different language from the BDF/NAS input files supported by my PR. I therefore understand that it does not resolve your concern about the custom NASTRAN lexer.

My aim is to make these engineering text formats easier to edit while following Notepad3’s preference for upstream-maintained lexers. Would an APDL-only contribution along these lines fit the project’s goals?

Thank you again for your time and for your kind offer to reference my fork.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants