From 0bc4f235c61b674961452a8a0efc1c9cf0f7041b Mon Sep 17 00:00:00 2001 From: Gerry Agbobada Date: Sun, 13 Aug 2023 10:44:38 +0200 Subject: [PATCH] [beancount] Use the Rust version of language server The Python and Typescript versions of beancount-language-server are deprecated, the maintained version now is the Rust one. --- clients/lsp-beancount.el | 16 +++------------- docs/lsp-clients.json | 5 +++-- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/clients/lsp-beancount.el b/clients/lsp-beancount.el index d2125e8cf51..6ba2efcb0fb 100644 --- a/clients/lsp-beancount.el +++ b/clients/lsp-beancount.el @@ -32,20 +32,14 @@ :link '(url-link "https://github.com/polarmutex/beancount-language-server") :package-version '(lsp-mode . "8.0.0")) -(defcustom lsp-beancount-langserver-executable "beancount-langserver" +(defcustom lsp-beancount-langserver-executable "beancount-language-server" "Command to start Beancount language server." :type 'string :group 'lsp-beancount :package-version '(lsp-mode . "8.0.0")) -(defcustom lsp-beancount-python-interpreter nil - "Path to Python executable." - :type 'string - :group 'lsp-beancount - :package-version '(lsp-mode . "8.0.0")) - (defcustom lsp-beancount-journal-file nil - "Pathg to Beancount journal file." + "Path to Beancount journal file." :type 'string :group 'lsp-beancount :package-version '(lsp-mode . "8.0.0")) @@ -55,14 +49,10 @@ :new-connection (lsp-stdio-connection (lambda () - (when (null lsp-beancount-python-interpreter) - (setq lsp-beancount-python-interpreter (or (executable-find "python3") - (executable-find "python")))) `(,lsp-beancount-langserver-executable "--stdio"))) :major-modes '(beancount-mode) :initialization-options - `((journalFile . ,lsp-beancount-journal-file) - (pythonPath . ,lsp-beancount-python-interpreter)) + `((journalFile . ,lsp-beancount-journal-file)) :server-id 'beancount-ls)) (lsp-consistency-check lsp-beancount) diff --git a/docs/lsp-clients.json b/docs/lsp-clients.json index d3902f20228..aa6d53dfca5 100644 --- a/docs/lsp-clients.json +++ b/docs/lsp-clients.json @@ -63,9 +63,10 @@ { "name": "beancount", "full-name": "Beancount", - "server-name": "beancount-langserver", + "server-name": "beancount-language-server", "server-url": "https://github.com/polarmutex/beancount-language-server", - "installation": "npm install -g beancount-langserver", + "installation": "cargo install beancount-language-server", + "installation-url": "https://github.com/polarmutex/beancount-language-server#installation", "lsp-install-server": "beancount-ls", "debugger": "Not available" },