Skip to content

Implement Feature Request: Allow Comment Alignment At Different Columns #1#2

Open
skkdevcraft wants to merge 2 commits into
unitMeasure:mainfrom
skkdevcraft:main
Open

Implement Feature Request: Allow Comment Alignment At Different Columns #1#2
skkdevcraft wants to merge 2 commits into
unitMeasure:mainfrom
skkdevcraft:main

Conversation

@skkdevcraft
Copy link
Copy Markdown

This PR improves ASM comment alignment behavior by allowing independent comment alignment blocks instead of forcing all consecutive comments into a single shared column.

It also fixes tab-width handling by using the editor formatting configuration (tabSize, insertSpaces) instead of hardcoded tab assumptions.

Example:

# global comment
# global comment 2

                      # this comment starts with #
	mov     bx, %eax  # aa
                      # bb

                    ; this comment starts with ;
	mov     ax, bx  ; comment
                    ; comment 2
                    ; comment 3

Changes included:

  • support multiple independent comment alignment regions
  • preserve intentional manual alignment styles
  • fix continuation comment alignment
  • use VS Code formatting options for visual width calculation
  • remove hardcoded tab-size assumptions

This improves readability and produces more consistent formatting across different editor configurations.

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