You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! Congrats and many thanks for this very nice work. As I go about integrating it into my config, I'm finding the functionality super clean and helpful.
Currently, if the cursor is located at | in an expression like:
letx : bool list =|
And i call ocaml-eglot-construct, it reports eglot--error: [eglot] Not a hole. However, it seems like it would be nice in this kind of situation to make a hole and try to construct in it. I think this kind of context aware, DWIM behavior would be consistent with other parts of the interface, such as, inferring whether to find definitions in the same or different files.
In my config, I have been able to get the behavior I want with
(defunmy/ocaml-eglot-construct ()
"Construct a term, making a hole first if needed"
(interactive)
(if (equal (symbol-at-point) '_)
(ocaml-eglot-construct)
(progn (save-excursion (insert"_"))
(ocaml-eglot-construct))))
Would it make sense to make this the default behavior of ocaml-eglot-construct? If not, perhaps this is useful enough to add as a helper function?
The text was updated successfully, but these errors were encountered:
Hello! Congrats and many thanks for this very nice work. As I go about integrating it into my config, I'm finding the functionality super clean and helpful.
Currently, if the cursor is located at
|
in an expression like:And i call
ocaml-eglot-construct
, it reportseglot--error: [eglot] Not a hole
. However, it seems like it would be nice in this kind of situation to make a hole and try to construct in it. I think this kind of context aware, DWIM behavior would be consistent with other parts of the interface, such as, inferring whether to find definitions in the same or different files.In my config, I have been able to get the behavior I want with
Would it make sense to make this the default behavior of
ocaml-eglot-construct
? If not, perhaps this is useful enough to add as a helper function?The text was updated successfully, but these errors were encountered: