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

Add insert-final-newline config option #8157

Merged
merged 6 commits into from
Sep 12, 2023

Commits on Sep 3, 2023

  1. Add insert-final-newline config option

    This resolves helix-editor#4274 with the implementation largely based off of helix-editor#5435
    and also addresses the review from @the-mikedavis on that PR.
    
    The option name is from EditorConfig's `insert_final_newline`, which is
    also used by VS Code as `files.insertFinalNewline`.
    
    We match Vim's behavior in that :w will add the newline to unmodified
    files but :wa will not; see helix-editor#1760. Tests are included for this.
    
    Co-authored-by: Xalfer <[email protected]>
    zqianem and Xalfer committed Sep 3, 2023
    Configuration menu
    Copy the full SHA
    ecc17a4 View commit details
    Browse the repository at this point in the history
  2. Match parameter order for helper and its assert

    Makes the failure message easier to read
    zqianem committed Sep 3, 2023
    Configuration menu
    Copy the full SHA
    c89cd10 View commit details
    Browse the repository at this point in the history
  3. Improve option description

    More discoverable and consistent with rest of docs and codebase
    
    Co-authored-by: Michael Davis <[email protected]>
    zqianem and the-mikedavis committed Sep 3, 2023
    Configuration menu
    Copy the full SHA
    4e7a86c View commit details
    Browse the repository at this point in the history

Commits on Sep 10, 2023

  1. Configuration menu
    Copy the full SHA
    81c69f9 View commit details
    Browse the repository at this point in the history

Commits on Sep 11, 2023

  1. Change default of insert-final-newline to true

    Includes fixes for integration test failures cause by new default
    zqianem committed Sep 11, 2023
    Configuration menu
    Copy the full SHA
    5c1bc48 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    453a486 View commit details
    Browse the repository at this point in the history