Comments (11)
Add (setq merlin-error-on-single-line t)
to your .emacs
. Personally I think this should be the default.
from merlin.
+1 for having nice defaults...
from merlin.
@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.
Just take a significant ocaml source file from any project, and change it so that it does not compile anymore.
from merlin.
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.
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.
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.
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.
Can someone post a screenshot of the problem, because I don't recall seeing crazy error highlighting in Merlin.
from merlin.
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.
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)
- #1664 may select a worse ghost node if both nodes are ghost
- Feature: provide information about the syntax HOT 1
- Improve the granularity of the typer cache to maximise reuse. HOT 1
- merlin.hide can hide type-signatures inside modules? HOT 2
- Build failure of `merlin-lib` with OCaml 4.14.1: `Error: Unbound value Sys.is_regular_file` HOT 2
- Missing a source digest when looking for an implementation HOT 1
- `501-preview` doesn't interpret the `-cmi-file` flag on the command line. HOT 1
- Suprious `A type variable is unbound in this type declaration` on module not found
- Enrich Merlin telemetry with info about cache hits and misses HOT 1
- merlin gives syntax error on #use directive (or #require) HOT 1
- OCaml 5.1.1 support HOT 7
- Feature: jump to next/previous case HOT 1
- FLG -pp ppx.exe -as-pp does not work on Windows HOT 4
- Invalid arg from Marshal.from_bytes
- Fuzzy-CI should not include Stacktrace in diff generation
- `type-expression` crashes on function applications involving local types
- Identifier renaming also for Emacs? HOT 4
- In 5.2 preview, destruct does not work on function parameter anymore
- Merlin emacs mode does not support project-wide occurrences HOT 1
- `complete-prefix` short-circuits too eagerly when deciding whether to return only record field names
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 merlin.