Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: arnetheduck/nph
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.3
Choose a base ref
...
head repository: arnetheduck/nph
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.4
Choose a head ref
  • 15 commits
  • 32 files changed
  • 2 contributors

Commits on Jan 8, 2024

  1. better format script

    arnetheduck committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    8c21825 View commit details
    Browse the repository at this point in the history

Commits on Jan 25, 2024

  1. even better format script

    arnetheduck committed Jan 25, 2024
    Configuration menu
    Copy the full SHA
    85a5ce5 View commit details
    Browse the repository at this point in the history

Commits on Jan 26, 2024

  1. add Nim 2.0.2 to supported versions (#30)

    * add Nim 2.0.2 to supported versions
    
    * updated nimble release name
    
    * one more
    arnetheduck authored Jan 26, 2024
    Configuration menu
    Copy the full SHA
    3dc181b View commit details
    Browse the repository at this point in the history
  2. Spaces around .. and ..< (#31)

    Although NEP1 suggests not having spaces around these infix operators,
    this creates an exception to the normal infix spacing rules.
    
    In spite of this recommendation, lots of code out there maintains spaces
    around the operators which makes decision based on "existing practice"
    hard.
    
    Adding to the complexity is in order to not break the AST, the code must
    take care to remove the spaces only in cases where the infix is not
    followed by another operator - this means that we _sometimes_ will put
    spaces around these infixes and sometimes not, again leading to
    irregularity.
    
    Since there's no consensus in existing code, the rule is irregular and
    causes implementation complexity, this PR removes the exception and
    formats `..` and `..<` with spaces.
    arnetheduck authored Jan 26, 2024
    Configuration menu
    Copy the full SHA
    6065e70 View commit details
    Browse the repository at this point in the history
  3. Chain long dot-calls (fixes #28) (#32)

    When multiple dot-separated calls don't fit on a single line, use a long
    format similar to lists to put each on a new line.
    arnetheduck authored Jan 26, 2024
    Configuration menu
    Copy the full SHA
    a793758 View commit details
    Browse the repository at this point in the history
  4. Keep section beginning on same line even if entry is long (#33)

    The section "short form" was restored to its 0.2 format to allow the
    before-`=` part of the section to stay on the same line as the section
    keyword.
    
    This reduces the overall indent of the (long) RHS which gives it better
    chances to be formatted nicely.
    arnetheduck authored Jan 26, 2024
    Configuration menu
    Copy the full SHA
    5bed5cf View commit details
    Browse the repository at this point in the history

Commits on Feb 2, 2024

  1. Treat . as part of a simple expression (#34)

    Treating `.` as complex leads to complex formatting where it is not
    desired, such as module-prefixing and trivial field accesses - this
    plays well with omitting `()` in trivial calls as well.
    
    * ensure long if-expressions are line-broken correctly
    * render first condition of `of` on the same line
    * document what is simple
    arnetheduck authored Feb 2, 2024
    Configuration menu
    Copy the full SHA
    503436b View commit details
    Browse the repository at this point in the history
  2. Don't stack single-dotexpr-calls (#35)

    There should be at least two calls for stacking mode to kick in
    arnetheduck authored Feb 2, 2024
    Configuration menu
    Copy the full SHA
    1f4c491 View commit details
    Browse the repository at this point in the history
  3. fix extra lambda indent (#36)

    Use proc-renderer for lambdas also (fixes parameter format as well)
    arnetheduck authored Feb 2, 2024
    Configuration menu
    Copy the full SHA
    dd146ed View commit details
    Browse the repository at this point in the history
  4. stricter CI (#37)

    * stricter CI
    
    * fix formatting
    arnetheduck authored Feb 2, 2024
    Configuration menu
    Copy the full SHA
    dc5e13c View commit details
    Browse the repository at this point in the history

Commits on Feb 4, 2024

  1. Update README.md to Add NeoVim intergation (#38)

    Update README.md to include NeoVim integration using neoformat plugin. 
    
    + sbdchd/neoformat#491
    foxoman authored Feb 4, 2024
    Configuration menu
    Copy the full SHA
    af99463 View commit details
    Browse the repository at this point in the history
  2. tighten rhs expression whitespace and indent (#39)

    When rendering the right-hand expression of a keyword like `return` or
    an assignment, sometimes we would add a newline and indent.
    
    This PR avoids such extra indent/newlines by allowing partial
    expressions such as function calls to continue on the same line like so:
    
    ```nim
    let myvariable = functioncall(
      arg0, arg1, ...
    )
    ```
    
    This saves significant amounts of space as we avoid the extra indent
    that previously would apply to the arguments in this case.
    arnetheduck authored Feb 4, 2024
    Configuration menu
    Copy the full SHA
    13a4822 View commit details
    Browse the repository at this point in the history
  3. fix do in call in dotexpr, comment in tuple, long files and lines (#40)

    Includes several random doc comment fixes for free!
    arnetheduck authored Feb 4, 2024
    Configuration menu
    Copy the full SHA
    255dac4 View commit details
    Browse the repository at this point in the history

Commits on Feb 5, 2024

  1. Prefer infix operator at end of line (#41)

    If the second argument of an infix doesn't fit on the current line but
    fits on a new line, prefer a newline before the argument over partially
    formatting it on the same line as the operator.
    
    This gives a preference to having the operator alone on the end of the
    line and nicely lines up parenthesized expressions in general.
    arnetheduck authored Feb 5, 2024
    Configuration menu
    Copy the full SHA
    3544132 View commit details
    Browse the repository at this point in the history
  2. v0.4 (#45)

    arnetheduck authored Feb 5, 2024
    Configuration menu
    Copy the full SHA
    537f1ce View commit details
    Browse the repository at this point in the history
Loading