ballerina-platform / lsp4intellij Goto Github PK
View Code? Open in Web Editor NEWThis language client library provides language server protocol support for IntelliJ IDEA and other Jetbrains IDEs.
License: Apache License 2.0
This language client library provides language server protocol support for IntelliJ IDEA and other Jetbrains IDEs.
License: Apache License 2.0
Description:
I have a simple language server registered for the yaml
extension that returns hello world
on hover requests. This is bundled into a sample plugin.
If I open a YAML file in IDEA with just my sample plugin enabled, on hover I am able to see those hello world
tooltips:
However, if I open a YAML file in IDEA with both my sample plugin enabled and the JetBrains YAML plugin enabled, I see nothing when hovering over YAML text.
Stepping through with the debugger, it looks like in case 2, it's not getting past this if
clause in EditorEventManager#mouseMoved()
because LanguageDocumentation.INSTANCE.allForLanguage(language).isEmpty()
is false:
Ideally, I'd like to be able to rely on the JetBrains YAML plugin for syntax highlighting, but use the hover documentation from my sample plugin.
As part of the LSP spec, clients can declare the capability for snippetSupport
in code completions.
Description from the docs:
The client supports snippets as insert text.
A snippet can define tab stops and placeholders with `$1`, `$2`
and `${3:foo}`. `$0` defines the final tab stop, it defaults to
the end of the snippet. Placeholders with equal identifiers are linked,
that is typing in one will update others too.
lsp4intellij currently has this disabled:
https://github.com/ballerina-platform/lsp4intellij/blob/master/src/main/java/org/wso2/lsp4intellij/client/languageserver/wrapper/LanguageServerWrapper.java#L520
This seems like something that could be implemented using IntelliJ live templates with variables. Has there been any thought about adding support for this?
When applying code completion a duplicate value is inserted. Following is a animation which shows the problem.
Describe the bug
The jar-file is unavailable.
To Reproduce
I tried to get the library via gradle and mvnrepository, but I couldn't get it.
With gradle I just get the flexmark-Libraries. On mvnrepository is no jar available.
Desktop (please complete the following information):
Description:
Sometime the default timeout isn't enough for some language servers, it would be nice to change the timeouts, specially the init timeout. Some time the STS4 language server won't fully initialized in 10 seconds if the system is busy or if the project is a large project. So it would be nice to have a API to change this so the STS4 plugin for example can make it as a configuration in IDE settings for STS4 tooling.
Steps to reproduce:
Unfortunately i cannot test if the lang server is connected even though the green icon is not shown since symbols are not working and my lang server only provides symbols.
Description:
Currently we only support diagnostics bound code actions and the aforementioned feature is available in the vs code language client. Basically we will have to add a caret listener and send a code actions request each time when the caret position is changed.
Suggested Labels:
Suggested Assignees:
Affected Product Version:
OS, DB, other environment details and versions:
Steps to reproduce:
Related Issues:
Description:
For some reason, my language server (based on pygls) receives workspace/didChangeWatchedFiles
even for the files that don't match the language extension.
Suggested Labels:
Suggested Assignees:
Affected Product Version:
0.91.0
OS, DB, other environment details and versions:
macOS 10.13.6
IntelliJ Community 2019.1.3
Steps to reproduce:
pygls.log
in my case) contains didChangeWatchedFiles
events for both file types.Related Issues:
When implementing customer LanguageClient implementations the need arises to access the current project this LanguageClient is serving and the instance of Requestmanager to use for contacting the language server.
Therefore the following must be expose through the LanguageClient's context
Hello guys:
I am trying to use idea to support code completion for properties file.
Description:
And I set the "=" as trigger character on my LSP server site, the code as follows:
CompletionOptions completionOptions = new CompletionOptions(true, Arrays.asList("="));
But when I type "=" on editor, there are always wrong completion Items displayed. However when I using eclipse and vscode, I can get the expected completion Items.
on idea: (whatever is the key, the completion items always like follows)
When I debugging, I found the "invokeAutoPopup()" method of LSPCompletionContributor class was called correctly, so the trigger character seems have no problem, But the LSP server can not receive the request(When typing letters, the request can be received). And the constructor method “LSPCompletionContributor()” will never be called.
And ProcessCanceledException thrown everytime when call getVariantsFromContributors() method of CompletionService class. It seems LiveTemplateCompletionContributor has something bad happen.
Question:
If I describe something wrong ,or maybe you guys have other ideas about it, please let me know. I will appreciate it.
Thank you so much!!!
The timeouts which are added into org.wso2.lsp4intellij.requests.Timeout#setTimeouts
doesn't reload the constants in the class. For example this cause the LanguageServerWrapper to use the old INIT timeout which it was initialized at the class loading time.
IMO we should have the timeouts in the map than in constants, and read timeout through a getter method which will return the overridden one if exist or otherwise the default one.
The code at above line does not compile with IntelliJ 2019. The reason for that is the constructor has been changed since it is not a considered as part of the public API. Shouldn't we use the provided com.intellij.codeInsight.daemon.impl.LocalInspectionsPassFactory to create a instance ?
Describe the bug
When trying to open a new file, client throws a StringIndexOutOfBoundsException and after some moment language server receives shutdown
notification.
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1967)
at com.github.lsp4intellij.utils.FileUtils.sanitizeURI(FileUtils.java:135)
at com.github.lsp4intellij.utils.FileUtils.editorToURIString(FileUtils.java:94)
at com.github.lsp4intellij.client.languageserver.wrapper.LanguageServerWrapper.connect(LanguageServerWrapper.java:257)
at com.github.lsp4intellij.IntellijLanguageClient.lambda$editorOpened$0(IntellijLanguageClient.java:149)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:314)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Desktop:
This a problem when the project is is a medium size project. This also cause multiple Sonar analysis jobs to be triggered as well since Sonar is part of the inspections
ava.lang.NullPointerException
at org.wso2.lsp4intellij.contributors.symbol.WorkspaceSymbolProvider.workspaceSymbols(WorkspaceSymbolProvider.java:57)
at org.wso2.lsp4intellij.contributors.symbol.LSPSymbolContributor.getNames(LSPSymbolContributor.java:35)
at com.intellij.ide.util.gotoByName.ContributorsBasedGotoByModel$1.processInReadAction(ContributorsBasedGotoByModel.java:86)
at com.intellij.ide.util.gotoByName.ContributorsBasedGotoByModel$1.processInReadAction(ContributorsBasedGotoByModel.java:70)
at com.intellij.openapi.application.ReadActionProcessor.lambda$process$0(ReadActionProcessor.java:28)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:973)
at com.intellij.openapi.application.ReadAction.compute(ReadAction.java:57)
at com.intellij.openapi.application.ReadActionProcessor.process(ReadActionProcessor.java:28)
at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:133)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1168)
at com.intellij.concurrency.ApplierCompleter.lambda$wrapInReadActionAndIndicator$1(ApplierCompleter.java:105)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:582)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:532)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:87)
at com.intellij.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:116)
at com.intellij.concurrency.ApplierCompleter.compute(ApplierCompleter.java:99)
at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
java.lang.NullPointerException
at java.util.concurrent.ConcurrentHashMap.replaceNode(ConcurrentHashMap.java:1106)
at java.util.concurrent.ConcurrentHashMap.remove(ConcurrentHashMap.java:1097)
at org.wso2.lsp4intellij.client.languageserver.wrapper.LanguageServerWrapper.disconnect(LanguageServerWrapper.java:355)
at org.wso2.lsp4intellij.client.languageserver.wrapper.LanguageServerWrapper.disconnect(LanguageServerWrapper.java:591)
at org.wso2.lsp4intellij.IntellijLanguageClient.lambda$editorClosed$1(IntellijLanguageClient.java:217)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:311)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
This happen when you are working with the one IDE window with a file bounded to LS and then you decide to open a different project in a new IDE window which also has a opened file which will bounded to a LS.
Triggering completion git dialog throws the following error
java.lang.NullPointerException
at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
at org.wso2.lsp4intellij.editor.EditorEventManagerBase.forUri(EditorEventManagerBase.java:93)
at org.wso2.lsp4intellij.contributors.LSPCompletionContributor.invokeAutoPopup(LSPCompletionContributor.java:56)
at com.intellij.codeInsight.editorActions.TypedHandler.isAutoPopup(TypedHandler.java:290)
at com.intellij.codeInsight.editorActions.TypedHandler.autoPopupCompletion(TypedHandler.java:273)
at com.intellij.codeInsight.editorActions.TypedHandler.lambda$execute$0(TypedHandler.java:180)
at com.intellij.openapi.editor.impl.CaretModelImpl.lambda$runForEachCaret$3(CaretModelImpl.java:354)
at com.intellij.openapi.editor.impl.CaretModelImpl.doWithCaretMerging(CaretModelImpl.java:453)
at com.intellij.openapi.editor.impl.CaretModelImpl.runForEachCaret(CaretModelImpl.java:346)
Seems like the LSPCompletionContributor need some guarding.
Description:
$subject.
Example: When opening a new project in the same window, status widget of the closed project is not disposed and therefore both of the status icons remains.
Suggested Labels:
Suggested Assignees:
Affected Product Version:
OS, DB, other environment details and versions:
Steps to reproduce:
Related Issues:
java.lang.NullPointerException
at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
at java.util.concurrent.ConcurrentHashMap.containsKey(ConcurrentHashMap.java:964)
at org.wso2.lsp4intellij.client.languageserver.wrapper.LanguageServerWrapper.connect(LanguageServerWrapper.java:278)
at org.wso2.lsp4intellij.IntellijLanguageClient.lambda$editorOpened$0(IntellijLanguageClient.java:196)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:311)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
This happens when opening a attached source file, for example if you have a library with source jar attached and if you open that file the above error is thrown.
Description:
clangd will fail to update file due to Change's rangeLength (1) doesn't match the computed range length (0)..
Suggested Labels:
Bug
Suggested Assignees:
Affected Product Version:
all
OS, DB, other environment details and versions:
Windows 10
Steps to reproduce:
public class MyLSPComponent implements ProjectComponent {
private static final Logger LOG = Logger.getLogger("kkk");
@Override
public void initComponent() {
LOG.info("Initializing plugin data structures");
RawCommandServerDefinition cpp = new RawCommandServerDefinition("cpp", new String[]{"D:\\Program Files\\LLVM\\bin\\clangd.exe","-log=verbose"});
IntellijLanguageClient.addServerDefinition(cpp);
}
@Override
public void disposeComponent() {
LOG.info("Disposing plugin data structures");
}
@Override
@NotNull
public String getComponentName() {
return "myApplicationComponent";
}
}
clangd.exe
with -log=verbose argument
.I[11:17:20.372] <-- textDocument/didChange
E[11:17:20.372] Failed to update C:\Users\Chandler\Desktop\cpp\gg.cpp: Change's rangeLength (1) doesn't match the computed range length (0).
My Solution
delete 1160 line of lsp4intellij\src\main\java\org\wso2\lsp4intellij\editor\EditorEventManager.java
changeEvent.setRangeLength(newTextLength);
Then it will work. But I don't know whether it will have some influence on some function?
Could you help me to fix it?
Thank you!
Description:
Please note the $subject. Since our current implementation used the file of the editor, when there are two opened editors for the same file (this is possible in split mode) second editor will not be handled as expected by the client.
Suggested Labels:
Suggested Assignees:
Affected Product Version:
OS, DB, other environment details and versions:
Steps to reproduce:
Related Issues:
Description:
Command-clicking on a symbol should "jump to definition", if implemented by LSP.
Affected Product Versions:
IntelliJ 2019.1.3, 2019.2.1 (EAP)
com.github.gayanper:lsp4intellij:e12a9280264ff92f3e753774d8ae30c7f749602e
OS, DB, other environment details and versions:
Mac OS 10.14.6
Steps to reproduce:
textDocument/definition
handler in the language server.As a user, I'd like it to:
Related Issues:
I'm using @gayanper's fork from #86, if that matters.
I'd be happy to work on a PR, if you could suggest where the culprit might be.
Thanks!
Description:
$subject. It seems like there are few low-level API changes have been introduced in the IntelliJ platform with the latest IDEA release (2019.2).
Suggested Labels:
Suggested Assignees:
Affected Product Version:
IntelliJ IDEA 2019.2
OS, DB, other environment details and versions:
Steps to reproduce:
Related Issues:
@NipunaRanasinghe do you have any plans to add support for https://microsoft.github.io/debug-adapter-protocol/ as well ? IMHO if you want to build a full functioning tooling for ballerina you would need the debug adapter protocol as well right ? Any plans for future ?
Add support to send workspace/didChangeConfiguration after the language server is initialized. Implementing workspace/didChangeConfiguration is straight forward. But with the idea plugin we seems to missing a life-cycle hook which we can receive language server notification messages. May be we can send this once we receive the InitializeResult. But the consumer of this library don't have a way to hook into that phase. We need to come up with a mechanism to hook into this InitializeResult message the act on it.
I'm trying to implement STS4 idea plugin with this LSP client. in STS4 they have some custom methods on their language server,
I think i can do the same overriding mechanism as they have done with the old LSP client. But is there a better way of doing this in this new plugin ?
Description:
Current lsp4intellij throws exception at LSPAnnotator in intellij-language-1c-bsl (with BSL Language Server).
ExternalToolPass:
com.intellij.diagnostic.PluginException: annotator: org.wso2.lsp4intellij.contributors.annotator.LSPAnnotator@13572e99 (class org.wso2.lsp4intellij.contributors.annotator.LSPAnnotator) [Plugin: org.1c-syntax.intellij.language-1c-bsl]
at com.intellij.ide.plugins.PluginManagerCore.createPluginException(PluginManagerCore.java:403)
at com.intellij.diagnostic.PluginProblemReporterImpl.createPluginExceptionByClass(PluginProblemReporterImpl.java:12)
at com.intellij.diagnostic.PluginException.createByClass(PluginException.java:72)
at com.intellij.codeInsight.daemon.impl.ExternalToolPass.process(ExternalToolPass.java:253)
at com.intellij.codeInsight.daemon.impl.ExternalToolPass.doApply(ExternalToolPass.java:219)
at com.intellij.codeInsight.daemon.impl.ExternalToolPass.access$600(ExternalToolPass.java:39)
at com.intellij.codeInsight.daemon.impl.ExternalToolPass$1.lambda$null$0(ExternalToolPass.java:183)
at com.intellij.openapi.application.ReadAction.lambda$run$1(ReadAction.java:53)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:936)
at com.intellij.openapi.application.ReadAction.compute(ReadAction.java:57)
at com.intellij.openapi.application.ReadAction.run(ReadAction.java:53)
at com.intellij.codeInsight.daemon.impl.ExternalToolPass$1.lambda$run$1(ExternalToolPass.java:180)
at com.intellij.openapi.progress.util.BackgroundTaskUtil.lambda$runUnderDisposeAwareIndicator$11(BackgroundTaskUtil.java:244)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$3(CoreProgressManager.java:185)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:169)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:591)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:537)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:59)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:156)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:185)
at com.intellij.openapi.progress.util.BackgroundTaskUtil.runUnderDisposeAwareIndicator(BackgroundTaskUtil.java:264)
at com.intellij.openapi.progress.util.BackgroundTaskUtil.runUnderDisposeAwareIndicator(BackgroundTaskUtil.java:243)
at com.intellij.codeInsight.daemon.impl.ExternalToolPass$1.run(ExternalToolPass.java:178)
at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:324)
at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:314)
at com.intellij.util.ui.update.MergingUpdateQueue.lambda$flush$1(MergingUpdateQueue.java:264)
at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:278)
at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:233)
at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:231)
at com.intellij.util.Alarm$Request.runSafely(Alarm.java:368)
at com.intellij.util.Alarm$Request.run(Alarm.java:355)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at com.intellij.util.concurrency.SchedulingWrapper$MyScheduledFutureTask.run(SchedulingWrapper.java:224)
at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:207)
at com.intellij.util.concurrency.BoundedTaskExecutor.access$100(BoundedTaskExecutor.java:29)
at com.intellij.util.concurrency.BoundedTaskExecutor$1.lambda$run$0(BoundedTaskExecutor.java:185)
at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:208)
at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:181)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.IncompatibleClassChangeError: Class com.google.common.base.Predicates$ObjectPredicate$4 does not implement the requested interface java.util.function.Predicate
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:176)
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1654)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
at org.wso2.lsp4intellij.contributors.annotator.LSPAnnotator.lambda$createAnnotations$1(LSPAnnotator.java:130)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
at org.wso2.lsp4intellij.contributors.annotator.LSPAnnotator.createAnnotations(LSPAnnotator.java:101)
at org.wso2.lsp4intellij.contributors.annotator.LSPAnnotator.apply(LSPAnnotator.java:89)
at com.intellij.codeInsight.daemon.impl.ExternalToolPass.doApply(ExternalToolPass.java:216)
... 37 more
Affected Product Version:
OS, DB, other environment details and versions:
Steps to reproduce:
Clone intellij-language-1c-bsl repo, run gradle task runIDE
Is your feature request related to a problem? Please describe.
Old intellij-lsp supports several extensions while registring LanguageServerDefinition via semicolon separated string as first parameter. Current implementation supports only one extension (as discussed at #4)
Describe the solution you'd like
Old semicolon behavior is ok.
Describe alternatives you've considered
Array or list of strings is also ok :)
Description:
When adding support for custome notifications (language server specific) we need to implement our own language client implementation where we can add JsonNotification annotations. But we also need to access to components like EditorEventManager for example to resolve the current editor for uri. So it would be nice to have a client context injected with these required components into the LanguageClient implementation. So that custom implementations can use it, even when implementing the codelenses this might be usefull to have this context.
@NipunaRanasinghe and @nixel2007 what do you think about this design idea ?
Hello!
I would like to migrate from scala intellij-lsp to your fork (and give some feedback, as you requested it in README :) ).
Do you support all basic capabilities of old intellij-lsp? At least i need a diagnostics, completion, hover and formatting capabilities.
Do i need to include something more than gradle/mvn dependency from jitpack (e.g.)?
https://jitpack.io/#NipunaRanasinghe/lsp4intellij
As i can see there is similar to intellij-lsp registration process - via preloading task and server definition. No more surprises?
P.S. Big THANK YOU for your work. fork at intellij-community didn't shoot (and i haven't enough free time for this). but i reeaaaly would like to switch to your fork.
Description:
Please note the $subject since aforementioned events are not implemented and handled by FileEventManager
.
Suggested Labels:
Suggested Assignees:
Affected Product Version:
OS, DB, other environment details and versions:
Steps to reproduce:
Related Issues:
Any plans or ideas for $subject?
Description:
$Subject.
OS, DB, other details and versions:
#33.
Description:
I think there are two related issues here:
Suggested Labels:
Bug
Affected Product Version:
com.github.ballerina-platform:lsp4intellij:Tag:0.91.0
OS, DB, other environment details and versions:
OS: macOS Mojave
IntelliJ: 2019.1.2
JDK: 1.8
Description:
This seems like the Runtime error which is lack of some range checking
SEVERE: Internal error: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
java.util.concurrent.CompletionException: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273)
at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280)
at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1629)
at java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1618)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(ArrayList.java:653)
at java.util.ArrayList.get(ArrayList.java:429)
at org.wso2.lsp4intellij.client.DynamicRegistrationMethods.forName(DynamicRegistrationMethods.java:44)
at org.wso2.lsp4intellij.client.LanguageClientImpl.lambda$null$1(LanguageClientImpl.java:76)
at java.util.ArrayList.forEach(ArrayList.java:1249)
at org.wso2.lsp4intellij.client.LanguageClientImpl.lambda$registerCapability$2(LanguageClientImpl.java:74)
at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1626)
... 5 more
java.lang.NullPointerException
at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
at org.wso2.lsp4intellij.editor.EditorEventManagerBase.forUri(EditorEventManagerBase.java:93)
at org.wso2.lsp4intellij.contributors.inspection.LSPInspection.checkFile(LSPInspection.java:62)
at com.intellij.codeInspection.LocalInspectionTool$1.visitFile(LocalInspectionTool.java:142)
at com.intellij.extapi.psi.PsiFileBase.accept(PsiFileBase.java:70)
at com.intellij.codeInspection.InspectionEngine.acceptElements(InspectionEngine.java:75)
at com.intellij.codeInspection.InspectionEngine.createVisitorAndAcceptElements(InspectionEngine.java:63)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.doInspectInjectedPsi(LocalInspectionsPass.java:752)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$inspectInjectedPsi$11(LocalInspectionsPass.java:355)
at com.intellij.concurrency.JobLauncherImpl.lambda$null$0(JobLauncherImpl.java:128)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:586)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:532)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:86)
at com.intellij.concurrency.JobLauncherImpl.lambda$processImmediatelyIfTooFew$1(JobLauncherImpl.java:124)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:940)
at com.intellij.concurrency.JobLauncherImpl.processImmediatelyIfTooFew(JobLauncherImpl.java:135)
at com.intellij.concurrency.JobLauncherImpl.invokeConcurrentlyUnderProgress(JobLauncherImpl.java:57)
at com.intellij.concurrency.JobLauncher.invokeConcurrentlyUnderProgress(JobLauncher.java:56)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.inspectInjectedPsi(LocalInspectionsPass.java:358)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.inspect(LocalInspectionsPass.java:202)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.doInspectInBatch(LocalInspectionsPass.java:133)
at org.wso2.lsp4intellij.editor.EditorEventManager.lambda$null$8(EditorEventManager.java:546)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:164)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:586)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:532)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:86)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:151)
at org.wso2.lsp4intellij.editor.EditorEventManager.lambda$runInspection$9(EditorEventManager.java:544)
at com.intellij.openapi.project.DumbServiceImpl.lambda$smartInvokeLater$7(DumbServiceImpl.java:445)
at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:315)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.doRun(LaterInvocator.java:435)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:419)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:403)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
at java.awt.EventQueue.access$500(EventQueue.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:715)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:741)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:690)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:385)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
When working with a LS implemented under spec version 3, the server expect to receive a InitializedParam request before any other request is made to server.
The current implementation of this library doesn't guarantee that.
I have a LS with some stored configuration
. I want to update its configuration from IDEA via some button in settings window.
Is there any method to get connected language-server and fire workspace/didChangeConfiguration
event from my plugin?
Description:
Completions items which does not have a completion kind are currently not shown due to $subject.
Suggested Labels:
Suggested Assignees:
Affected Product Version:
0.93.0 and below
OS, DB, other environment details and versions:
Steps to reproduce:
Related Issues:
Description:
$subject.
Suggested Labels:
Suggested Assignees:
Affected Product Version:
OS, DB, other environment details and versions:
Steps to reproduce:
Related Issues:
When integrating the STS4 Language server, it seems the language server symbols are not shown in IDEA symbol view.
To reproduce this,
The project A language server receives a didChangeWatchedFiles request with the file from project B. This can cause problems in workspace symbols. We probably need to only loop and send this request to the project B LS wrappers.
@NipunaRanasinghe @rasika i think the problem is at org.wso2.lsp4intellij.requests.FileEventManager#changedConfiguration(java.lang.String, org.eclipse.lsp4j.FileChangeType, org.wso2.lsp4intellij.client.languageserver.wrapper.LanguageServerWrapper) method which iterate over the all wrappers IntellijLanguageClient.getAllServerWrappers()
Should we change this ? Let me know may be i can work on this if you guys are busy.
Today when the language server fail to start a message box is shown, this message box blocks the UI thread which makes all the dependent UI updates to wait till this message is dismissed, From a usability point of view show this message as a message box doesn't add value to end user interaction since user can only read and acknowledge it. In IDEA the way these kind of interaction are handled through the event log.
@NipunaRanasinghe @nixel2007 if you guys agree on this, i can start working on it.
Description:
Today the implementation only support for file extensions. But in eclipse you could configure a full file name or filename patterns.
In STS4 context:
You can configuration the language server to use STS4 LS if the file name is such application*.properties
Now today the only way would be to bind the LS against extension .properties which makes the LS to connect on all java property files.
The suggestion is that to either introduce file type binding in IDEA to solve this or give priority to file name matching and if fails fallback to extension.
Suggested Labels:
Improvement
When opening a different project in same window while files are open which are attached to running LS, the following error is thrown
java.lang.Throwable: Can't remove document listener (org.wso2.lsp4intellij.editor.listeners.DocumentListenerImpl@39e98469). Registered listeners: [com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl$1@15f1662f, 0, 0, Multicaster, 0, 0, 0, 0, 1, 8, 1, 0, 0, [], com.intellij.openapi.editor.impl.view.LogicalPositionCache@79ff901f, com.intellij.openapi.editor.impl.view.TextLayoutCache@781af5d2, com.intellij.openapi.editor.ex.util.LexerEditorHighlighter(com.intellij.lexer.JavaHighlightingLexer): 'package testing;
import org.springframework.beans.factory.annotation.Autowired;
import javax.naming.Context;
public class Application {
@Autowired
Context context;
}
',
use soft wraps: false, tab width: 4, additional columns: false, update in progress: false, bulk update in progress: false, dirty: true, deferred regions: []
appliance manager state: recalculation in progress: false; event being processed: null, available width: 2147483647, visible width: 0, dirty: true
soft wraps mapping info: Soft wraps affected by current update: []
soft wraps: [], com.intellij.openapi.editor.impl.view.EditorSizeManager@6e479ae5, com.intellij.openapi.editor.impl.CaretModelImpl@1485bc32, com.intellij.openapi.editor.impl.InlayModelImpl$1@2bad8777, com.intellij.openapi.editor.impl.EditorImpl$EditorDocumentAdapter@5aade7cb, Multicaster, com.intellij.openapi.fileEditor.impl.text.TextEditorComponent$MyDocumentListener@2f92ea3b, com.intellij.openapi.editor.impl.ScrollingModelImpl$1@31cc21f8]
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:134)
at com.intellij.openapi.editor.impl.DocumentImpl.removeDocumentListener(DocumentImpl.java:994)
at org.wso2.lsp4intellij.editor.EditorEventManager.removeListeners(EditorEventManager.java:1046)
at org.wso2.lsp4intellij.client.languageserver.wrapper.LanguageServerWrapper.lambda$disconnect$2(LanguageServerWrapper.java:358)
at java.util.concurrent.ConcurrentHashMap.forEach(ConcurrentHashMap.java:1597)
at org.wso2.lsp4intellij.client.languageserver.wrapper.LanguageServerWrapper.disconnect(LanguageServerWrapper.java:356)
at org.wso2.lsp4intellij.client.languageserver.wrapper.LanguageServerWrapper.disconnect(LanguageServerWrapper.java:591)
at org.wso2.lsp4intellij.IntellijLanguageClient.lambda$editorClosed$1(IntellijLanguageClient.java:217)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:314)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Describe the bug
Sometimes when i close editor with file, connected to lang server, I see Can't remove document listener
error
To Reproduce
Steps to reproduce the behavior:
Can't make a reproducable scenario, but it's something like - start idea, open file, close file :)
Expected behavior
No errors, yay!
Stack trace
java.lang.Throwable: Can't remove document listener (com.github.lsp4intellij.editor.listeners.DocumentListenerImpl@793a7856). Registered listeners: [com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl$1@4b9e5316, 29, 0, Multicaster, 13, 307, 74, 0, 0, 83, 48, 0, 0, [], com.intellij.openapi.editor.impl.view.LogicalPositionCache@131df56e, com.intellij.openapi.editor.impl.view.TextLayoutCache@5e8a6c24, com.intellij.openapi.editor.ex.util.LexerEditorHighlighter(org.antlr.jetbrains.adapter.lexer.AntlrLexerAdapter): '...
...text of my file...
',
use soft wraps: false, tab width: 4, additional columns: false, update in progress: false, bulk update in progress: false, dirty: true, deferred regions: []
appliance manager state: recalculation in progress: false; event being processed: null, available width: 1755, visible width: 0, dirty: true
soft wraps mapping info: Soft wraps affected by current update: []
soft wraps: [], com.intellij.openapi.editor.impl.view.EditorSizeManager@52b777c9, com.intellij.openapi.editor.impl.CaretModelImpl@468950da, com.intellij.openapi.editor.impl.InlayModelImpl$1@4889c412, com.intellij.openapi.editor.impl.EditorImpl$EditorDocumentAdapter@33c7b1ff, Multicaster, com.intellij.openapi.fileEditor.impl.text.TextEditorComponent$MyDocumentListener@19158719, com.intellij.openapi.editor.impl.ScrollingModelImpl$1@202a61ce, com.intellij.openapi.vcs.ex.DocumentTracker$MyDocumentListener@2685988d, com.intellij.openapi.vcs.ex.PartialLocalLineStatusTracker$MyUndoDocumentListener@28c39deb]
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:134)
at com.intellij.openapi.editor.impl.DocumentImpl.removeDocumentListener(DocumentImpl.java:994)
at com.github.lsp4intellij.editor.EditorEventManager.removeListeners(EditorEventManager.java:993)
at com.github.lsp4intellij.client.languageserver.wrapper.LanguageServerWrapper.lambda$disconnect$2(LanguageServerWrapper.java:351)
at java.util.concurrent.ConcurrentHashMap.forEach(ConcurrentHashMap.java:1597)
at com.github.lsp4intellij.client.languageserver.wrapper.LanguageServerWrapper.disconnect(LanguageServerWrapper.java:349)
at com.github.lsp4intellij.client.languageserver.wrapper.LanguageServerWrapper.disconnect(LanguageServerWrapper.java:578)
at com.github.lsp4intellij.IntellijLanguageClient.lambda$editorClosed$1(IntellijLanguageClient.java:185)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:314)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Desktop (please complete the following information):
do you really need info about browser in this bug report? :)
Additional context
After reopening files I see this exceptions in idea.log:
com.intellij.openapi.util.TraceableDisposable$DisposalException: Editor is already disposed
at com.intellij.openapi.util.TraceableDisposable.throwDisposalError(TraceableDisposable.java:101)
at com.intellij.openapi.editor.impl.EditorImpl.throwDisposalError(EditorImpl.java:936)
at com.intellij.openapi.editor.impl.view.LogicalPositionCache.checkDisposed(LogicalPositionCache.java:193)
at com.intellij.openapi.editor.impl.view.LogicalPositionCache.getLineInfo(LogicalPositionCache.java:178)
at com.intellij.openapi.editor.impl.view.LogicalPositionCache.logicalPositionToOffset(LogicalPositionCache.java:112)
at com.intellij.openapi.editor.impl.view.EditorCoordinateMapper.logicalPositionToOffset(EditorCoordinateMapper.java:91)
at com.intellij.openapi.editor.impl.view.EditorView.logicalPositionToOffset(EditorView.java:161)
at com.intellij.openapi.editor.impl.EditorImpl.logicalPositionToOffset(EditorImpl.java:2137)
at com.github.lsp4intellij.utils.DocumentUtils.lambda$LSPPosToOffset$4(DocumentUtils.java:120)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:959)
at com.github.lsp4intellij.utils.ApplicationUtils.computableReadAction(ApplicationUtils.java:32)
at com.github.lsp4intellij.utils.DocumentUtils.LSPPosToOffset(DocumentUtils.java:109)
at com.github.lsp4intellij.contributors.inspection.LSPInspection.descriptorsForManager(LSPInspection.java:90)
at com.github.lsp4intellij.contributors.inspection.LSPInspection.checkFile(LSPInspection.java:64)
at com.intellij.codeInspection.LocalInspectionTool$1.visitFile(LocalInspectionTool.java:141)
at com.intellij.extapi.psi.PsiFileBase.accept(PsiFileBase.java:70)
at com.intellij.codeInspection.InspectionEngine.acceptElements(InspectionEngine.java:75)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$null$7(LocalInspectionsPass.java:316)
at com.intellij.util.AstLoadingFilter.lambda$toComputable$2(AstLoadingFilter.java:168)
at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:126)
at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:115)
at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:110)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$visitRestElementsAndCleanup$8(LocalInspectionsPass.java:315)
at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:133)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1163)
at com.intellij.concurrency.ApplierCompleter.lambda$wrapInReadActionAndIndicator$1(ApplierCompleter.java:105)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:582)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:532)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:87)
at com.intellij.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:116)
at com.intellij.concurrency.ApplierCompleter.lambda$compute$0(ApplierCompleter.java:96)
at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:147)
at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:222)
at com.intellij.concurrency.ApplierCompleter.compute(ApplierCompleter.java:96)
at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.pollAndExecCC(ForkJoinPool.java:1190)
at java.util.concurrent.ForkJoinPool.helpComplete(ForkJoinPool.java:1879)
at java.util.concurrent.ForkJoinPool.awaitJoin(ForkJoinPool.java:2045)
at java.util.concurrent.ForkJoinTask.doJoin(ForkJoinTask.java:390)
at java.util.concurrent.ForkJoinTask.join(ForkJoinTask.java:719)
at java.util.concurrent.ForkJoinPool.invoke(ForkJoinPool.java:2616)
at com.intellij.concurrency.JobLauncherImpl.invokeConcurrentlyUnderProgress(JobLauncherImpl.java:65)
at com.intellij.concurrency.JobLauncher.invokeConcurrentlyUnderProgress(JobLauncher.java:56)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.visitRestElementsAndCleanup(LocalInspectionsPass.java:328)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.inspect(LocalInspectionsPass.java:199)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.collectInformationWithProgress(LocalInspectionsPass.java:115)
at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:84)
at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:69)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$null$1(PassExecutorService.java:423)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1168)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:416)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:582)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:532)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:87)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:415)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:391)
at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:147)
at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:222)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:389)
at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:161)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Description:
I've set up a sample IntelliJ plugin that depends on the lsp4intellij
library. I've configured it to talk to the lsp-sample server at https://github.com/microsoft/vscode-extension-samples/tree/master/lsp-sample. This language server returns diagnostics for words that are in all caps.
Diagnostics briefly appear and then disappear in the IDE whenever I type. Stepping through with a debugger, I see that the right diagnostics are being returned by the language server, but for some reason they are quickly removed.
I've also tried building against #86 as @gayanper suggested in the gitter channel but started hitting exceptions due to what appears to be an unexpected null:
io.reactivex.exceptions.OnErrorNotImplementedException: The exception was not handled due to missing onError handler in the subscribe() method call. Further reading: https://github.com/ReactiveX/RxJava/wiki/Error-Handling | java.lang.IllegalArgumentException: Argument for @NotNull parameter 'file' of com/intellij/codeInsight/daemon/impl/DaemonCodeAnalyzerImpl.restart must not be null
at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:704)
at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:701)
at io.reactivex.internal.observers.LambdaObserver.onError(LambdaObserver.java:77)
at io.reactivex.internal.observers.LambdaObserver.onNext(LambdaObserver.java:67)
at io.reactivex.observers.SerializedObserver.onNext(SerializedObserver.java:111)
at io.reactivex.internal.operators.observable.ObservableDebounceTimed$DebounceTimedObserver.emit(ObservableDebounceTimed.java:143)
at io.reactivex.internal.operators.observable.ObservableDebounceTimed$DebounceEmitter.run(ObservableDebounceTimed.java:168)
at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66)
at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalArgumentException: Argument for @NotNull parameter 'file' of com/intellij/codeInsight/daemon/impl/DaemonCodeAnalyzerImpl.restart must not be null
at com.intellij.codeInsight.daemon.impl.DaemonCodeAnalyzerImpl.$$$reportNull$$$0(DaemonCodeAnalyzerImpl.java)
at com.intellij.codeInsight.daemon.impl.DaemonCodeAnalyzerImpl.restart(DaemonCodeAnalyzerImpl.java)
at org.wso2.lsp4intellij.editor.EditorEventManager.lambda$null$0(EditorEventManager.java:245)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:960)
at org.wso2.lsp4intellij.utils.ApplicationUtils.computableReadAction(ApplicationUtils.java:49)
at org.wso2.lsp4intellij.editor.EditorEventManager.lambda$new$1(EditorEventManager.java:242)
at io.reactivex.internal.observers.LambdaObserver.onNext(LambdaObserver.java:63)
... 11 more
Suggested Labels:
Bug
Suggested Assignees:
Affected Product Version:
com.github.ballerina-platform:lsp4intellij:Tag:master-SNAPSHOT
OS, DB, other environment details and versions:
OS: macOS Mojave
IntelliJ: 2019.1.2
JDK: 1.8
Steps to reproduce:
Expected: The editor displays diagnostics for words that are written in all caps.
Actual: The editor briefly displays the diagnostics, but they quickly disappear.
Description:
Is it possible to pass an env to LSP?
For example,
when starting clangd, I want to specify a CPATH for it.
I tried to send RawCommandServerDefinition like this:
RawCommandServerDefinition cpp = new RawCommandServerDefinition("cpp", new String[]{"set CPATH=xxxxx","&&","D:\\Program Files\\LLVM\\bin\\clangd.exe","-log=verbose"});
but it will not recognize the set
command.
Do you have any other suggestion?
Thank you!
Suggested Labels:
Feature
This happens when the run configuration dialog is opened.
java.lang.NullPointerException
at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
at java.util.concurrent.ConcurrentHashMap.containsKey(ConcurrentHashMap.java:964)
at org.wso2.lsp4intellij.client.languageserver.wrapper.LanguageServerWrapper.connect(LanguageServerWrapper.java:278)
at org.wso2.lsp4intellij.IntellijLanguageClient.lambda$editorOpened$0(IntellijLanguageClient.java:196)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:311)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.