diff --git a/clients/lsp-beancount.el b/clients/lsp-beancount.el index d2125e8cf51..7a97ab01d02 100644 --- a/clients/lsp-beancount.el +++ b/clients/lsp-beancount.el @@ -32,20 +32,17 @@ :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. + +The path can be absolute, or relative to the currently opened file. +Use nil (the default) to use the current beancount buffer as the journal file." :type 'string :group 'lsp-beancount :package-version '(lsp-mode . "8.0.0")) @@ -55,14 +52,11 @@ :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"))) + (let ((lsp-beancount-journal-file (expand-file-name (or lsp-beancount-journal-file (buffer-file-name))))) + `(,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" },