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

The New Indent engine doesn't follow block rules in ns :require #633

Closed
PEZ opened this issue May 1, 2020 · 0 comments
Closed

The New Indent engine doesn't follow block rules in ns :require #633

PEZ opened this issue May 1, 2020 · 0 comments
Assignees

Comments

@PEZ
Copy link
Collaborator

PEZ commented May 1, 2020

The experimental indent engine is quite competent and should be made the default. However, there is currently a bug where it doesn't follow cljfmt block indent rules correctly, inside the :require of ns forms. Which is problematic since this is the default formatting in Calva (and in/because of cljfmt).

Consider this:

(ns calva.fmt.formatter-test
  (:require [cljs.test :include-macros true :refer [deftest is]]
            [cljfmt.core :as cljfmt]|1
    |2
            [calva.fmt.formatter :as sut]))

Entering a new line at |1 puts the cursor at |2, when it should have been placed aligned with the first required vector.

@PEZ PEZ added the formatting label May 1, 2020
@PEZ PEZ self-assigned this May 1, 2020
@PEZ PEZ closed this as completed in beb544d May 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant