Skip to content

Document the pitfall of modifying lean4-mode-hook before Lean4-Mode has been loaded #101

@JLimperg

Description

@JLimperg

Version 1.1.2 of lean4-mode has been broken for me in Doom Emacs for some time due to the following error.

Setup

I'm running Doom Emacs with the lean4-mode config from the README and the latest lsp-mode. If you can't reproduce, I'll be happy to provide more specific info.

Failure

When loading a Lean file, lean4-mode seems to start properly (no errors in Messages, no error buffers). However, LSP does not start: there's no semantic syntax highlighting, no type-checking, etc. Attempting to open the infoview results in an LSP error indicating that the LSP session does not support the plainGoal method.

Additional Info

I bisected the issue down to commit 78caecefb862f1e38daff7b7cc983651e2b726eb. Reverting this commit, like here, fixes the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions