Situation
On the OCaml.org page, under Get Started -> Tooling -> Emacs -> LSP Setup for OCaml, the guide recommends using eglot as the LSP server client with a piece of use-package expression to build on.
The expression binds eglot-ensure to the ocaml-eglot-hook.
This configuration triggers a warning when opening OCaml files on my machine.
Warning (defvaralias): Overwriting value of ‘ocaml-eglot-hook’ by aliasing to ‘ocaml-eglot-mode-hook’
The documentation for the Emacs variable ocaml-eglot-hook similarly describes it as obsolete.
Proposed Change
Update the documentation to bind eglot-ensure to ocaml-eglot-mode-hook instead:
(use-package ocaml-eglot
:ensure t
:after tuareg
:hook
(tuareg-mode . ocaml-eglot)
(ocaml-eglot-mode . eglot-ensure)) ;; <------
System
Windows 11 WSL Ubuntu
Emacs 30.2
Situation
On the OCaml.org page, under
Get Started -> Tooling -> Emacs -> LSP Setup for OCaml, the guide recommends usingeglotas the LSP server client with a piece ofuse-packageexpression to build on.The expression binds
eglot-ensureto theocaml-eglot-hook.This configuration triggers a warning when opening OCaml files on my machine.
The documentation for the Emacs variable
ocaml-eglot-hooksimilarly describes it as obsolete.Proposed Change
Update the documentation to bind
eglot-ensuretoocaml-eglot-mode-hookinstead:System
Windows 11 WSL Ubuntu
Emacs 30.2