Skip to content

Skip comments entirely when evaluating indentation #209861

Closed

Description

In relation to #209519

As part of the indentation improvement, we would like to entirely strip comments from the current line being considered before evaluating the indentation rules

Simplify the indentation regexes in order not to take into account comment placements for indentation.

Activity

  1. added
    polish
    editor-autoindent
    on Apr 8, 2024
  2. RedCMD commented on Apr 8, 2024

    @RedCMD
    Contributor

    I think this is a good idea
    but would it be optional or forced?

  3. aiday-mar commented on Apr 9, 2024

    @aiday-mar
    CollaboratorAuthor

    After discussion with my colleagues, we decided this would be forced. That is comments will never be considered in the indentation evaluation.

  4. aiday-mar commented on May 27, 2024

    @aiday-mar
    CollaboratorAuthor

    Fixed with #210641. This PR actually treats strings, regexe and comment tokens in a similar manner. The language configuration brackets in these tokens are stripped and the indentation rules are evaluated on the stripped lines

  5. locked and limited conversation to collaborators on Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

editor-autoindentpolish

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions