[jedit:plugin-central-submission] #1076 LSP

Damien via jEdit-devel <[email protected]> Fri, 08 Sep 2023 03:01:42 -0000
Newsgroups gmane.editors.jedit.devel
Message-ID </p/jedit/plugin-central-submission/1076/3ffe362681066e8a995f6a88415f14168d2a948d.plugin-central-submission@jedit.p.sourceforge.net>
I just pushed a few updates to `master` that should help reduce the pylsp errors you were seeing.

Originally, the plugin's handling of "watched files" was very simple, since it worked with the servers I was testing with (eclipse.jdt.ls and gopls). Basically, jEdit would cast a wide net and send all buffer updates to all servers. In those cases, it seems like the servers simply treat that as a no-op, but pylsp instead reports an error.

The more _correct_ solution, and the one that I just pushed, is to actually pay attention to the didChangeWatchedFiles configuration pushed by the server. This is used to tell the client which files the server is interested in, so we can avoid notifying a server about files that it doesn't care about.

I also reduced the scope of what jEdit reports to a running server as opened or closed. When the server starts, it looks up the project root from Project Viewer, and any files opened outside of that project's root are ignored. Technically, jEdit should support running multiple instances of a single server based on that root (i.e. so you can have two different Java projects open, and jEdit will only notify a server of changes to the files that belong to its project), but that's what I consider an "eventual" feature.


---

**[plugin-central-submission:#1076] LSP**

**Status:** open
**Group:** None
**Created:** Wed Jun 14, 2023 02:09 AM UTC by Damien
**Last Updated:** Sun Sep 03, 2023 02:17 PM UTC
**Owner:** nobody


**Announcement:** Initial Plugin Central release
**Name:** LSP
**Version:** 0.1

**Requirements:**
    - JDK 11
    - jEdit 5.5.0
    - plugin: ErrorList 2.4.0
    - plugin: SideKick 1.8
    - plugin: ProjectViewer 3.6
    - bundled library: org.eclipse.lsp4j 0.18.0
    - bundled library: org.eclipse.lsp4j.jsonrpc 0.18.0
    - bundled library: org.eclipse.xtext.xbase.lib 2.28.0
    - bundled library: gson 2.9.1
    - bundled library: guava 31.1-jre
    - bundled library: commonmark 0.20.0
    - bundled library: commons-compress 1.23.0

All bundled libraries are downloaded from Maven Central using Ivy.

**Source Code:** https://git.sr.ht/~damien/jedit-lsp/tree/v0.1

**Short Description:** This plugin turns jEdit into a Language Server Protocol (LSP) client, which provides a number of IDE-like features by running and interacting with LSP servers.

**Long Description:**
~~~
<html>
        <p>This plugin turns jEdit into a Language Server Protocol (LSP) client, which provides a number of IDE-like features by running and interacting with LSP servers.</p>
        <p>For more information on the protocol, see: https://microsoft.github.io/language-server-protocol/</p>
        <p>To see a list of available LSP servers, see: https://microsoft.github.io/language-server-protocol/implementors/servers/</p>
        <p>The LSP protocol supports many, many features, and this plugin only implements a tiny subset of them. Support for more can be added easily, limited primarily by time and effort.</p>
</html>
~~~


---

Sent from sourceforge.net because [email protected] is subscribed to https://sourceforge.net/p/jedit/plugin-central-submission/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/jedit/admin/plugin-central-submission/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.

-- 
-----------------------------------------------
jEdit Developers' List
[email protected]
https://lists.sourceforge.net/lists/listinfo/jedit-devel