Giter Site home page Giter Site logo

Problem with indentation about elm.vim HOT 7 OPEN

lambdatoast avatar lambdatoast commented on June 29, 2024
Problem with indentation

from elm.vim.

Comments (7)

hoosierEE avatar hoosierEE commented on June 29, 2024

tl;dr I hear you, and am also currently working on this problem

I've also been dissatisfied with the indent file in this plugin (even though I'm the one who sent the PR for it in the first place!), and have been trying various other Haskell indent plugins. So far they all suck for Elm (auto-indenting will break Elm programs), and are proving difficult to adapt.

So... I'm starting to think that it might be easier to adapt an existing Python indent plugin to work for Elm. Python suffers for the same reasons (contextually significant whitespace) as Haskell, but since there are more Python users in the world their tools might be a bit better.

from elm.vim.

spinningarrow avatar spinningarrow commented on June 29, 2024

Also since Elm demands 4-space indentation, maybe the plugin should make vim do that automatically?

from elm.vim.

hoosierEE avatar hoosierEE commented on June 29, 2024

Is 4-space indentation an official thing? I've been away from Elm (and this plugin) for a while now; sorry to have dropped the ball. But if 4-space indentation is not semantic, then the user's shiftwidth setting should be used. 4-spaces as a default should be fine though.

from elm.vim.

spinningarrow avatar spinningarrow commented on June 29, 2024

I realised I was referring to this gist which is not
official. On the other hand, I was originally using tabs for indentation
which were definitely giving me whitespace errors from the compiler.

I guess it's not an official thing then.

—Sahil

On Sat, Aug 29, 2015 at 7:21 AM, Alex Shroyer [email protected]
wrote:

Is 4-space indentation an official thing? I've been away from Elm (and
this plugin) for a while now; sorry to have dropped the ball. But if
4-space indentation is not semantic, then the user's shiftwidth setting
should be used. 4-spaces as a default should be fine though.


Reply to this email directly or view it on GitHub
#19 (comment).

from elm.vim.

talon avatar talon commented on June 29, 2024

Until this is fixed, deleting the indentation folder works for me.

from elm.vim.

gilesbowkett avatar gilesbowkett commented on June 29, 2024

4 spaces is idiomatic (and enforced by elm-format) but not semantic.

from elm.vim.

quangv avatar quangv commented on June 29, 2024

creact-elm-app starting file Main.elm is 4 spaces too btw.

from elm.vim.

Related Issues (12)

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.