Comments (6)
Another example:
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.
Cursive solves that as an option in configuration. If we want to have 1 space after key or aligned.
from calva-paredit.
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]}
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]}
from calva-paredit.
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.
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 space
- aligned version
from calva-paredit.
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)
- Cannot disable paredit without disabling calva HOT 4
- Splice sexp command inside strings also splices the enclosing sexp HOT 3
- Strict mode prohibits βlegalβ deletions of selected text HOT 3
- Feature request: Keep the balance entering comment-semi-colons in strict mode HOT 1
- It is not possible to use the commands in languages other than clojure, lisp and scheme HOT 4
- Feature request: raise sexp HOT 8
- Indentation fails
- Unusual behavior with wrap in the middle of a leaf sexp HOT 1
- Slurp sexp forward should be able to "push" multiple layers of close delimiters. HOT 1
- In strict mode, backspace should "walk inside" delimiters HOT 5
- Backspace is prohibited when a newline is in the selection HOT 1
- Add forwardUpSexp HOT 1
- Add support for switching between strict and non-strict mode HOT 1
- Kill Sexp Forward/Backward not working correct HOT 4
- [Improvement] Less picky about cursor placement HOT 2
- [Request] Kill commands should copy sexp to the clipboard HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from calva-paredit.