Comments (4)
The indentation code tends to add a new level on newline-and-indent
. Please see the README
note about indentation cycling. The gist of it is, every time you get an indentation level you don't expect you should be able to get the one you want simply by hitting tab.
Based on your screenshot, you might also be having issues because your usage of ,
is somewhat non-standard. The indenter would've worked better had you formatted your lists like this:
div [ id "container ]
[ pageHeader
, entryList
, pageFooter
]
Hope that helps! Let me know if any of this is confusing and I'll try to explain it better :)
from elm-mode.
I think this is the same issue I am having when I move code between buffers.
Example:
this is the starting point:
dock = foldp updateDocks Dict.empty ships
I want to move these lines from one buffer to the one above (i.e. kill then yank)
port coordinates : (Int,Int)
port incomingShip : Signal { name:String, capacity:Int }
port outgoingShip : Signal String
I will now paste these three lines of code below the first line:
dock = foldp updateDocks Dict.empty ships
port coordinates : (Int,Int)
port incomingShip : Signal { name:String, capacity:Int }
port outgoingShip : Signal String
Marking the region and executing indent-region
seems to cause the same issue.
from elm-mode.
I want to move these lines from one buffer to the one above (i.e. kill then yank)
This is not standard behavior. Your setup must be calling indent-region
after inserting the text. If you use spacemacs make sure you add elm-mode
to spacemacs-indent-sensitive-modes
.
Marking the region and executing indent-region seems to cause the same issue.
The way we handle indentation right now makes indenting a region that contains multiple top-level definitions particularly problematic because, like I mentioned above, we tend to add a new level on each line and we don't distinguish between top-level definitions and everything else. I would say that if you want to use indent region try to limit yourself to one such definition at a time.
from elm-mode.
I'm closing this for now. Feel free to re-open it if you have any other questions.
from elm-mode.
Related Issues (20)
- Types of items for imenu should be optional. HOT 3
- Evil - Deleting around a paragraph deletes to the end of buffer HOT 7
- Not all warnings from elm-analyse are shown HOT 1
- Indentation after parens produces unwanted completion
- How to enable format-on-save for all Elm buffers? HOT 4
- Incorrect Indentation for HTML Attributes
- package install failed: HOT 2
- project-root definition causes errors with lsp-mode HOT 5
- Indent tab cycling not working as expected for me HOT 3
- Refurbish elm-mode HOT 5
- Remove reliance on reformatter HOT 3
- indentation mode inserts tabs, but elm compiler does not accept tabs HOT 3
- Proposal: highlight exposed functions HOT 1
- Performence issue with large elm files HOT 4
- default binding use elm-mode-format-buffer HOT 1
- Tabs cannot be turned off suddenly HOT 2
- Compilation errors on Emacs 28.1 HOT 3
- Is it intention that "." is a word constituent in the syntax table? HOT 7
- `effect` should not be considered a keyword HOT 3
- Bad indentation when editing elm file
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 elm-mode.