public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
* language server protocol for Kawa
@ 2018-01-12 22:04 Per Bothner
  2018-01-12 22:32 ` Duncan Mak
  2018-01-14 20:07 ` Helmut Eller
  0 siblings, 2 replies; 5+ messages in thread
From: Per Bothner @ 2018-01-12 22:04 UTC (permalink / raw)
  To: Kawa mailing list

Has anyone done any work for a Language Server Protocol
(https://langserver.org/) for Kawa? Any insights or partial code?

I ask because I'm getting ready to jump into this as the next major
project for Kawa.

(I do have one non-trivial bug It want to resolve first:
GitLab issue #33 and Savannah bug #52390, which are probably both related to
the fix for issue #11).
-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: language server protocol for Kawa
  2018-01-12 22:04 language server protocol for Kawa Per Bothner
@ 2018-01-12 22:32 ` Duncan Mak
  2018-01-13  0:59   ` Per Bothner
  2018-01-14 20:07 ` Helmut Eller
  1 sibling, 1 reply; 5+ messages in thread
From: Duncan Mak @ 2018-01-12 22:32 UTC (permalink / raw)
  To: Per Bothner; +Cc: Kawa mailing list

Hello Per,

i started doing this a few months ago, but I didn't get very far at all.

Perhaps it's because of how I tried to do it - I looked at
https://github.com/palantir/language-servers and
https://github.com/eclipse/lsp4j and tried to implement the
LanguageClientAware and LanguageServer interfaces.

The Groovy implementation is here -
https://github.com/palantir/language-servers/blob/develop/groovy-language-server/src/main/java/com/palantir/ls/groovy/GroovyLanguageServer.java

It was difficult to know if I'm making progress, because it seemed
like all the things needed to come together all at the same time.

If you're jumping into working on an LSP implementation, I'd love to
contribute on GitLab if you can post issues with tasks for others to
complete.



Duncan.

On Fri, Jan 12, 2018 at 5:04 PM, Per Bothner <per@bothner.com> wrote:
> Has anyone done any work for a Language Server Protocol
> (https://langserver.org/) for Kawa? Any insights or partial code?
>
> I ask because I'm getting ready to jump into this as the next major
> project for Kawa.
>
> (I do have one non-trivial bug It want to resolve first:
> GitLab issue #33 and Savannah bug #52390, which are probably both related to
> the fix for issue #11).
> --
>         --Per Bothner
> per@bothner.com   http://per.bothner.com/



-- 
Duncan.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: language server protocol for Kawa
  2018-01-12 22:32 ` Duncan Mak
@ 2018-01-13  0:59   ` Per Bothner
  0 siblings, 0 replies; 5+ messages in thread
From: Per Bothner @ 2018-01-13  0:59 UTC (permalink / raw)
  To: Duncan Mak; +Cc: Kawa mailing list

On 01/12/2018 02:31 PM, Duncan Mak wrote:
> It was difficult to know if I'm making progress, because it seemed
> like all the things needed to come together all at the same time.
> 
> If you're jumping into working on an LSP implementation, I'd love to
> contribute on GitLab if you can post issues with tasks for others to
> complete.

That's why I think I need to do at least a bare-bones implementation,
since I have the Kawa big-picture.  Once I have *something* working,
then asking for help makes sense.
-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: language server protocol for Kawa
  2018-01-12 22:04 language server protocol for Kawa Per Bothner
  2018-01-12 22:32 ` Duncan Mak
@ 2018-01-14 20:07 ` Helmut Eller
  2018-01-14 20:35   ` Per Bothner
  1 sibling, 1 reply; 5+ messages in thread
From: Helmut Eller @ 2018-01-14 20:07 UTC (permalink / raw)
  To: kawa

On Fri, Jan 12 2018, Per Bothner wrote:

> Has anyone done any work for a Language Server Protocol
> (https://langserver.org/) for Kawa? Any insights or partial code?

Just some thoughts:

- For Kawa's Java code I'm using the Emacs lsp-mode as client and
Eclipse's jdt-server.  While I wouldn't call that combo great, it
certainly helps navigating the code.  (I'm still using make directly to
compile things.)

- It seems to me that an LSP server would like to have something like a
"project" file that lists the interesting source files, libraries etc.
I suppose plain Makefiles will not work so well for that; maybe Ant
files would work better.  Or maybe Kawa should have something like
Rust's Cargo.  My guess is that this will be an important design
decision.

Helmut

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: language server protocol for Kawa
  2018-01-14 20:07 ` Helmut Eller
@ 2018-01-14 20:35   ` Per Bothner
  0 siblings, 0 replies; 5+ messages in thread
From: Per Bothner @ 2018-01-14 20:35 UTC (permalink / raw)
  To: Helmut Eller, kawa

On 01/14/2018 12:07 PM, Helmut Eller wrote:
> - It seems to me that an LSP server would like to have something like a
> "project" file that lists the interesting source files, libraries etc.
> I suppose plain Makefiles will not work so well for that; maybe Ant
> files would work better.  Or maybe Kawa should have something like
> Rust's Cargo.  My guess is that this will be an important design
> decision.

Definitely things to ponder and research, which I have barely started on.

I would like to have good defaults, so at least basic syntax checking
(and syntax coloring) works even without a project file.  That is one
of the things I like about Emacs - you can edit a file without having
create a project containing the file.

I'd also like the server to be able to use import, module-name,
require, and define-library forms to find definitions.

However, in general one will want some kind of project file - for
example for compiler options or adding jar files to a classpath.
This is something I will need to study other servers for.

Scanning a Makefile for project properties doesn't seem like
it would be difficult - at least string-valued properties.
The Makefiles would have to follow certain conventions, just
like automake source files already do.
-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-01-14 20:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-12 22:04 language server protocol for Kawa Per Bothner
2018-01-12 22:32 ` Duncan Mak
2018-01-13  0:59   ` Per Bothner
2018-01-14 20:07 ` Helmut Eller
2018-01-14 20:35   ` Per Bothner

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).