-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revert verbosity back to 0 #433
Conversation
This matches merlin's default behavior Signed-off-by: Rudi Grinberg <[email protected]>
bafaf03
to
c4f2525
Compare
I understand usefulness of having verbosity set to 0, but I think this change needs to come along with a way to display a module's type in a useful way. Going from this to this would be a regression in hover functionality, don't you think? What to do
I think we should aim to have the next release to have both this PR and a fix for modules. What do you think? |
would be a regression in hover functionality, don't you think?
I think the unrecoverable crash is worse than the loss of functionality.
I think we should aim to have the next release to have both this PR and a fix for modules. What do you think?
Yes, please give it a try.
|
CHANGES: ## Fixes - Switch `verbosity` from 1 to 0. This is the same default that merlin uses. The old value for verbosity (ocaml/ocaml-lsp#433) - Get fresh diagnostics (warning and error messages) on a file save (ocaml/ocaml-lsp#438) Note: If you want the fresh diagnostics to take into account changes in other files, you likely need to rebuild your project. An easy way to get automatic rebuilds is to run `dune` in a watching mode, e.g.,[dune build --watch].
Using the master version of OCaml-LSP is indeed less useful since it does not gives the signature of module. |
@voodoos I completely forgot about this. I will look into it and report back. |
@voodoos (cc @rgrinberg) An interesting side note: you see, when we hover over a module pulled from a library, say, The simplest solution to the problem we have I see (without fixing the problem I described in the side note above): we reconstruct the (shortest) current identifier at the given position; here, by shortest I mean
Do you have better ideas? Other unrelated questions I have: I) can merlin offer auto-complete for polymorphic variants? |
I guess some input from @trefis might be profitable here. |
It'd be easier if merlin did that itself. We could add a
Not sure what exactly you mean. But the intended behavior for verbosity is that the editor would first set it to 0, and then if the user issues the same query at the same position (with no other query in between) increase the verbosity by 1.
I think you got your diagnostic slightly wrong. A higher value of verbosity asks merlin to traverse the alias. |
It used to work, at least in the context of function applications: if the current argument is supposed to be a polymorphic variant constructor, then completion would offer you the choice between the accepted ones. |
This matches merlin's default behavior and prevents stack overflows in some
situations.