Giter Club home page Giter Club logo

Comments (11)

dbuenzli avatar dbuenzli commented on June 8, 2024

Add (setq merlin-error-on-single-line t) to your .emacs. Personally I think this should be the default.

from merlin.

UnixJunkie avatar UnixJunkie commented on June 8, 2024

+1 for having nice defaults...

from merlin.

3Rafal avatar 3Rafal commented on June 8, 2024

@UnixJunkie ,
I made a PR that changes the defaults. Can you give me some nice examples of the behavior so that I can test it?

from merlin.

UnixJunkie avatar UnixJunkie commented on June 8, 2024

Just take a significant ocaml source file from any project, and change it so that it does not compile anymore.

from merlin.

UnixJunkie avatar UnixJunkie commented on June 8, 2024

And yes, this PR #1693 changes the default to something I prefer.
Now, the question is, is this what's preferred by most people or not and hence will the PR be merged...

from merlin.

nojb avatar nojb commented on June 8, 2024

Can you give me some nice examples of the behavior so that I can test it?

I exaplained a typical example that exhibits the issue in #1693 (comment)

from merlin.

voodoos avatar voodoos commented on June 8, 2024

Now, the question is, is this what's preferred by most people or not and hence will the PR be merged...

I personally don't have a strong opinion about this. Knowing the scope of the error is useful, but having the whole buffer turn red is not. Do other language plugins have better way to deal with this issue ? Maybe we could underline everything only when more information is asked about the error ?

Since we had recently a nice collective discussion about keybindings, I will summon the people who took part in it to gather more feedback 🙂

@Chris00 @mattiase @bbatsov @erikmd @catern

from merlin.

bbatsov avatar bbatsov commented on June 8, 2024

Depends on what info we can get from the compiler about the error - in CIDER we try to map the errors to a single expression, even if it's multiline. Can someone post a screenshot of the problem, because I don't recall seeing crazy error highlighting in Merlin.

from merlin.

nojb avatar nojb commented on June 8, 2024

Can someone post a screenshot of the problem, because I don't recall seeing crazy error highlighting in Merlin.

image

from merlin.

bbatsov avatar bbatsov commented on June 8, 2024

Yeah, this looks pretty bad indeed. I think most packages would just underline characters 2-19 on line 121 as indicated by the compiler error.

from merlin.

mattiase avatar mattiase commented on June 8, 2024

The wholesale highlighting of the entire module struct because of a single mismatch is rubbish of course, but setting merlin-error-on-single-line doesn't seem to be the solution. The text becomes more readable in this case but at the price of making the highlighting quite pointless.

Anything preventing us from highlighting the ranges supplied by the error messages? They seem a lot more informative, as in

File "broken.ml", line 3, characters 2-16: Expected declaration
File "broken.ml", line 6, characters 6-7: Actual declaration

from merlin.

Related Issues (20)

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.