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: Mon, 13 Jun 2022 23:35:41 +0200 Message-ID: <87r13scjve.fsf@gmail.com> 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="14950"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.6.11; emacs 28.1 Cc: help-gnu-emacs@gnu.org To: pdm@zamazal.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 13 23:52:06 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 1o0rye-0003ck-WB for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 13 Jun 2022 23:52:05 +0200 Original-Received: from localhost ([::1]:42740 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o0ryd-0003TL-KT for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 13 Jun 2022 17:52:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50414) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o0ryE-0003Sn-33 for help-gnu-emacs@gnu.org; Mon, 13 Jun 2022 17:51:38 -0400 Original-Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]:46628) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o0ryC-000502-DK for help-gnu-emacs@gnu.org; Mon, 13 Jun 2022 17:51:37 -0400 Original-Received: by mail-ej1-x62c.google.com with SMTP id v1so13542979ejg.13 for ; Mon, 13 Jun 2022 14:51:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=user-agent:from:to:cc:subject:in-reply-to:date:importance :message-id:mime-version:content-transfer-encoding; bh=AOr9EcUqWh2yT1zJAz+JvhpWJ0EK4EuTT5D501JCcAs=; b=MNiWoyyG473rUpZeIxx6RY1SqeA27jxBF4BD6I7FWp1ali7xjZfOpOyFEMrhbiAb0w sPlr+8vYeSvR6SIn+Lrza0TmMrv6FN2tSJQTmGgVSYovqiMDVJBS8XViCR03Ip3PAsi0 WAVLjGIkgoN6q9zT5PapBX+fsTGRB7n1PXVv2ucObUOKN4ZA+mDBmfv0K3n18+PFvy9O qJV41z1u4066iU3qjy2zxJYboqnyAJjbjNg3Qi/1QSKTUwJl3ReRevmY5A6VX68Rll5+ aLhhmjio4uFynKXzi46AK40cgQsdwtm4j6+RFU1JBcmyV1br9LIpup7JsTogh/f2Ptu4 DZXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:user-agent:from:to:cc:subject:in-reply-to:date :importance:message-id:mime-version:content-transfer-encoding; bh=AOr9EcUqWh2yT1zJAz+JvhpWJ0EK4EuTT5D501JCcAs=; b=ip+VfagI8FLxcHM4MMDY3e9KsjLjmtX6fWWsvDrMLnI+bO2duXK2ToAr/kL8t4j6Ds /kpFr/sFt0FLhUPgLiNXN9m55wGdBDiCJ4uoVw64i2pn2c0MaLZ1OS73/40N/OuXJmkO 9brw7ReF6FWJc+Y2s32T6AZSb0YL2NBvok/i+bOwzXR42NmGastU9O00q6y4OfR7db9T 9Di/5upjVRXIlzdYOO6dDSIi7rfB1ET70Y2C4VpyrqkS7PNk8L3Y6PuKqf0kJfWwV4dD zKB1QnvQmaljoEY5WFOg0LS+4HoOymEF6iPGfoFu7XZUC9z1/9GSMsc0fI34AqJBA4A6 lngg== X-Gm-Message-State: AOAM533rAc5m3IWMfyjCZVkAxOqxNwSHBKuSULo+4KZORgQBCOouE/Pt inNPiFRknfXb1AH0C/grVen1QtwVV2E= X-Google-Smtp-Source: ABdhPJybqoq8HxZhvQZh0ZWj5ID/+NyQqS1SEGg3d7B3z7rZqQRtaw2lS+iWlN4qkoCOofNyXYI+sg== X-Received: by 2002:a17:907:3e04:b0:6f5:1132:59de with SMTP id hp4-20020a1709073e0400b006f5113259demr1556275ejc.755.1655157094588; Mon, 13 Jun 2022 14:51:34 -0700 (PDT) Original-Received: from commodoroII (2-235-154-9.ip228.fastwebnet.it. [2.235.154.9]) by smtp.gmail.com with ESMTPSA id d2-20020aa7d5c2000000b0042dd630eb2csm5639555eds.96.2022.06.13.14.51.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jun 2022 14:51:34 -0700 (PDT) In-Reply-To: 87bkuw5mp4.fsf@zamazal.org Importance: normal Received-SPF: pass client-ip=2a00:1450:4864:20::62c; envelope-from=alessandro.bertulli96@gmail.com; helo=mail-ej1-x62c.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:137814 Archived-At: Thanks! > I use lsp-mode relatively successfully to work on a Java project with > ~9000 *.java files (https://github.com/oVirt/ovirt-engine). I find it > easier than using lsp-mode with C because no special compiler > arrangements are needed, it works itself. Good to hear that, it means it is usable. By the way, which system are you on? I'm currently using Arch (non meme intended) and I suspect my system can be buggy by misconfiguration. > I needn=E2=80=99t to use anything > else. The only special configuration I use is >=20 > (setq lsp-java-vmargs > '("-noverify" "-Xmx4G" "-XX:+UseG1GC" > "-XX:+UseStringDeduplication")) >=20 > but I can=E2=80=99t recall why it is needed. Thanks, I'll investigate those settings. >>From time to time, I experience similar symptoms like those you > describe. In such a case, I delete ~/.emacs.d/.cache and > ~/.emacs.d/eclipse.jdt.ls. Then it fetches jdtls, reindexes the project > and starts working fine again. I figured out that, apparently, a simple M-x lsp-workspace-restart is sufficient. Meaning that it seems that it is the server that crashes, so restarting it solves the problem. Of course, it is not normal it crashes so often, but anyway. > OTOH, dap-mode works much worse and I cannot use it for Java debugging. > IIRC the most annoying thing was collapsing expanded data structures all > the time, making practically impossible watching what happens with data. > And the overall functionality was limited due to inability to work well > with the given maven definitions. I use IntelliJ IDEA for debugging, > which works perfectly. Uhm, for me dap-mode (SEEMS to) work well, but to be honest I haven't had the need to investigate deep data structures yet. In case, I'll use IntelliJ, it'll simply means that Emacs is not ready yet to be used for Java editing. Which I think it's a shame, because I think it has the potentiality to do so. Anyway, right now I think it's pretty standard opinion that IntelliJ IS the de-facto editor for Java, and it's the flagship of JetBrains. Alessandro