Skip to content
This repository has been archived by the owner on Jul 27, 2018. It is now read-only.

support vim8 without python #1

Closed
prabirshrestha opened this issue Jan 26, 2017 · 5 comments
Closed

support vim8 without python #1

prabirshrestha opened this issue Jan 26, 2017 · 5 comments

Comments

@prabirshrestha
Copy link
Contributor

I have been working on the vim plugin for language server protocol written in pure vimscript that works on vim8 and neovim and linux, mac and windows. I have been searching for autocompletion plugin to work with. This plugin would be interesting for me.

Do you have any plans on supporting vim8. And better if it could be done without python similar like CtrlP primarily because setting up python on windows is a bit of pain :(

Some related issues related to the async autocompletion via language server protocol in vim Shougo/deoplete.nvim#407 tjdevries/nvim-langserver-shim#11

@roxma
Copy link
Owner

roxma commented Jan 27, 2017

Sorry, currently I have no plan for supporting vim8, I havn't take a deep look into vim8's async interfaces and rpc support, but It seems it requires a lot of work to make them compatible. That's why I choose the name nvim-x

The core of this plugin was written in pure vimscript at first, as the growing of features and complexities, it's more natral to move it into python code to reduce the work done by vimscript. So that if the execution time gets longer, it won't block the ui.

I want to support language server protocol, it's interesting, but I havn't take a deep look yet. I'll try adding vim-lsp as a source.

@prabirshrestha
Copy link
Contributor Author

I think if the interface is right it would be possible to do so without vim8/neovim async interface or rpc support. Rather then using job or channels internally let the custom completors handle it. This may be a bit more work to the implementors but gives great flexibility so that plugins like vim-lsp or nvim-langserver-shim manages the server lifecycle instead of nvim-complete-manager. But if someone is directly writing a language completion like jedi you have they could use python interface directly.

Here is a sample async emoji completion I was thinking. Would something simple like this be possible? To demonstrate async I'm using timers instead of jobs with lambdas.

function! s:emoji(ctx)
    let l:matches = [{'word':':+1:'}, {'word': ':smile:'}]
    call timer_start(2000, {timer->cm#complete(self, a:ctx, col('.'), l:matches)})
endfunction

call cm#register_source({'name': 'emoji',
    \ 'refresh': 1,
    \ 'cm_refresh': function('s:emoji')
    \ })

I have played around with the typescript langserver using vim-lsp with real large work projects and didn't find any issues related to blocking UI since core processing is moved to the server. It doesn't have to be oneway with vim only support. vim-lsp can be changed such that if it is running in neovim it can take advantage of the python rpc layer if supported. This does mean neovim would faster since sorting algorithms can run in separately from gui.

@prabirshrestha
Copy link
Contributor Author

FYI: in the mean time I forked nvim-complete-manger to pure vim script with python dependency removed. This does mean some of the awesome stuff that nvim-complete-manager provides especially on perf with remote plugins will be lost. Will play around with it and let you know how it goes. Please don't feel offended with this fork.

prabirshrestha/asyncomplete.vim#1

@roxma roxma closed this as completed Feb 7, 2017
@roxma
Copy link
Owner

roxma commented Feb 7, 2017

This issue is closed now. It may be re-opened if a compatible layer for python rpc is introduced in the future.

@roxma roxma mentioned this issue Feb 8, 2017
@roxma
Copy link
Owner

roxma commented Feb 8, 2017

This issue is replaced with #14

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants