Re: Remote LSP unable to find texlab server

Riccardo Romoli <[email protected]>
Newsgroups gmane.emacs.tramp
Message-ID <CAHiM-bNZBPkLNaCFXMVYTLtWqs=PU+ng_FXpnoSLNPmcW082_w@mail.gmail.com>
Good morning Michael,

> Did you really start with emacs -Q, and have sent
>   the *whole* log?

I'm not an expert emacs user so it has been quite difficult to be able to
run the command you suggested without errors. Due to the spacemacs layers
config, to loar lsp-mode I wrote a specific init.el file and ran emacs -Q
-l my-specific-init-el. First of all I try to open a local latex file to
check if lsp works using this configuration file. Then I open the remote
latex file and manually load lsp (M-x lsp-mode). The lsp does not start
because it is not able to find the server. Reading the log file it seems
that the path I set was not loaded. I attach both the custom init.el and
the log from tramp.

Best Regards, Riccardo

On Thu, Feb 8, 2024 at 4:32 PM Michael Albinus <[email protected]>
wrote:

> Riccardo Romoli <[email protected]> writes:
>
> > Hi Michael,
>
> Hi Riccardo,
>
> > I tried your suggestion but nothing changed. I started a new emacs,
> > cleared the tramp cache but again the same issue. I attached the log
> > as you requested, hoping this could help. Let me know.
>
> The log looks strange.
>
> - It is incomplete. Did you really start with emacs -Q, and have sent
>   the *whole* log?
>
> - It contains helm backtraces. This makes it harder to analyze, so pls
>   don't use helm for the test.
>
> - It contains file notification activities. Pls don't activate them while
>   testing.
>
> - It doesn't show any remote process invocation. Did you start the
>   remote lsp server?
>
> - You didn't send me the steps how to produce the log. I've asked for
>   this, in order to reproduce locally.
>
> > Best regards, Riccardo
>
> Best regards, Michael.
>
debug_tramp_ssh_erre_remote_lsp_texlab.log (text/x-log, 115.8 KB) - not displayed
my-specific-init.el (text/x-emacs-lisp, 1.9 KB)
(require 'tramp)
(setq tramp-verbose 6)


;; used to load LSP without errors
(add-to-list 'load-path "/home/r/.emacs.d/layers/+tools/lsp")
(add-to-list 'load-path "/home/r/.emacs.d/elpa/29.2/develop/lsp-mode-20240116.1748")
(add-to-list 'load-path "/home/r/.emacs.d/elpa/29.2/develop/dash-20240103.1301")
(add-to-list 'load-path "/home/r/.emacs.d/elpa/29.2/develop/f-20231219.750")
(add-to-list 'load-path "/home/r/.emacs.d/elpa/29.2/develop/s-20220902.1511")
(add-to-list 'load-path "/home/r/.emacs.d/elpa/29.2/develop/ht-20230703.558")
(add-to-list 'load-path "/home/r/.emacs.d/elpa/29.2/develop/lv-20200507.1518")
(add-to-list 'load-path "/home/r/.emacs.d/elpa/29.2/develop/markdown-mode-20240107.831")
(add-to-list 'load-path "/home/r/.emacs.d/elpa/29.2/develop/spinner-1.7.4")
(add-to-list 'load-path "/home/r/.emacs.d/elpa/29.2/develop/lsp-latex-20231104.313")
(add-to-list 'load-path "/home/r/.emacs.d/elpa/29.2/develop/consult-20240127.1420")
(add-to-list 'load-path "/home/r/.emacs.d/elpa/29.2/develop/compat-29.1.4.4")
(require 'lsp-mode)


(with-eval-after-load "tramp" (add-to-list 'tramp-remote-path "~/.cargo/bin"))


(setenv "PATH" (concat (getenv "PATH") ":~/.cargo/bin/"))
;;  (setq exec-path (append exec-path '("~/.cargo/bin/")))
(setq exec-path (cons "~/.cargo/bin/" exec-path))

(setenv "PATH" (concat (getenv "PATH") ":/ssh:cism@erre:/home/cism/.cargo/bin/"))
(setq exec-path (append exec-path '("/ssh:cism@erre:/home/cism/.cargo/bin/")))


;; (add-to-list 'load-path "/home/r/.cargo/bin/")
(require 'lsp-latex)
;; "texlab" executable must be located at a directory contained in `exec-path'.
;; If you want to put "texlab" somewhere else,
;; you can specify the path to "texlab" as follows:
;; (setq lsp-latex-texlab-executable "/home/r/.cargo/bin/")
(setq lsp-latex-texlab-executable "~/.cargo/bin/")

(with-eval-after-load "tex-mode"
  (add-hook 'tex-mode-hook 'lsp)
  (add-hook 'latex-mode-hook 'lsp))
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.