Skip to content

Commit

Permalink
Add lsp to beancount-mode
Browse files Browse the repository at this point in the history
  • Loading branch information
chuxubank committed Sep 25, 2024
1 parent c5c551f commit 5e790e6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cats/+beancount.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
;; -*- lexical-binding: t; -*-

(use-package beancount
:ensure-system-package
(beancount-language-server . beancount-language-server)
:pin jcs-elpa
:init
(setq beancount-mode-map-prefix [(control c) (control c)])
Expand All @@ -9,6 +11,10 @@
(add-hook 'beancount-mode-hook #'cat-disable-electric-indent-chars)
:custom
(beancount-use-ido nil)
:mode-hydra
(beancount-mode
("LSP"
(("e" eglot-hydra/body "eglot"))))
:config
(define-key beancount-mode-map (kbd "C-c C-n") #'outline-next-visible-heading)
(define-key beancount-mode-map (kbd "C-c C-p") #'outline-previous-visible-heading)
Expand All @@ -17,3 +23,6 @@
"Open fava url as soon as the address is announced."
(if-let ((url-index (string-match "\\(http://.+:[0-9]+\\)" output)))
(browse-url (match-string 1 output)))))

(with-eval-after-load 'eglot
(add-to-list 'eglot-server-programs '(beancount-mode . ("beancount-language-server" "--stdio"))))

0 comments on commit 5e790e6

Please sign in to comment.