Skip to content

Commit

Permalink
Wrap lsp-interface invocations into eval-and-compile
Browse files Browse the repository at this point in the history
This fixes the issue reported and detailedly discussed at:
https://leanprover.zulipchat.com/#narrow/channel/468104-Emacs/topic/lsp-mode.20errors.20due.20to.20list.20!.3D.20hash-table

Also, make code fit into fill-column.
  • Loading branch information
mekeor committed Dec 10, 2024
1 parent 1012fa5 commit c9ab604
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
7 changes: 4 additions & 3 deletions lean4-fringe.el
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@
(require 'lsp-mode)
(require 'lsp-protocol)

(lsp-interface
(lean:LeanFileProgressProcessingInfo (:range :kind) nil)
(lean:LeanFileProgressParams (:textDocument :processing) nil))
(eval-and-compile
(lsp-interface
(lean:LeanFileProgressProcessingInfo (:range :kind) nil)
(lean:LeanFileProgressParams (:textDocument :processing) nil)))

(defvar-local lean4-fringe-delay-timer nil)

Expand Down
11 changes: 7 additions & 4 deletions lean4-info.el
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,13 @@ The buffer is supposed to be the *Lean Goal* buffer."
;; current window of current buffer is selected (i.e., in focus)
(eq (current-buffer) (window-buffer))))

(lsp-interface
(lean:PlainGoal (:goals) nil)
(lean:PlainTermGoal (:goal) nil)
(lean:Diagnostic (:range :fullRange :message) (:code :relatedInformation :severity :source :tags)))
(eval-and-compile
(lsp-interface
(lean:PlainGoal (:goals) nil)
(lean:PlainTermGoal (:goal) nil)
(lean:Diagnostic
(:range :fullRange :message)
(:code :relatedInformation :severity :source :tags))))

(defconst lean4-info-buffer-name "*Lean Goal*")

Expand Down

0 comments on commit c9ab604

Please sign in to comment.