natebosch / vim-lsc

A vim plugin for communicating with a language server
BSD 3-Clause "New" or "Revised" License
693 stars 83 forks source link

document which Vim versions are supported (only Vim >= 8? neovim too?) somewhere #52

Closed guillaume-d closed 6 years ago

guillaume-d commented 6 years ago

I could not find this information anywhere in the docs or in GitHub bugs/PRs.

Also maybe some Vim plugins are required (or just recommended)?

cmpadden commented 6 years ago

I am also interested to know which versions are supported.

It appears that the job API differs between Vim and Neovim. For example, job_start, which is used in server.vim is not supported in Neovim.

E117: Unknown function: job_start
E15: Invalid expression: job_start(command, job_options)
natebosch commented 6 years ago

Good idea!

I'll update the readme soon. This is vim only, neovim indeed has different async job apis and this plugin does not use them. Version 8 should be compatible, also some high patch levels from version 7 I'd imagine.

job_start is the most likely thing that I'm using from recent versions, but there might also be a few other bits that are new since backwards compatibility hasn't been a goal. I'll try to make this clear in the README.

prabirshrestha commented 6 years ago

async.vim can be used to normalize jobs between vim8 and neovim.

natebosch commented 6 years ago

@prabirshrestha - yeah I did check out that plugin and I think you did a great job with it. I'm a bit torn on using it. On the one had I like the idea of being cross compatible. On the other hand I really dislike asking users to install dependencies to use a plugin. I wish the vim plugin ecosystem had a solution here.

I'm also nervous about claiming to support both neovim and vim when I don't use them both myself. Long term I should probably invest some time in automated testing, but for the time being I'm mostly relying on the fact that I use the plugin day to day to notice regressions.

prabirshrestha commented 6 years ago

@natebosch you can ship async.vim with your plugin so you don't need to tell others to install it separately. Just make sure to rename the public api's at the end. There is a doc in README.md about embedding.

Here is an example: https://github.com/k-takata/minpac

natebosch commented 6 years ago

@prabirshrestha - I checked it out but it looks like I can't quite switch to it since there is no support for replacing ch_open. I see you're looking at how to get that done in neovim (https://github.com/neovim/neovim/issues/4479) but AFAICT there is no relevant replacement - is that correct?

natebosch commented 6 years ago

As an FYI I've added support for neovim. Tested with neovim 0.2.0

I ended up writing my own abstraction over job_start and jobstart so I could hide some of the details that went towards features I'm not using.