Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow line wrap after specific method modifiers #664

Open
sebthom opened this issue Jan 7, 2023 · 1 comment
Open

Allow line wrap after specific method modifiers #664

sebthom opened this issue Jan 7, 2023 · 1 comment
Labels
enhancement New feature or request lineends line end handling wrapping Incorrect or undesirable wrapping

Comments

@sebthom
Copy link

sebthom commented Jan 7, 2023

Describe the Feature

I would like to be able keep/place the inline and override modifiers for methods on separate lines

(Optional) Sample of desired output

class Foo extends Bar {

   override 
   public function getFrameworkName():String {
      return "foo";
   }

   inline
   public function doMagic():String {
      return "foo";
   }

}
@AlexHaxe AlexHaxe added enhancement New feature or request wrapping Incorrect or undesirable wrapping lineends line end handling labels Jan 7, 2023
@distantforest1
Copy link

distantforest1 commented May 15, 2024

+1 to this. Right now I have functions like this

overload extern inline public static function rowifyObjects(x: Float, y: Float, rowDist: Float, obs: Array<Object>) {
   // ...
}

public static function printLocation(x: Float, y: Float) {
   // ...
}

overload extern inline public static function columnify(x: Float, y: Float, rowDist: Float, obs: Array<Object>) {
   // ...
}

If we could turn the above mess into something like this:

overload extern inline static 
public function rowifyObjects(x: Float, y: Float, rowDist: Float, obs: Array<Object>) {
   // ...
}

overload extern inline static 
public function columnify(x: Float, y: Float, rowDist: Float, obs: Array<Object>) {
   // ...
}

static 
public function printLocation(x: Float, y: Float) {
   // ...
}

Makes the code a lot neater I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request lineends line end handling wrapping Incorrect or undesirable wrapping
Projects
None yet
Development

No branches or pull requests

3 participants