From: "Samuel Banya" <sbanya@fastmail.com>
To: "Emanuel Berg" <help-gnu-emacs@gnu.org>
Subject: Re: Questions Regarding LSP Mode For Emacs
Date: Tue, 11 Jan 2022 14:03:30 -0500 [thread overview]
Message-ID: <845513b3-5493-4f1e-a9ba-434c345cabf4@www.fastmail.com> (raw)
In-Reply-To: <08c15f07-49ed-4ca2-bfd2-7f49845517eb@www.fastmail.com>
I have since tried to go through the System Crafters video on the topic ("https://www.youtube.com/watch?v=E-NAM9U5JYE").
I have modified my config afterwards as well (https://git.musimatic.xyz/dotfiles/tree/emacs/.emacs.d/configuration.org), specifically these sections:
`*** Add 'lsp-mode' for better autocompletion for many programming languages (python, ruby, java, C++)`
`*** Add 'typescript-mode' for Typescript support for 'lsp-mode'`
`*** Add 'company' Mode for auto-completion in conjunction with 'lsp-mode'`
`*** Add 'company-box-mode' to have a better looking 'company' mode`
`*** Add 'lsp-java' for Java auto-completion`
On Tue, Jan 11, 2022, at 1:26 PM, Samuel Banya wrote:
> Hey there,
>
> 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.
>
> *NOTE: *
> * I wanted to stick all of the language servers into the '~/.emacs.d/' based directory since I don't want to have to search all over for them on a given machine to see if there are any issues.
> *
> *
> *This is a portion of my Emacs config on this topic, the entire config can be found here, '*https://git.musimatic.xyz/dotfiles/tree/emacs/.emacs.d/configuration.org*':*
> *** Add 'lsp-mode' for better autocompletion for many programming languages (python, ruby, java, C++)
> #+begin_src emacs-lisp
> (use-package lsp-mode
> :ensure t
> ;; Taken from this page:
> ;; https://www.mattduck.com/lsp-python-getting-started.html
> :hook
> ;; List of modes taken from here:
> ;; https://kb.iu.edu/d/acyg
> ((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
>
> *CONTINUED:*
> * The most specific example of it not working is with 'java' based files on the Macbook for example:
>
> *- This is to fix this error message when opening up a Java file in Emacs with 'lsp-mode':*
> #+begin_src text
> LSP :: There are no language servers supporting current mode `java-mode' registered with `lsp-mode'.
> This issue might be caused by:
> 1. The language you are trying to use does not have built-in support in `lsp-mode'. You must install the required support manually. Examples of this are `lsp-java' or `lsp-metals'.
> 2. The language server that you expect to run is not configured to run for major mode `java-mode'. You may check that by checking the `:major-modes' that are passed to `lsp-register-client'.
> 3. `lsp-mode' doesn't have any integration for the language behind `java-mode'. Refer to https://emacs-lsp.github.io/lsp-mode/page/languages and https://langserver.org/ .
> 4. You are over `tramp'. In this case follow https://emacs-lsp.github.io/lsp-mode/page/remote/.
> 5. You have disabled the `lsp-mode' clients for that file. (Check `lsp-enabled-clients' and `lsp-disabled-clients').
> Quit
> #+end_src
> - <2021-11-10 Wed 13:50>: Did this just now, but its complaining with this error:
> #+begin_src text
> File mode specification error: (error Autoloading file /Users/samuelbanya/.emacs.d/elpa/lsp-java-20211109.632/dap-java.elc failed to define function lsp-java)
> #+end_src
>
> *CONTINUED:*
> * If anyone could provide advice on this, I would appreciate it :)
> * My main goal would be to somehow get the following languages supported by LSP:
> * Python
> * Ruby
> * JS
> * Typescript
> * Bash
>
> Thanks,
>
> Sam
>
next prev parent reply other threads:[~2022-01-11 19:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-11 18:26 Questions Regarding LSP Mode For Emacs Samuel Banya
2022-01-11 19:03 ` Samuel Banya [this message]
2022-01-11 19:27 ` Óscar Fuentes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=845513b3-5493-4f1e-a9ba-434c345cabf4@www.fastmail.com \
--to=sbanya@fastmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.