From: Filipp Gunbin <fgunbin@fastmail.fm>
To: Alessandro Bertulli <alessandro.bertulli96@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Editing Java (with LSP)
Date: Tue, 14 Jun 2022 22:12:00 +0300 [thread overview]
Message-ID: <m2sfo75abj.fsf@fastmail.fm> (raw)
In-Reply-To: <87mtegcjhh.fsf@gmail.com> (Alessandro Bertulli's message of "Mon, 13 Jun 2022 23:53:06 +0200")
On 13/06/2022 23:53 +0200, Alessandro Bertulli wrote:
> Filipp Gunbin <fgunbin@fastmail.fm> 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?
Yes, it's independent from LSP.
It depends on Maven / Gradle to provide dependency and classpath info,
but invokes them as commands.
>> 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?
I think the point is in integration of command-line debugger (jdb in
case of Java) with source files in Emacs buffers.
> Do you feel good with GUD? Did you have to do any special
> configuration?
I haven't used gud for a long time now. And back then, I only checked
it works. Without automagical feeding it with project sources /
classpath, it's almost useless, and I certainly wouldn't do that by
hand...
>> 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)
Tree-sitter is an efficient parser library, see
https://tree-sitter.github.io/tree-sitter/. However, for good
completion, I suspect you'd still have to resort to LSP.
Filipp
next prev parent reply other threads:[~2022-06-14 19:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-13 13:43 Editing Java (with LSP) Alessandro Bertulli
2022-06-13 15:48 ` Filipp Gunbin
2022-06-13 21:53 ` Alessandro Bertulli
2022-06-14 19:12 ` Filipp Gunbin [this message]
2022-06-13 20:32 ` Milan Zamazal
2022-06-16 3:29 ` Pankaj Jangid
2022-06-16 13:34 ` Alessandro Bertulli
2022-06-17 3:27 ` Pankaj Jangid
-- strict thread matches above, loose matches on Subject: below --
2022-06-13 21:35 Alessandro Bertulli
2022-06-14 19:13 ` Milan Zamazal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2sfo75abj.fsf@fastmail.fm \
--to=fgunbin@fastmail.fm \
--cc=alessandro.bertulli96@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).