LXTK is an open source toolkit for implementing language clients talking to language servers according to the Language Server Protocol (LSP). Currently, it targets Java and Eclipse IDE, and as such, sits between Eclipse LSP4J and Eclipse LSP4E in its abstraction level: it is built using LSP4J, while LSP4E could in theory have been built using LXTK. In other words, it provides a higher level of abstraction than LSP4J and more flexibility than LSP4E.
-
Object-oriented: Can be incrementally specialized in numerous ways to cater for different requirements.
-
Not opinionated: Provides a set of bricks combinable to a complete structure that is right for you.
-
API centric: Every aspect can be controlled, extended or replaced as needed, reliably.
-
Robust: Shown to be reliable and effective by being used in a widely distributed commercial product.
-
Fully dynamic: Support for dynamic capability registration built right into the core.
-
Integrated with Eclipse Handly: Can be used to build a handle-based model as a pillar for an Eclipse-based IDE.
-
Comes with realistic examples: Includes JSON and TypeScript sample editors.
LXTK provides client-side support for the following LSP features:
- Call Hierarchy
- Change Annotations
- Code Action
- Code Lens, including Code Lens Resolve
- Completion, including Completion Item Resolve
- Diagnostics, including Pull Requests for Document Diagnostics and Workspace Diagnostics
- Document Formatting, including Range Formatting
- Document Highlights
- Document Symbols
- Events for File Operations
- Find References
- Folding Range
- Go to Declaration
- Go to Definition
- Go to Implementation
- Go to Type Definition
- Hover
- Linked Editing
- Progress Support
- Rename, including Prepare Rename
- Semantic Tokens
- Signature Help
- Type Hierarchy
- Workspace Edit, including Resource Operations
- Workspace Folders
- Workspace Symbols, including Workspace Symbol Resolve
Currently, there are two main architectural layers in LXTK:
-
LXTK Core Framework
-
LXTK Integration for Eclipse (LX4E)
LXTK Core Framework (org.lxtk
bundle) is a Java class library for building
LSP clients. It is built on top of LSP4J. Rather than exposing LSP4J services
directly, LXTK provides its own service layer. This layer is somewhat similar
to the Extension API of Visual Studio Code, but is tailored specifically to LSP.
In particular, its API directly reuses protocol data types of LSP4J. The
Core Framework can be used in any Java-based client (Eclipse, IntelliJ, etc.)
LXTK Integration for Eclipse (LX4E) is subdivided into the Core layer
(org.lxtk.lx4e
bundle) and the UI layer (org.lxtk.lx4e.ui
bundle).
LX4E is not a tool, i.e. it does not provide a generic LSP client for Eclipse.
Instead, it provides a platform for building Eclipse-based development tools
using LSP-based services provided by the Core Framework. To that end, it extends
the Core Framework and integrates it with the Eclipse Platform. Although LX4E
can be used for building a generic LSP client for Eclipse, its main goal is to
facilitate tight integration of specific language servers in a full-featured
custom Eclipse-based IDE.
LX4E includes several examples (org.lxtk.lx4e.examples.*
bundles) that
demonstrate main aspects of its usage.
For additional information on how to use some of the features of LXTK Core Framework and LX4E, see FAQ.
For an overview of the API provided by LXTK Core Framework and LX4E, please see the Javadocs for the exported packages of the respective bundles.
-
Building: How to build LXTK locally.
-
Contributing: How to report bugs, set up a developer workspace, issue pull requests, etc.
-
Website: https://lxtk.org
-
Community Discussions: https://github.com/lxtk-org/lxtk/discussions
-
General Inquiries: info (at) lxtk.org
LXTK is licensed under the Eclipse Public License 2.0. See LICENSE for the full license text.