From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Samuel Banya" Newsgroups: gmane.emacs.help Subject: Re: Questions Regarding LSP Mode For Emacs Date: Tue, 11 Jan 2022 14:03:30 -0500 Message-ID: <845513b3-5493-4f1e-a9ba-434c345cabf4@www.fastmail.com> References: <08c15f07-49ed-4ca2-bfd2-7f49845517eb@www.fastmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16941"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Cyrus-JMAP/3.5.0-alpha0-4569-g891f756243-fm-20220111.001-g891f7562 To: "Emanuel Berg" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jan 11 20:23:08 2022 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n7Mjc-0004Fm-B2 for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 11 Jan 2022 20:23:08 +0100 Original-Received: from localhost ([::1]:49842 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n7Mja-00047f-SK for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 11 Jan 2022 14:23:07 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:34372) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n7MR2-00064f-Ax for help-gnu-emacs@gnu.org; Tue, 11 Jan 2022 14:03:59 -0500 Original-Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:35121) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n7MQz-0000df-Lh for help-gnu-emacs@gnu.org; Tue, 11 Jan 2022 14:03:56 -0500 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id D33E13202005 for ; Tue, 11 Jan 2022 14:03:51 -0500 (EST) Original-Received: from imap49 ([10.202.2.99]) by compute2.internal (MEProxy); Tue, 11 Jan 2022 14:03:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= mime-version:message-id:in-reply-to:references:date:from:to :subject:content-type; s=fm1; bh=/UUZOX0+oq9MLRwYYW407SVQwD0kVus 5B250E+iVkyo=; b=aZOWoh8rDP5lBHACl6u8m8Pa6t/vrYpWOKzJqWS5kLFwBF8 j37YMaek7WjHNoq7iXLdMJ7AeNZcCE+Zk3jvuAJmzT17KSNSMf6Zq4qQ+eAytbvY Cdu9AVKxhEvVxG/bdzU1t3EesjTrT9YoER18uzcEWCg1OKItEVi2MyqySbHEPZYM QELsmy7/vEmR7i3zK3dOjsh7+PO4JaYo2yqOgX33CMj8sIloSgcRjYchpGRr354w WTjDt5JnKR66gHZof1YKbLCaYUNxhHZ+2rDQD290/MrBw6MdHx0Y38VGlTzT2E7G +Fv2Ur4hAHLkUbIkE/QcICmdbjIooxqutRe8jdQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=/UUZOX 0+oq9MLRwYYW407SVQwD0kVus5B250E+iVkyo=; b=O8UhhakoRN1czJvZ+wUaRY OGKhODcsi23Vx8p8bunjKZ9tu6rjrT+g+GbEanVX100/++tCgNIimS0GOPllsMpk p5PjmGshpeuzpJURUrhgLavFUN4QkIr2bx03qCu0gkTaSMHT9Q4e0BDSxvto/nWF aBVaC21EBeNh1m4jTceoqvScC4nfm3pqjjqpwIM3a23BFwtDuyTlqe/dgTelOgNG RwWHvaVg26v9wDm0KKlWc5DegmxYBVPnFiN+gtYtJvLU4zwGiwnGAnm/ic7BzHFL d0hIHQ+Msko5ZGD6UMxa+vhyKagotN4hjeYiCKsn+nnYP0/Q2saAwjNzZ7+llOiw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrudehfedguddvtdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecuogfuuhhsphgvtghtffhomhgrihhnucdlgeelmd enfghrlhcuvffnffculddugedmnecujfgurhepofgfggfkjghffffhvffutgesrgdtreer reertdenucfhrhhomhepfdfurghmuhgvlhcuuegrnhihrgdfuceoshgsrghnhigrsehfrg hsthhmrghilhdrtghomheqnecuggftrfgrthhtvghrnhepudevveegfeehheeuiefhleet vefhgfekvdeugffhudffleefgfffueffueelhfeunecuffhomhgrihhnpeihohhuthhusg gvrdgtohhmpdhmuhhsihhmrghtihgtrdighiiipdgtohhnfhhighhurhgrthhiohhnrdho rhhgpdhmrghtthguuhgtkhdrtghomhdpihhurdgvughupdhgihhthhhusgdrihhopdhlrg hnghhsvghrvhgvrhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhep mhgrihhlfhhrohhmpehssggrnhihrgesfhgrshhtmhgrihhlrdgtohhm X-ME-Proxy: Original-Received: by mailuser.nyi.internal (Postfix, from userid 501) id 36FACF60075; Tue, 11 Jan 2022 14:03:51 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface In-Reply-To: <08c15f07-49ed-4ca2-bfd2-7f49845517eb@www.fastmail.com> Received-SPF: pass client-ip=64.147.123.21; envelope-from=sbanya@fastmail.com; helo=wout5-smtp.messagingengine.com X-Spam_score_int: -8 X-Spam_score: -0.9 X-Spam_bar: / X-Spam_report: (-0.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, PDS_OTHER_BAD_TLD=1.851, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:135217 Archived-At: 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 >