From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alessandro Bertulli Newsgroups: gmane.emacs.help Subject: Re: Editing Java (with LSP) Date: Thu, 16 Jun 2022 15:34:04 +0200 Message-ID: <875yl0sp2p.fsf@gmail.com> References: <87k09ky8kc.fsf@gmail.com> <87pmj99tgw.fsf@codeisgreat.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28447"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.6.11; emacs 28.1 Cc: help-gnu-emacs@gnu.org To: Pankaj Jangid Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 16 15:43:17 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 1o1pmH-0007AK-19 for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 16 Jun 2022 15:43:17 +0200 Original-Received: from localhost ([::1]:33848 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o1pmF-0006VZ-Pe for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 16 Jun 2022 09:43:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57376) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o1pkh-0006UZ-BU for help-gnu-emacs@gnu.org; Thu, 16 Jun 2022 09:41:39 -0400 Original-Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]:45798) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o1pkf-0005NV-Nv for help-gnu-emacs@gnu.org; Thu, 16 Jun 2022 09:41:39 -0400 Original-Received: by mail-ej1-x636.google.com with SMTP id h23so2830605ejj.12 for ; Thu, 16 Jun 2022 06:41:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=references:user-agent:from:to:cc:subject:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=g1DygnkO41aEef0eh0sl6SU2keu6m9vbbyptDjMTEW4=; b=d4RxWt0LUcaXb1Z1rHrHjDTeoCBFPF7dDRPLmS/FVkdLv1VRSYcF/feXrDYilpmzH4 YV2ZmMK5rJzFmBcXLWeDG3GvCz4/3zILpirw0Y+2iUncb2q5gQC9acCuqDc+5e0ipXSr UlF/qzb4lbB7BAGCAO1EseyGiEUt2G0q/ivSvXkXSbVcft/Fe3ZrHJBvgYYlqBdDXmQK BCNSn8vYrANibfNgBHDZU02MQr+A2+6GQvclamVO23gXyriKbndV1fKml8Xyt400wzlh Oq7Xuk4RU9c5vGlghiv7vFCI1mS+pAdJop8PUIaLjd+j/AiC1Umej5HzIWbDDlOlqOtl aYig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:references:user-agent:from:to:cc:subject:date :in-reply-to:message-id:mime-version:content-transfer-encoding; bh=g1DygnkO41aEef0eh0sl6SU2keu6m9vbbyptDjMTEW4=; b=Ncw9P4XsH/yrNjp5r/ssCPfmIaWHQH67wuIX8e6BcqRKabgYPwDxd0cn2gKZ4AwN1d vkk3ExixDL6xyYX1DX8N6rH34OEe7C7qgEX8k3ZryJgt4m04IJvTt4fI5THA1pf9nIPN Y6G/aVE1IV910c4dIjrRee8d8q9bJoGj1w6IqvLHymmn5R33WgqVfB7mNSq4jhhsFEEt ZCWFoSlKbDmEfBhIcSL1MH4XdlHcVoFx1qbDwpIAF8uaYuS2gSebaHF9z0mI+qiY+qJF WJY8OjDIxf2n2qHCCz40+mHH66Q5STKkPCRqZviWJF9o2hUuIz3Wxus4P3Z2d+a+hEcz o9aA== X-Gm-Message-State: AJIora+e9hIg7cm1TnlsqkQoeREiAKzIv6vkvjGcEUN9HUaY5xKKRq11 +EZuZU2rKRxYnQR/YsiXHHjsszgm8uY= X-Google-Smtp-Source: AGRyM1sCUFtO+p+OHJYv7UA2hjXV1nGlbfi0ttCEQ7SZsYYbsrA7g+DC5GOGDqUR3voI6Ihy2tGZTA== X-Received: by 2002:a17:906:3b87:b0:70d:3189:6aae with SMTP id u7-20020a1709063b8700b0070d31896aaemr4719656ejf.222.1655386895692; Thu, 16 Jun 2022 06:41:35 -0700 (PDT) Original-Received: from commodoroII (2-235-154-9.ip228.fastwebnet.it. [2.235.154.9]) by smtp.gmail.com with ESMTPSA id h20-20020a1709070b1400b006fe7d269db8sm786916ejl.104.2022.06.16.06.41.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jun 2022 06:41:35 -0700 (PDT) In-reply-to: <87pmj99tgw.fsf@codeisgreat.org> Received-SPF: pass client-ip=2a00:1450:4864:20::636; envelope-from=alessandro.bertulli96@gmail.com; helo=mail-ej1-x636.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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:137880 Archived-At: Pankaj Jangid writes: > I use eglot+eclipse.jdt.ls. There is a bit of struggle in setting this > up. For me, last time I tried eglot, the problem was making it work with dap-mode (which in turn iirc it's strictly coupled with lsp-mode). I really need a debugger when developing and I don't feel quite at home with GUD/RealGUD. > My setup is like this (assuming you have cloned eclipse.jdt.ls > repository inside ~/.emacs.d and built using =E2=80=98./mvnw clean packag= e=E2=80=99), Actually I simply set (setq lsp-java-jdt-download-url "https://download.eclipse.org/jdtls/snapshots/jdt-language-server-latest.ta= r.gz") and then I let lsp-mode download and build it. That's why I changed your code > (format > "find %s -name 'org.eclipse.equinox.launcher_*jar'" > (expand-file-name > "eclipse.jdt.ls/org.eclipse.jdt.ls.product/target/repository/plugi= ns" > user-emacs-directory)) to (format "find %s -name 'org.eclipse.equinox.launcher_*jar'" (expand-file-name ".cache/lsp/eclipse.jdt.ls/plugins" user-emacs-directory)) However, both with your code and with mine, now when I try to open a java file I get this error: Error in post-command-hook (#[0 "\303\304\301\242\305#\210\300\306.!\205.= =00r\211q\210 ?\205.=00\307\310\311 \")\207" [# (#0) eglot--managed-mode remove-hook post-command-hook nil buffer-live-p apply eglot--connect eglot--guess-contact] 4]): (file-missing "Searching for program" "No such file or directory" "jdtls") > Also I use =E2=80=98exec-path-from-shell=E2=80=99 package to setup PATHs = in GUI Emacs. Maybe this is part of the reason? Alessandro