jamesnvc / lsp_server

Language Server Protocol server for SWI-Prolog
BSD 2-Clause "Simplified" License
90 stars 6 forks source link

Support for LanguageClient #2

Closed erlanger closed 5 years ago

erlanger commented 5 years ago

I tried to use it in neovim with LanguageClient, but LanguageClient does not support incremental mode. It can only handle the whole file. I don't think they will ever add support for incremental mode.

Is there a chance you will support LanguageClient? It is easier to support and fix things in prolog than in rust (LanguageClient is written mostly in rust and viml).

jamesnvc commented 5 years ago

Sure, I'll have a look

jamesnvc commented 5 years ago

I installed LanguageClient with a clean nvim configuration & I'm able to see hover working, but it looks the go to definition & find usages isn't working. I will try to figure out why.

jamesnvc commented 5 years ago

Just released v1.2.0 which seems to be working in Neovim with LanguageClient for me. Let me know if you have any issues with it!

erlanger commented 5 years ago

Thanks!! I just tried it, and it fails to start with the following error: [LC] LanguageClient: failed to register as NCM source: invalid type: boolean false, expected struct CodeLensOptions

I am using

Plug 'ncm2/ncm2'

for completions.

Here are the logs:

ls1.log lc1.log

You can see that it is not handling the textDocument/didChange in lc1.log above.

jamesnvc commented 5 years ago

Ah okay, so this is for a completion framework? Right now, I only have documentSymbols, hover, defintition, and references implemented. I can work on adding completion as well, but probably not until the end of August.

jamesnvc commented 5 years ago

Would you be able to post a minimal init.vim for testing?

jamesnvc commented 5 years ago

Oh, I see; it just sends errors merely trying to load with the plugin enabled. I will push a fix to address that.

jamesnvc commented 5 years ago

Released v1.2.1 that, while completion isn't implemented, doesn't give errors on launch.

erlanger commented 5 years ago

I updated the repo (1.2.1 is not at the main website yet) and it starts now. The functions that are working are

erlanger commented 5 years ago

BTW, you are going to beat the record on responding to issues! Thank you so much!

jamesnvc commented 5 years ago

I was able to see go to definition & go to references working for me; are they working for you?

erlanger commented 5 years ago

Yes, both are working great!