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:53:06 +0200 Message-ID: <87mtegcjhh.fsf@gmail.com> References: <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="14047"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.6.11; emacs 28.1 Cc: help-gnu-emacs@gnu.org To: Filipp Gunbin Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jun 14 00:00:36 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 1o0s6u-0003W9-9x for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 14 Jun 2022 00:00:36 +0200 Original-Received: from localhost ([::1]:46346 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o0s6s-0007eK-Ih for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 13 Jun 2022 18:00:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51762) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o0s6I-0007dp-K6 for help-gnu-emacs@gnu.org; Mon, 13 Jun 2022 17:59:58 -0400 Original-Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]:39810) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o0s6H-0005tB-2L for help-gnu-emacs@gnu.org; Mon, 13 Jun 2022 17:59:58 -0400 Original-Received: by mail-ed1-x533.google.com with SMTP id v25so9051910eda.6 for ; Mon, 13 Jun 2022 14:59:56 -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; bh=MQG+ougq9Aju8MfQngSkxgJD9kTeufeqt5y/yguMPhc=; b=d0E5mxBXH5trvpjpltCA93xBvoU+u6EDfJVwW4FHWk37LF56rDhKNBgehaLlT53bGU Nwrkk7ERoXzAWvuV4VmVCnGSUAXAIJdKtz41cOo4AgR1cm8MF+MuNAIz7jTEdYQorny6 i5DXuFhE8kmlxZR0nVIBlEYjPdCEU4ME59Ov02wcOSece6z8jr9FENiz8LKJ2vfLI82N GyQ73xYwRSaRUENBVGFguDV82tcHqRnVvd7LFOiO1lSu6z+JxZj0PPkAon1YhuTs/UFc RfqHbJSCc8/TEaQmFDYjzxNaQk6y1N/6n1GzKOPTGbVQJRkQjExkv+2jId2PUhcfCXO/ +vcw== 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; bh=MQG+ougq9Aju8MfQngSkxgJD9kTeufeqt5y/yguMPhc=; b=ZJRUd7LEetOxASYTv2uYBbz1sSbWL7Uf8k7tWDvuxSYygUC90JUlFc21KPWob93jSt T9LOyMqRsylmRsl0ni5HHNH+9j7vMvPQaKtbTk8gWKvbz7GbUtBJLalr1ZzOUEh7+/sq hBxi5LqiK88erxrsPXklRBMWbY5limAgq/zRrDuGwCHlubwueZu1e1DVhOuvgg10/hmE basOl/gZPCC/Qbc9QJICNU9PTrP3NMkD4ArQB67+4KCyblgtexgk9n/LjHwtjl1k6ivb +El7k8LTA9Fuo5+UCTXRF3nD/y1yngnce7RuOBpLrzrC82AIv1TUdPC2D5SnJtK2cn3n ullg== X-Gm-Message-State: AOAM531WiTmhCyajKzATAmrpnMeEp00Pmy9KOjrtyeGu/0g0dEJjZc2D 2hgdS0oUigGtPmczg8AlVu6qbHZH2Vk= X-Google-Smtp-Source: AGRyM1uIzN6qvK6aQmqBoX9WAAhBW0ViXCjs1/wMcK07Fg9snBiYhj1jIFIRyO/K0mDa71qEsr4evQ== X-Received: by 2002:a05:6402:1857:b0:42d:bcd6:3a88 with SMTP id v23-20020a056402185700b0042dbcd63a88mr2226553edy.6.1655157595596; Mon, 13 Jun 2022 14:59:55 -0700 (PDT) Original-Received: from commodoroII (2-235-154-9.ip228.fastwebnet.it. [2.235.154.9]) by smtp.gmail.com with ESMTPSA id o18-20020aa7c7d2000000b004335e08d6c9sm5720283eds.33.2022.06.13.14.59.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jun 2022 14:59:55 -0700 (PDT) In-reply-to: Received-SPF: pass client-ip=2a00:1450:4864:20::533; envelope-from=alessandro.bertulli96@gmail.com; helo=mail-ed1-x533.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:137815 Archived-At: Filipp Gunbin writes: > That seems to be true. There're very few of us. Indeed > > I use my package javaimp (http://elpa.gnu.org/packages/javaimp.html), > it's limited in functionality, but it fits my needs. > > Current version knows about the project structure and dependencies (from > Maven or Gradle), assists with completion in imports, and implements > imenu better than cc-mode. Next version is almost ready, it has > improved parsing (for imenu and other stuff), limited xref support > (finding a definition should work), navigation functions, and a minor > mode to enable all that. Uhm, interesting! I suppose it's a completely stand-alone package, independent from LSP? > Next, I plan to add support for debugging via gud (I already have the > dependencies info), REPL via jshell (jdk 11), and perhaps implement > indentation (this will remove dependency on cc-mode). However, I don't > know when I'll be able to complete all this. I have experimented with GUD/RealGUD, but honestly it didn't click in to me. I felt natural with gdb, but to me the GUD interface with other debuggers is not as standard as it should be. Let me know if I am naive here, but: if I can't use the same commands in every debugger, then whats the point? Do you feel good with GUD? Did you have to do any special configuration? > I don't intend to work on good font-lock support, because I don't use it > myself, and it would require full source parsing, which is better done > with treesitter (there's ongoing work on treesitter integration into > Emacs, hopefully we'll see it soon). Also, clever source completion is > also not in my plan: for that, you need a compiler, via lsp or directly. Yap, I don't know treesitter but I suspect it may be an useful integration also to solve this problem. Unfortunately, completion is one of the thing that I find very useful (especially when exploring a new codebase/library/framework, having type-checked completion is really like having a guide, and it reduces basic, dumb errors) Alessandro