Git Product home page Git Product logo

intellij-lsp-server's Introduction

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.

intellij-lsp-server's People

Contributors

kleewho avatar martskins avatar realark avatar ruin0x11 avatar tadfisher avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

intellij-lsp-server's Issues

Kotlin support

It would be very valuable to add Kotlin support, since all first-class Kotlin language support is currently contained within IDEs like IntelliJ. However, this is somewhat trickier than working on Java language features since

  • Kotlin uses tons of type inference, meaning a Kotlin PSI document might not have enough information on types, etc. without doing extra resolution
  • IntelliJ doesn't include docs or sources for its Kotlin plugin as part of the plugin SDK. They are available as part of the Kotlin repo, just not in the gradle-provided sources. This makes trying to debug and step into the Kotlin plugin code to get a feel for its behavior quite frustrating, and it isn't always clear why certain IDE features break when called from the LSP server.

But it would definitely be worth the challenge, to have a decent support for Kotlin code awareness outside an IDE for the first time. It would also allow self-hosting the development of the LSP plugin, to further guarantee its stability for more obscure use cases.

Support for renaming/moving files

There is currently nothing in the LSP specification for renaming/moving files, from looking at these issues: microsoft/language-server-protocol#272 microsoft/TypeScript#6487. It is apparently planned for version 4.0 of the spec, with the proposal here: microsoft/vscode-languageserver-node#295. Preferably this operation would not have to initiate a reindex of the project, since the way this would interfere with the current workspace implementation would be tricky to work out.

Fix Javadoc provider when documentation is not found

Getting documentation from a hover is broken in the case that no documentation is found, because the Javadoc provider assumes the documentation string is HTML and tries appending a message at the <body> tag. But in this case the HTML is stripped out for the purpose of the docstring fitting in one line, so the tag isn't found.

Support creating files

Creating files isn't feasible at the moment, because IDEA doesn't seem to reindex parent projects so the new file/class can be used in other submodules.

To fix this, logic could be added into WorkspaceManager for notifying IDEA's index that a file was added.

Docs to additional language support

Hi, I would like to add Scala support for this plugin as a pull request. I would appreciate if you could give some notes of what needs to be done in order to achieve that.

AssertionError when completing Kotlin

After creating a new Kotlin project and trying to edit text inside a function call, this error occurs.

Apr 20, 2018 12:30:50 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint fallbackResponseError
SEVERE: Internal error: java.lang.RuntimeException: java.lang.AssertionError: Assertion failed
java.util.concurrent.CompletionException: java.lang.RuntimeException: java.lang.AssertionError: Assertion failed
<...>
Caused by: java.lang.AssertionError: Assertion failed
	at org.jetbrains.kotlin.idea.completion.ToFromOriginalFileMapper.<init>(ToFromOriginalFileMapper.kt:48)
	at org.jetbrains.kotlin.idea.completion.ToFromOriginalFileMapper.<init>(ToFromOriginalFileMapper.kt:25)
	at org.jetbrains.kotlin.idea.completion.ToFromOriginalFileMapper$Companion.create(ToFromOriginalFileMapper.kt:34)
	at org.jetbrains.kotlin.idea.completion.KotlinCompletionContributor.performCompletion(KotlinCompletionContributor.kt:235)
	at org.jetbrains.kotlin.idea.completion.KotlinCompletionContributor.access$performCompletion(KotlinCompletionContributor.kt:47)
	at org.jetbrains.kotlin.idea.completion.KotlinCompletionContributor$provider$1.addCompletions(KotlinCompletionContributor.kt:58)
	at com.intellij.codeInsight.completion.CompletionProvider.addCompletionVariants(CompletionProvider.java:36)
	at com.intellij.codeInsight.completion.CompletionContributor.fillCompletionVariants(CompletionContributor.java:152)
	at com.ruin.lsp.commands.document.completion.CompletionCommandKt.getVariantsFromContributors(CompletionCommand.kt:102)
	at com.ruin.lsp.commands.document.completion.CompletionResultSetImpl.runRemainingContributors(CompletionResultSetImpl.kt:89)
<...>

It can be reproduced by creating a file with this code and typing some string literals:

fun main(args: Array<String>) {
    arrayOf(/*caret*/)
}

This error only happens when editing Kotlin. The main cause seems to be two references to PsiFiles in CompletionParameters having different lengths. It may be an issue of when the file referenced in the document is copied to insert the dummy identifier for completion purposes.

file-error make client process failed Connection refused

Hi there,

on all my projects (except a simple one with one java file), I now get:

File mode specification error: (file-error make client process failed Connection refused :name lsp-intellij TCP connection :buffer nil :host 127.0.0.1 :service 8080 :nowait nil)

The error seems strange since there's indeed an IDEA process listening on port 8080 on localhost:

# netstat -nlp | grep 8080
tcp6       0      0 127.0.0.1:8080          :::*                    LISTEN      16752/java

Process 16752 looks like the correct one.

$  ps ww -p 16752
  PID TTY      STAT   TIME COMMAND
16752 ?        Sl     1:54 /usr/lib/jvm/oracle-java8-jdk-amd64/bin/java -Didea.classpath.index.enabled=false -Didea.config.path=/usr/local/src/intellij-lsp-server/build/idea-sandbox/config -Didea.is.internal=true -Didea.platform.prefix=Idea -Didea.plugins.path=/usr/local/src/intellij-lsp-server/build/idea-sandbox/plugins -Didea.required.plugins.id=com.ruin.lsp -Didea.system.path=/usr/local/src/intellij-lsp-server/build/idea-sandbox/system -Dsun.awt.disablegrab=true -Xbootclasspath/a:/home/torstein/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/ideaIC/2017.3.4/9f9a05f798720d7da2e3b3af8983552a840ed5d4/ideaIC-2017.3.4/lib/boot.jar -XX:MaxPermSize=250m -Xms256m -Xmx512m -Dfile.encoding=UTF-8 -Duser.country=GB -Duser.language=en -Duser.variant -ea -cp /usr/lib/jvm/oracle-java8-jdk-amd64/lib/tools.jar:/home/torstein/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/ideaIC/2017.3.4/9f9a05f798720d7da2e3b3af8983552a840ed5d4/ideaIC-2017.3.4/lib/idea_rt.jar:/home/torstein/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/ideaIC/2017.3.4/9f9a05f798720d7da2e3b3af8983552a840ed5d4/ideaIC-2017.3.4/lib/idea.jar:/home/torstein/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/ideaIC/2017.3.4/9f9a05f798720d7da2e3b3af8983552a840ed5d4/ideaIC-2017.3.4/lib/bootstrap.jar:/home/torstein/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/ideaIC/2017.3.4/9f9a05f798720d7da2e3b3af8983552a840ed5d4/ideaIC-2017.3.4/lib/extensions.jar:/home/torstein/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/ideaIC/2017.3.4/9f9a05f798720d7da2e3b3af8983552a840ed5d4/ideaIC-2017.3.4/lib/util.jar:/home/torstein/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/ideaIC/2017.3.4/9f9a05f798720d7da2e3b3af8983552a840ed5d4/ideaIC-2017.3.4/lib/openapi.jar:/home/torstein/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/ideaIC/2017.3.4/9f9a05f798720d7da2e3b3af8983552a840ed5d4/ideaIC-2017.3.4/lib/trove4j.jar:/home/torstein/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/ideaIC/2017.3.4/9f9a05f798720d7da2e3b3af8983552a840ed5d4/ideaIC-2017.3.4/lib/jdom.jar:/home/torstein/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/ideaIC/2017.3.4/9f9a05f798720d7da2e3b3af8983552a840ed5d4/ideaIC-2017.3.4/lib/log4j.jar com.intellij.idea.Main

I've tried to restart the gradle process and emacs alike. Also tried to set up the project manually in IDEA (through gradle runIdea) to make sure there's no problem there, then stop the graphical IDEA and starting gralde runIde.

No error in the gradle console to be seen.

-Torstein

Use LSP version 3.6.0

Allows us to not have to use the nonstandard idea/implementations method. Would require using a snapshot version of lsp4j.

Document newlines change after switching git branches from magit

Leaving a buffer open while changing branches from magit causes linefeeds (^M) to become visible. May have to do with emacs' buffer coding not being applied when getting changes with a different kind of newline. Killing the buffer and reopening it restores the proper newline settings, so the file on disk would be the correct revision.

Error when opening a Java file: Not a directory

Hi there,

this looks like an awesome extension to Emacs. I'd love for this to work as I'm using IDEA for debugging and refactoring already.

However, my first attempts at getting this to work on a couple of my projects have been in vain. I'm getting this error when visiting a Java buffer:

File mode specification error: (file-error Opening directory Not a directory /home/torstein/src/my-project/my-core/src/main/java/net/skybert/Foo.java)

I do agree with the error message that the java file isn't a directory, but I don't see why it would think so. I've tried to start emacs with no configuration except the snippet below to rule out any problem in the rest of my Emacs configuration.

Is there something obvious I've missed out here?

-Torstein

(let ((default-directory "~/.emacs.d/elpa"))
  (normal-top-level-add-subdirs-to-load-path))

(require 'lsp-mode)
(require 'company-lsp)
(load "/usr/local/src/intellij-lsp-server/lsp-intellij.el")

(with-eval-after-load 'lsp-mode
  (require 'lsp-intellij)
  (add-hook 'java-mode-hook #'lsp-intellij-enable))

Versions

  • GNU Emacs 25.2.1
  • .emacs.d/elpa/lsp-mode-20180304.935
  • .emacs.d/elpa/company-lsp-20180216.2325
  • .emacs.d/elpa/company-20180225.1741

Support Linux

A bunch of things are breaking on Linux for some reason.

  • Document versions are always being mismatched.
  • Completions don't resolve, likely because of the version mismatches.
  • Various others.

Fails to resolve files in multi-module Maven repo

After IDEA indexes everything, opening a file in a nested Maven repo only takes into account the source directory of the nested repo, without the parent directories. This means the LSP server can't find any files in that directory.

Intellij Window closed on LSP connection

When I open a Java file in emacs, which causes the client to connect to the IDE, the IDE is closed immediately so I'm not able to use the debugger. The auto-completion in Emacs works well so the IDE is still alive but the Window is gone. I can see the process in details view but it doesn't appear on the Apps in Processes view.

Intellij prompts about files changed in disk

So I just installed this and it works great!

I'm having one small issue though, I'm using neovim + intellij (on OSx) and what I currently do to start working on a project is open intellij first, so it exposes the LSP server, and then open neovim.
All works great (completion and all), except after a few editions intellij will dissappear (but keep running) but ask me constantly about a changed file in disk.

I saw that the README states that editing in both IDEA and editor is not supported, but I'm not sure how to overcome this. Can the lsp server be run without opening intellij by itself? Is there some kind of headless mode I'm missing?

Any help is greatly appreciated.

spacemacs for intellij-lsp-server

Hi, thanks for your great work to involve this in emacs.
When I use your suggestion for spacemacs, I get the error cannot find lsp-intellij. I guess it might be the wrong names in your suggestion.

(defconst intellij-lsp-packages
  '(
    lsp-mode
    (lsp-intellij :location local)
    ))

(defun intellij-lsp/init-lsp-mode ()
  (use-package lsp-mode))

(defun intellij-lsp/init-lsp-intellij ()
  (with-eval-after-load 'lsp-mode
    (use-package lsp-intellij)
    (add-hook 'java-mode-hook #'lsp-intellij-enable)))

You mix the usage of intellij-lsp and lsp-intellij.

After unifying them as lsp-intellij, I get it works, i.e.,

(defconst lsp-intellij-packages
  '(
    lsp-mode
    (lsp-intellij :location local)
    lsp-ui
    company-lsp
    ))

(defun lsp-intellij/post-init-lsp-mode ()
  (use-package lsp-mode))

(defun lsp-intellij/init-lsp-intellij ()
  (with-eval-after-load 'lsp-mode
    (use-package lsp-intellij)
    (add-hook 'java-mode-hook #'lsp-intellij-enable)))

(defun lsp-intellij/post-init-lsp-ui ()
  (use-package lsp-ui))
(defun lsp-intellij/post-init-company-lsp ()
  (use-package company-lsp))

I use post-init-lsp-mode since otherwise emacs tells me two places use lsp-mode, and the last one is here. I also add lsp-ui and lsp-company-lsp here. But I am not familiar with spacemacs, so it might be not suitable in a long-run.

Migrate to 2018.1.1

Due to API changes, features like completion don't work in 2018.1.1. An additional test suite will have to be made somehow that compiles the plugin against various versions of the IntelliJ API to ensure this won't happen in the future.

Project frame hiding

I think the project frame should not be hidden away from the user as a default. Some users might think it's a bug (I did until I found the toggleProjectFrame function).

This seems like an easy fix, if it were to be done. I can definitely submit a PR about this if needed.

Linux builds require case-sensitive plugin names

(Arch) Linux builds appear to require case-sensitive plugin names.

~/workspace/intellij-lsp-server $ ./gradlew --no-daemon buildPlugin

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'intellij-lsp-server'.
> Cannot find builtin plugin kotlin for IDE: ~/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/ideaIC/2017.3.5/69a951f31e6bb7bb9ee36c3107ce120d50229f95/ideaIC-2017.3.5

Simple to fix:

-        setPlugins("properties", "maven", "junit", "kotlin", "android", "gradle", "groovy")
+        setPlugins("properties", "maven", "junit", "Kotlin", "android", "gradle", "Groovy")

Happy to submit a PR if that's preferable.

Allow configuration of how classpath is loaded when running

Currently projects are run using setenv to get around excessively long command lines caused by the classpath. This isn't ideal as it modifies the global environment. We could take advantage of IDEA's classpath shorteners to write the classpath to a JAR or file first. It is noted on the JetBrains blog that "there is no way to predict which kind of shortening would work for the user application", so this has to work for each possible shortener. The run configurations are edited inside IntelliJ currently, so most of the work will to make sure the client understands each classpath format.

Add option to configure server port

Needed for self hosting development, otherwise there will be "address already in use" errors when running a separate copy of the server for debugging.

Code action?

Hi there! Thanks for this very promising project, I love anything that gets me out of an IDE and back into Emacs! Your critique of eclim is spot on; it is both slow and finicky about project setup. The biggest differentiator to me at least is the ability to fix issues automatically. In eclim it is clunky and takes a crazy amount of time to apply the change, but it's still faster than checking the flycheck error and manually applying a fix. I would be happy to take a shot at implementing the functionality but all of this lsp stuff is so new to me I'm not sure how to begin. Any pointers? Thanks again!

Connecting to server when client has unsaved changes always results in out of sync document

The server has no way to know of the client's unsaved changes when it connects, because it currently operates on the pretext that the file on disk is the ground truth when a file is opened. There should be a way of updating IDEA's ground truth inside the textDocument/didOpen request, since the entire document text is passed in.

However, when trying to set IDEA's document text to the passed in text, the file/memory conflict resolution window appears every time the client saves (#39). There are no issues with synchronization, and choosing Show Differences shows that the contents are identical. But if the user forgets to close the window the entire server will become blocked.

It would be best to override the resolver window's behavior to never appear, but this seems infeasible due to the class's accessibility paired with the need to extend it. For the sake of not having to manipulate the resolver window outside of the client on every save, it would be better for now to just avoid sending the textDocument/didOpen request when the client has unsaved changes. This bug only really happens when sending a command like lsp-restart-workspace for development purposes when the client has unsaved changes.

NPE when completing certain Kotlin value parameters

It seems like some value parameters don't have type elements to get text from for some reason, but the code assumes it's there anyway, generating an exception.

Stacktrace:

kotlin.KotlinNullPointerException
	at com.ruin.lsp.commands.document.completion.KtValueParameterCompletionDecorator.<init>(CompletionDecorators.kt:334)
	at com.ruin.lsp.commands.document.completion.CompletionDecorator$Companion.fromKotlin(CompletionDecorators.kt:106)
	at com.ruin.lsp.commands.document.completion.CompletionDecorator$Companion.from(CompletionDecorators.kt:93)
	at com.ruin.lsp.commands.document.completion.CompletionCommand.execute(CompletionCommand.kt:67)
	at com.ruin.lsp.commands.document.completion.CompletionCommand.execute(CompletionCommand.kt:25)
	at com.ruin.lsp.model.MyLanguageServerKt$executeAndGetResult$$inlined$synchronized$lambda$1.compute(MyLanguageServer.kt:156)

Code:

private val type = valueParameter.typeReference?.typeElement?.text!!

Sending openProjectStructure twice hangs the server

The command in question waits for the previous dialog to close before opening the new one. It would be better to ignore the command entirely if it detects the window is opened already.

The same behavior should be tested for the other dialog-opening commands.

Rename command

I was trying to implement the rename command, with a decent amount of success, until I found that you had a branch (rename) for it with some advancements on it.

Is that branch going somewhere or should I just submit a PR with my implementation?

Cannot open two projects at once

Currently the lsp-mode client tries to open another connection if a project root outside the current one is detected, but lsp4j's server doesn't fork, so the request hangs.

Detecting and opening a new workspace under the current IDEA instance would have to be implemented in lsp-mode first for this to happen, using the new workspace/workspaceFolders request in LSP 3.6.0. When the server detects the user opening the new workspace, the new project could be opened and cached in IDEA.

Migrate tests to not use fixtures as much as possible

After learning more about the IDEA codebase I've found better ways to run tests without needing to rely on as many on-disk fixtures. In many cases files can be instantiated using the in-memory test fixture. This allows the tests to not have to reference cryptic offsets that only make sense by opening the fixture file and going to the offset referenced. All the information needed to understand the test can be contained in the test itself.

Support Android development

There is currently no awareness of the Android project layout. There should be commands for compiling and running the project on an Android device, and also the ability to open the Android Studio interfaces for features that are graphical in nature.

Javadoc

Hello, I'm interested in adding a feature to show javadoc.

  • Is this a good idea? Should I start with a simpler feature to get my feet wet, is this already being worked on (etc)?
  • Any tips for getting started with development (Other than Contirbuting) ?
    • What are the critical intellij/lsp functions to consider?

Support opening project with unlinked Gradle buildscript

Right now it's a bit inconvenient to open a Gradle project, realize the Gradle structure wasn't linked in IntelliJ and have to toggle the IntelliJ interface to set it up before any code-aware actions work. IntelliJ already detects if the Gradle project is unlinked and opens a popup with the linking action, so that behavior could be mimicked.

Trying to build locally fails

Hi,

I was about to give it a try and see if I could make it work on phpstorm.

However when just cloning te project and running ./gradlew buildPlugin I receive the following error:

Caused by: java.lang.ArrayIndexOutOfBoundsException: 450
at org.jetbrains.org.objectweb.asm.ClassReader.readUnsignedShort(ClassReader.java:2464)

I havent used gradle before.

How can I install this?

I'm sorry, but the instructions in the readme are insufficient to me. I don't even know what gradle is, nor where should I run the command ./gradlew clean buildPlugin.

I also cannot find the exact version of Intellij here. This project requires IntelliJ IDEA 2018.1.1, but I can only find 2018.1.7. Do you have any idea where I can find it?

Thanks.

Can't jump to definition of Java and Kotlin standard library functions

For Java, the source files for the JDK are not located in the same directory as the library JARs. The current regex searching works well for Maven libraries where the source JAR is just the library jar name with -source appended in the same directory, but not for any other case.

For Kotlin, it seems like the regex for looking inside the JAR for a filename doesn't always work, because of the way Kotlin compiled files can be named different from their source counterparts. Kotlin files doesn't always have to have a top level class, so a class name will be generated with "Kt" appended to it in those cases.

It will probably be best in both cases to query IntelliJ for the source JAR location to resolve these issues.

Prevent opening of Memory Disk Conflict window

Because of the way the server handles modifying IntelliJ's instances of opened documents, the server should always treat in-memory changes as the ground truth and never try to look at the client's file. But IntelliJ has a feature where if a document has changed in-memory but not on disk, a popup appears asking the user which document is definitive. This should be prevented and the in-memory document loaded in all cases, since if Load FS Changes is selected the document instances will become out of sync. Also, the window blocks the server until it is closed. This can become frustrating as it can appear under the client window and doesn't seem to show up in the taskbar on Windows.

FileDocumentManagerImpl has the package-public method setAskReloadFromDisk for setting the conflict manager. However, the class in question, MemoryDiskConflictWindow, is package-public only, so attempting to override its functionality may be infeasible.

Android Studio support

Hi!

I tried installing the plugin in Android Studio and it looks like Android Studio has a build version too low for the server.

I think Android Studio 3.2 (beta) is at build 173 whereas the minimum for lsp-server is at 181.

I played around with changing the minimum version in plugin.xml to 173 but then it stops on

org.jetbrains.idea.maven being a missing dependency.

Not sure how feasible it would be to support Android Studio but I'd thought I'd bring it up.

De-activated project?

It looks like this project is not getting much love lately (almost nothing in the previous nine months). Can someone comment on the whether further work on this very nice start should take place in a fork or should an effort be made to re-activate this project.
Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.