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: Editing Java (with LSP) Date: Mon, 13 Jun 2022 15:43:46 +0200 Message-ID: <87k09ky8kc.fsf@gmail.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="38336"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.6.11; emacs 28.1 To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 13 15:57: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 1o0kZ0-0009oE-TR for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 13 Jun 2022 15:57:06 +0200 Original-Received: from localhost ([::1]:36836 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o0kYz-000124-Nw for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 13 Jun 2022 09:57:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37356) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o0kUk-0006sX-MY for help-gnu-emacs@gnu.org; Mon, 13 Jun 2022 09:52:43 -0400 Original-Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]:37715) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o0kUj-0000qu-8q for help-gnu-emacs@gnu.org; Mon, 13 Jun 2022 09:52:42 -0400 Original-Received: by mail-ed1-x535.google.com with SMTP id v19so7267228edd.4 for ; Mon, 13 Jun 2022 06:52:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=user-agent:from:to:subject:date:message-id:mime-version; bh=HCQw3bREuut1C+lWIElSBTZR06uBqYOZHbWkOav3naU=; b=jttKkE4jnXHTKjmj62ep6M9yo9JoOi7xcQV830X/KvniQMf3qVjx8iKjZxtTQWu2SB uOoFbK71507iQ598hMJprVMgqpnU13oYgdOls2d3mPtCs7J6+SJDpgg8DIQyELCWg5Xo 5G4NT5anaPxsaRASHitrwSqMwGtN/UCJkOj0bXn73qAZJVNaUZ5XqRT1F8vdoMhoDYP/ R7YEEba7UcGpVgkG1YWZec2UthcuSljeje2JZyH9Jw5/pdLJIfcbU9upCj1IRWH8Z05c na3pHOiaXmpdexVU6/rzU0SodmCgozCb4ytBbWa6serfKX29tZ06/XML5vXSTUfEU+5t ZV6w== 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:subject:date:message-id :mime-version; bh=HCQw3bREuut1C+lWIElSBTZR06uBqYOZHbWkOav3naU=; b=xt9amW23Qx+PfzpPCA0KlLxLaQn5bUxakBDi5Xdg+kv1UVr5YW6acyg+PWs3VK8iQr qpjMRPJLt8N/ll8KWS9kdkWmrykIozlnkg0t2TNfUC8uhjuLJ9CCnuPNk+eic1sxZvX2 hTPguST7aZYVjUf/p1w5UXA3tpnTqgpJQt/LxRrbwW1qjjHM9fqHcIHYDaMSXD+UWzzh ++BhS4RBSRZoxLLFR5xTPeonz+ul4LkPpQOxn59NSVG7QOd2tJqk8jJiDXGVJflNdOns S9wYYrNa2AeEW76uYbS8o9QpLQc2RG7ezyKz/NraTKkNouB0GPWlMx5KGDPWUwzmxonY XzqA== X-Gm-Message-State: AOAM533QQQtiN37B9Ix9bqkgT4cQM7+WXYQz6i97X3fCrGPWEedCHXB5 NF2szuxTuVoLtJZ36b7Qt8WZpzPkkpM= X-Google-Smtp-Source: ABdhPJyKb+StjgNZ3JqA/2kYbBi21puG0veTQm3qHvANSOfN1O671tqFHR8ET4VqgGil1haSlfyMsQ== X-Received: by 2002:a05:6402:350b:b0:42f:d079:647f with SMTP id b11-20020a056402350b00b0042fd079647fmr52381741edd.321.1655128359482; Mon, 13 Jun 2022 06:52:39 -0700 (PDT) Original-Received: from commodoroII (2-235-154-9.ip228.fastwebnet.it. [2.235.154.9]) by smtp.gmail.com with ESMTPSA id z14-20020a05640240ce00b0042dc8dd59c7sm5058034edb.51.2022.06.13.06.52.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jun 2022 06:52:39 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::535; envelope-from=alessandro.bertulli96@gmail.com; helo=mail-ed1-x535.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:137794 Archived-At: Hi all! I am struggling to instruct Emacs to properly assist me in writing Java code. Whereas using C/C++ was a breeze, Java simply seems to be more buggy. I explain: using the integrated server from lsp-mode seems to be broken. I partially resolved it by manually dowloading a (much) newer version of the server (which is jdtls). This seemed to solve part of the problems, but the experience is still buggy. Completion often is not triggered (not even by explicitly C-M-i), the server sometimes crashes, and when I modify the buffer I need to write it before error highlighting properly updates (for instance, if I modify a piece of code who had an error, that point on screen is still highlightd as an error, even if it's now in the middle of a word). Moreover, the indentation sometimes doesn't work. Now, it seems like: - I am one of the very, very few people on Earth using Emacs to write Java - I am the only one having problems. Can you please give me your feedback? Does any of you write Java code? How is it? Do you have the same problems too? If yes, have you found a solution? Do you use LSP? Or some other package? Note that my config is simply lsp-mode + lsp-java. Thanks in advance! Bertulli