Giter VIP home page Giter VIP logo

Comments (6)

kwladyka avatar kwladyka commented on July 28, 2024

Another example:
screen shot 2018-05-04 at 15 03 48
It works bad with maps. Looks at :profiles. I was experimenting a little and it looks like it does good job only for first level key.

from calva-paredit.

kwladyka avatar kwladyka commented on July 28, 2024

Cursive solves that as an option in configuration. If we want to have 1 space after key or aligned.
screen shot 2018-05-04 at 15 07 11
screen shot 2018-05-04 at 15 07 16

from calva-paredit.

kwladyka avatar kwladyka commented on July 28, 2024

Example:
How it looks:

{:1 1
 :2                2
 :3 3
 :4 {:a [1 2
         3 4]}
 :5 {:a {:b [[1 2]
[3 4]
         [5 6]
             [7 8]]}}
   :profiles {:dev {:dependencies [[figwheel-sidecar "0.5.15"]
                     [binaryage/devtools "0.9.9"]
                                   [com.cemerick/piggieback "0.2.2"]]}}
 :6 [1                            2]}

screen shot 2018-05-04 at 15 59 25

How it should look:

{:1 1
 :2 2
 :3 3
 :4 {:a [1 2
         3 4]}
 :5 {:a {:b [[1 2]
             [3 4]
             [5 6]
             [7 8]]}}
 :profiles {:dev {:dependencies [[figwheel-sidecar "0.5.15"]
                                 [binaryage/devtools "0.9.9"]
                                 [com.cemerick/piggieback "0.2.2"]]}}
 :6 [1 2]}

screen shot 2018-05-04 at 16 00 23

from calva-paredit.

PEZ avatar PEZ commented on July 28, 2024

I wonder what is going on there with the last example. This is what I get:

{:1 1
 :2                2
 :3 3
 :4 {:a [1 2
         3 4]}
 :5 {:a {:b [[1 2]
             [3 4]
             [5 6]
             [7 8]]}}
 :profiles {:dev {:dependencies [[figwheel-sidecar "0.5.15"]
                                 [binaryage/devtools "0.9.9"]
                                 [com.cemerick/piggieback "0.2.2"]]}}
 :6 [1                            2]}

Which seems to be the correct indentation.

The spacing between items on the same line is left untouched, which is a good thing waiting for some way to configure if items should be made to align in a tabular manner. Lacking that it would be a bit rude to remove spaces that the user might have worked with placing there.

from calva-paredit.

kwladyka avatar kwladyka commented on July 28, 2024

I would say it is rude to not use 1 space or aligned version for map as developer heh ;) We have this 2 standards to format code and I have never seen people doing it in different way.

IMO Curisve is really good, practice, tested and stable thing to copy solution. Personally i can't demand from it anything more.

Two configurable option for maps:

  1. 1 space
  2. aligned version

from calva-paredit.

kwladyka avatar kwladyka commented on July 28, 2024

After discussion with @PEZ:

The issue should be in Parinfer extension or Calva extension. It is not Paredit issue.

As my understanding is:
Paredit - shortcuts for editing code
Parinfer - formating code
Calva - Clojure extension

I am not sure if Parinfer can be common for all lisp languages. That is why solution should be implemented in Parinfer or Calva.

from calva-paredit.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.