Ruin0x11 / intellij-lsp-server

Exposes IntelliJ IDEA features through the Language Server Protocol.
MIT License
318 stars 28 forks source link

Intellij Window closed on LSP connection #74

Open lrry05 opened 6 years ago

lrry05 commented 6 years ago

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.

Ruin0x11 commented 6 years ago

The window can be toggled using the lsp-intellij-toggle-frame-visibility command, though this should probably be added as a config option. But note that editing in both the IDE window and through LSP will currently cause desynchronization between the two.

lrry05 commented 6 years ago

Thanks for the quick reply. The toggle worked great. However, whenever I change and save a file in emacs, the Intellij is prompting to reload file since the in-memory copy has changed. I didn't make any change in Intellij and the file isn't even open in Intellij. Is there a way to avoid this prompt? On Sunday, August 5, 2018, 4:07:10 PM EDT, Ruin0x11 notifications@github.com wrote:

The window can be toggled using the lsp-intellij-toggle-frame-visibility command, though this should probably be added as a config option. But note that editing in both the IDE window and through LSP will currently cause desynchronization between the two.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

Ruin0x11 commented 6 years ago

Might be another case of #39, which was recently alleviated but not in all cases, it seems. The issue has more information.

lrry05 commented 6 years ago

I was using the plugin from repository. The problem disappeared after switching to the one built from source. One other problem. My source files use dos style newline. When saving the buffer, company-lsp seems to force the file coding to switch to unix. This causes svn to think the entire file has changed. Do you know of a work-around for this?  You did a great job and this is almost exactly what I have been looking for. Thanks! On Sunday, August 5, 2018, 9:31:15 PM EDT, Ruin0x11 notifications@github.com wrote:

Might be another case of #39, which was recently alleviated but not in all cases, it seems. The issue has more information.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

Ruin0x11 commented 6 years ago

If the problem seems to be caused by LSP, you could do set-buffer-file-coding-system (C-x RET f) and choose dos.

Also, no problem. Glad you found it helpful.