[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Questions Regarding LSP Mode For Emacs

From: Óscar Fuentes
Subject: Re: Questions Regarding LSP Mode For Emacs
Date: Tue, 11 Jan 2022 20:27:19 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

"Samuel Banya" <> writes:

> I have been trying to incorporate LSP Mode for Emacs to work both on
> my Linux computers, and my work based Macbook Pro.
> The problem is that I don't really see any of the related modes
> actually working, so I'm wondering if anyone could provide some
> related advice on how to set up LSP mode easily.

> #+begin_src emacs-lisp
>   (use-package lsp-mode
>     :ensure t
>     ;; Taken from this page:
>     ;;
>     :hook
>     ;; List of modes taken from here:
>     ;;
>     ((js-mode
>       js-jsx-mode
>       typescript-mode
>       web-mode
>       python-mode
>       ruby-mode
>       C++-mode
>       java-mode
>       php-mode
>       elixir-mode
>       go-mode
>       csharp-mode))
>     :config
>     ;; Set 'lsp-idle-delay' to 0.5 seconds for quick autocompletion
>     (setq lsp-idle-delay 0.5)
>     ;; Set the 'lsp-server-install-dir' variable so that lsp servers are 
> installed in ~/.emacs.d: 
>     (setq lsp-server-install-dir (concat user-emacs-directory "lsp-servers")))
> #+end_src

I think your use-package is wrong. lsp-mode has an specific entry point
and use-package needs to be told about that fact. See

I also suggest trying with something simpler than Java to see check that
lsp-mode works. Python looks like a good candidate.

Also ensure the language server is correctly installed. Follow the link
at the end of that page for instructions.

In this case, copy-&-pasting random code from the 'net is not a good
approach. Lsp-mode is well documented, you will save time by following
its instructions.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]