Skip to content
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

Folding is slightly off with ocamllsp #14

Open
thibautbenjamin opened this issue Aug 19, 2021 · 0 comments
Open

Folding is slightly off with ocamllsp #14

thibautbenjamin opened this issue Aug 19, 2021 · 0 comments

Comments

@thibautbenjamin
Copy link

I am using emacs to code in OCaml, using lsp-mode and the ocamllsp server. I have just tried adding lsp-origami to my setup, and I really like its capabilities, however, I find that the decisions it takes when it comes to folding are a little questionable. The folding looks almost right, except is also folds the header of every block, and as a result I can't see the blocks at all, except for the indicator that there is something to unfold at this place.

I don't know wether this is the fault of the LSP itself, or of lsp-origami making assumptions about the language. I believe that this bevavior possible to fix (maybe with a customizable variable controlling some adjustments of the LSP answer), but I do not know enough elisp to do this myself.

Here is a picture of the behavior I am describing, where you can see that after folding, only the comments are still active
folded
unfolded
Here is what I would expect the folding to look like in this example

(* This is a demo *)

(* First say hello *)
let hello = ...

(* This function is more complicated *)
let complicated_function x y = ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant