Skip to content

Setup Guide for Emacs Needs Updating #3700

Description

@YZmarkS

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    • Status
      📋 Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions