Skip to content

Allow disabling formatter #83

Closed

Description

@AtomToast

As someone only needing the linting part of ruff, I'd like to be able to disable the formatter, which conflicts with the formatter I do use.

I spent the better part of the day trying to figure out why black always broke the formatting when running inside of my editor but not when running from our pre-commit hook or manually in the terminal... Now I finally figured out that it was actually this plugin having formatting enabled by default.
Ruff formatting is not 100% compatible with black, which basically stops me from using this plugin entirely in my workflow. Which sucks because I do actually want the linting part of ruff.

Otherwise I guess I'll need to setup another language server for which I can then entirely disable document formatting

Activity

  1. jhossbach commented on Feb 22, 2024

    @jhossbach
    Member

    Looking into it.

  2. jhossbach commented on Feb 22, 2024

    @jhossbach
    Member

    Can you checkout https://github.com/python-lsp/python-lsp-ruff/tree/fix_%2383 and see if that resolves your issue? I tried locally with neovim and it seems to work.

  3. AtomToast commented on Feb 26, 2024

    @AtomToast
    Author

    That resolves it for me 👍

  4. AtomToast commented on Feb 29, 2024

    @AtomToast
    Author

    Any chance of getting this into a pr?

  5. jhossbach commented on Feb 29, 2024

    @jhossbach
    Member

    Certainly, but I want to check if returning None is valid as a formatting response before merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions