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

Incorrect indentation when adding new require clauses to ns form #2763

Closed
cursive-ide opened this issue Jan 20, 2023 · 0 comments
Closed

Incorrect indentation when adding new require clauses to ns form #2763

cursive-ide opened this issue Jan 20, 2023 · 0 comments
Labels
bug Marks issues describing bugs released Marks issues which have had the fixes released in a stable build
Milestone

Comments

@cursive-ide
Copy link
Owner

When Cursive adds a new require clause to an ns form (auto-require), the indentation will become incorrect if the new require clause will be inserted as the first clause in the require. e.g.:

(ns ns-add-require-bug.core
  (:require [clojure.string :as str]))

If clojure.set is inserted, the following will happen:

(ns ns-add-require-bug.core
  (:require 
    [clojure.set :as set]
    [clojure.string :as str]))

However, if clojure.walk is inserted, the formatting remains correct:

(ns ns-add-require-bug.core
  (:require [clojure.string :as str]
            [clojure.walk :as walk]))

This is because the new clause is added after the first require clause.

@cursive-ide cursive-ide added this to the 1.12.8 milestone Jan 20, 2023
@cursive-ide cursive-ide modified the milestones: 1.12.8, 1.12.8-eap1 Feb 3, 2023
@cursive-ide cursive-ide added the bug Marks issues describing bugs label Feb 3, 2023
@cursive-ide cursive-ide added the released Marks issues which have had the fixes released in a stable build label Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Marks issues describing bugs released Marks issues which have had the fixes released in a stable build
Projects
None yet
Development

No branches or pull requests

1 participant