Skip to content
This repository was archived by the owner on Jan 25, 2024. It is now read-only.
This repository was archived by the owner on Jan 25, 2024. It is now read-only.

Don't change file if formatting doesn't change #81

@fufexan

Description

@fufexan

Description

I'm using the helix editor and when formatting a file with :format while using rnix-lsp, it will replace the entire content of the file even when the formatting doesn't change.
Doing the same for a .c/.cpp file while using clangd doesn't replace the contents.

I wonder whether this is because rnix-lsp doesn't check whether the formatting has actually changed. Perhaps it would take too much to check it? I'm not sure how this works as I'm not familiar with the code behind LSP servers.

Considered alternatives

I noticed the code responsible for formatting is here and whether checking if the formatting changed is an option.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions