• Stars
    star
    322
  • Rank 130,398 (Top 3 %)
  • Language
    Kotlin
  • License
    MIT License
  • Created almost 7 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Exposes IntelliJ IDEA features through the Language Server Protocol.

intellij-lsp-server AppVeyor Build Status Travis CI Build Status

A plugin for IntelliJ IDEA that embeds a Language Server Protocol server, allowing other editors to use IntelliJ's features.

Requirements

  • IntelliJ IDEA 2018.1.1
    • Due to the way the plugin interacts with internal APIs, there currently isn't support for other versions of IDEA. If you're trying to use the plugin with Android Studio, note that the exact same Android support also exists in 2018.1.1.

Caveats

  • Alpha-quality, and probably really unstable.
  • Java and Kotlin are currently supported.
  • Editing in both IDEA and the LSP client at the same time isn't supported currently.
  • The server should work across any LSP client, but some nonstandard features (like using IntelliJ to build and run projects) are only implemented in the Emacs client.

Features

Code completion with snippet parameters

Snippet feature is provided by company-lsp.

Code completion with snippet parameters

Symbol usage highlighting

Highlights read/write usage.

Symbol usage highlighting

Find usages

Find usages

Go to definition

Can also find super method if available.

Go to definition

Go to implementation

Go to implementation

Diagnostics

Sideline view is provided by lsp-ui.

Diagnostics

Kotlin support

Kotlin support

Feature list

Name Method Emacs function
Workspace Symbols workspace/symbol βœ”οΈ xref-find-apropos
Execute Command workspace/executeCommand βœ”οΈ
Diagnostics textDocument/publishDiagnostics βœ”οΈ Used by lsp-ui.
Completion textDocument/completion βœ”οΈ complete-symbol
Hover textDocument/hover βœ”οΈ
Signature Help textDocument/signatureHelp ❌
Goto Definition textDocument/definition βœ”οΈ xref-find-definitions
Goto Type Definition textDocument/typeDefinition βœ”οΈ lsp-goto-type-definition
Goto Implementation textDocument/implementation βœ”οΈ lsp-goto-implementation
Find References textDocument/references βœ”οΈ xref-find-references
Document Highlights textDocument/documentHighlight βœ”οΈ
Document Symbols textDocument/documentSymbol βœ”οΈ imenu (with lsp-imenu)
Code Action textDocument/codeAction ❌
Code Lens textDocument/codeLens βœ”οΈ lsp-intellij-run-at-point
Document Formatting textDocument/formatting βœ”οΈ lsp-format-buffer
Document Range Formatting textDocument/rangeFormatting βœ”οΈ indent-region
Document on Type Formatting textDocument/onTypeFormatting ❌
Rename textDocument/rename ❌

Nonstandard features

Name Method Emacs function
Get Run Configurations idea/runConfigurations ↩️
Build Project idea/buildProject ↩️ lsp-intellij-build-project
Run Project idea/runProject ↩️ lsp-intellij-run-project
Indexing Started idea/indexStarted ⬅️
Indexing Ended idea/indexEnded ⬅️
Build Messages idea/buildMessages ⬅️
Build Finished idea/buildFinished ⬅️

Commands

Name Command Emacs function
Open Project Structure openProjectStructure lsp-intellij-open-project-structure
Open Run/Debug Configurations openRunConfigurations lsp-intellij-open-run-configurations
Toggle IDEA Editor Window toggleFrameVisibility lsp-intellij-toggle-frame-visibility

Installation

Trying it out

Run ./gradlew runIde in the repository's top level to open a testing instance of IDEA.

Installing the plugin

Run ./gradlew clean buildPlugin in the repository's top level to create the plugin distribution. In IDEA, go to File -> Settings... -> Plugins -> Install plugin from disk... and select the .zip file that was output inside build/distributions.

Usage

The server will start automatically on TCP port 8080 when the IDE is loaded. You can configure the project SDK inside IDEA before connecting your client or execute the Open Project Structure command in the client (lsp-intellij-open-project-structure in Emacs) to open the Project Structure window remotely.

To use the server with Emacs/Spacemacs, see the lsp-intellij repository.

Rationale

  • I didn't like the latency of eclim. eclim-mode in emacs has to start a new process to get results from the eclim daemon, which takes about 5 seconds per command on my Windows system.
  • The Eclipse Java language server doesn't support Java 7, but projects using it are supported in the latest IDEA.
  • Support for eclim on Windows has been removed.
  • Developer usage of Eclipse itself has fallen over the years.
  • The exact same server concept has already existed in the form of intellivim, but it supports Vim only through a custom protocol.

More Repositories

1

ElonaPlusCustom-GX

Elona+ variant based on Custom-G
ActionScript
136
star
2

OpenNefia

(Archived) Moddable engine reimplementation of the Japanese roguelike Elona.
Lua
115
star
3

oxidoc

A command line interface to Rust documentation
Rust
100
star
4

DroidRef

Android image reference board app for artists
Kotlin
75
star
5

lsp-intellij

Emacs client for lsp-intellij-server
Emacs Lisp
57
star
6

lsp-intellij-spacemacs

Spacemacs layer for intellij-lsp-server
Emacs Lisp
27
star
7

jikyuu

Estimate the amount of time spent working on a Git repository
Rust
25
star
8

caca-rs

Safe Rust wrapper for libcaca
Rust
4
star
9

janet-mode

Emacs mode for Janet (https://github.com/janet-lang/janet)
Emacs Lisp
4
star
10

semgrep.el

Semgrep support for Emacs
Emacs Lisp
4
star
11

waffle_osx

ι€šη§°γ€Œγ‚γ£γ΅γ‚‹γ€ AVG32-like scriptor
C++
4
star
12

plexfs

Mount a Plex library as a local filesystem (music only)
Rust
4
star
13

microhcl

C++14 header-only parser for HCL (Hashicorp Configuration Language)
C++
3
star
14

elona_server

[WORK IN PROGRESS] - Replacement chat server for Elona/Elona+
Python
3
star
15

downdraft

A writing timer for Emacs.
Emacs Lisp
3
star
16

adieu

AVG32 bytecode parser/disassembler
Rust
2
star
17

ikpose

TypeScript
2
star
18

borscht

Rust
2
star
19

szurupull

Import content on the web into szurubooru
Elixir
2
star
20

evergarden

Proxy a szurubooru instance as Danbooru 2 for mobile clients
Ruby
2
star
21

oomSESTepNC

AngelScript
2
star
22

josette

Rust
1
star
23

elona.dll

C
1
star
24

gdx-mixin-test

Kotlin
1
star
25

lua-aquestalk

CMake
1
star
26

to_booru

Converts URLs to Szurubooru uploads
Elixir
1
star
27

yeek

Rust
1
star
28

uguu

Uguu.
Rust
1
star
29

emacs.d

emacs dotfiles
Emacs Lisp
1
star
30

doom.d

Emacs Lisp
1
star
31

castile

Small test of LibGDX / OpenGL.
Java
1
star
32

teal-mode

Emacs major mode for editing Teal source code
Emacs Lisp
1
star
33

infinigen-rs

A system for serialization and management of infinite chunked terrain.
Rust
1
star
34

szurupull-android

Android app for szurupull
Kotlin
1
star
35

texture-atlas-rs

Texture atlases for Rust/Glium
Rust
1
star
36

eiwaji2

Japanese dictionary/lexer made with wxLua
Lua
1
star
37

realgud-mobdebug

Emacs Lisp
1
star
38

kotaro

A Lua library for rewriting Lua source code.
Lua
1
star
39

dotfiles

Shell
1
star
40

chroma

Chroma for ACM@UIUC
HTML
1
star
41

elona_variants

Elona variant timeline
Ruby
1
star
42

caca-rs-examples

[WIP] Examples for the libcaca Rust bindings
Rust
1
star
43

sabi

Rust
1
star
44

caca-sys

Low-level Rust bindings to libcaca
Rust
1
star