Closed ns-rse closed 1 year ago
Are you sure that this reproduces with M-x lsp-start-plain
?
No, I tried reproducing it with M-x lsp-start-plain
and on launching a bunch of packages are installed (under /tmp/lsp-tmp-elpaQ5Wq7v
by the looks of it).
On opening a .py
file I got the message Unable to find installed server supporting this file. The following servers could be installed automatically:
.
Installed M-x package-install pyvenv
and activated a virtual environment I know has jedi-language-server
installed and got the same error message Unable to find installed server supporting this file. The following servers could be installed automatically:
.
Installed M-x package-install lsp-jedi
and tried again (with virtual environment still activated) same error message with no list of servers to be installed (not an issue, as I think the server should be used from the virtualenv).
Next I tried M-x lsp-update-servers
to see if that made lsp-mode
aware of the server available in the activated virtualenv (very similar with M-x lsp-update-server
)...
Debugger entered--Lisp error: (cl-assertion-failed ((seq-every-p (apply-partially #'stringp) command) "Invalid command list"))
....
I've gone back to this on your suggestion as I should have done originally and then tried...
M-x package-install use-package
and evaluated the following from my settings (although lsp-mode was Unable to calculate the languageId for buffer 'lsp-serrings.el'
)...
(use-package lsp-jedi
:ensure t
:config
(with-eval-after-load "lsp-mode"
(add-to-list 'lsp-disabled-clients 'pyls)
(add-to-list 'lsp-enabled-clients 'jedi)))
Open a .py
file and bingo lsp-mode
is working.
On that basis I restarted my emacs --fg-daemon
process and tried again and everything is back up and running.
Sorry for not doing this all up-front.
I'm curious to understand why this might have broken on upgrading lps-mode
and that restarting Emacs solved it. Is it something to do with the byte-compilation perhaps?
I'm curious to understand why this might have broken on upgrading
lps-mode
and that restarting Emacs solved it. Is it something to do with the byte-compilation perhaps?
I thought that you haven't restarted. I changed the code that looks like this:
(defun foo ()
(lambda (param) ...))
I added one param to the inner lambda and which is called only on startup (when loading the clients). Then the clients will hold a lambda that has less parameters than the expected number.
Thank you for the bug report
lsp-mode
related packages.M-x lsp-start-plain
Bug description
On trying to start
lsp-mode
I encounter the following error...Steps to reproduce
*.py
file.Expected behavior
A few days ago
lsp-mode
started fine usinglsp-jedi
/jedi-language-server
in the background.Which Language Server did you use?
lsp-jedi-20220430.18
OS
Linux
Error callstack
Anything else?
I found an older thread that reported a similar issue when opening files over TRAMP (see #2873) although its not clear to me what the solution was there and I'm only opening files from my local filesystem.