Skip to content

Format inside of directives #197

@zaneduffield

Description

@zaneduffield

A suggestion from #193 was to remove trailing spaces in conditional directives.

I think this is a good idea, and could be extended to a more general rule for formatting directives.
They can get pretty complicated so we should be careful in implementing this, but there are at least some simple cases that would be nice to cover.

For example

  1. {$ifdef NAME}
  2. {$COMPILERDIRECTIVE}
    • no spaces after directive
  3. {$if DEFINED(Foo) and (CONSTANT > 3)}
    • a real stretch goal would be to format the {$if} directive expressions like a regular Delphi expression

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions