Skip to content

Brace minimisation #548

Open
Open
@zesterer

Description

@zesterer

Since Howl is a multi-language editor, it's obvious that properly parsing all languages to figure out where functions begin or end is... difficult. Instead, I offer an alternative suggestion: A way to minimise content enclosed within a given set of braces/brackets/parentheses. As an example,

304 | 
305 | fn foo(a: i32, b: i32) -> i32 {
306 |     // Some useless code
307 |     let c = 5;
308 |     let d = c + a
309 |     a + d
310 | }
311 | 

Would minimise to

304 | 
305 | fn foo(a: i32, b: i32) -> i32 { ... }
311 | 

The character to perform the minimisation upon could be tweaked on a per-language basis.

I've not fully thought through how this might work with nesting, but I thought that starting a discussion about this would be the best thing to do.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions