shun / ddc-source-vim-lsp

vim-lsp source for ddc.vim
MIT License
44 stars 13 forks source link

Support aliases (strictly). #9

Closed LumaKernel closed 3 years ago

LumaKernel commented 3 years ago

It's porting of https://github.com/Shougo/ddc-nvim-lsp/pull/19/commits/591cb8fa113a575c46761f379cfc7df82bc6263d in https://github.com/Shougo/ddc-nvim-lsp/pull/19.

If you alias this source to two or more names, the global environment variable are conflicted.

Lua evaluation is exclusive, but async function in TypeScript may be interrupted by other operations at right after the await statement.

escapeVimAutoloadName is for escaping Unicode sequences into vim variable compatible names. eg:

And invocations of members of the source (eg: gatherCandidates) may be shuffled after calling ddc#refresh_candidates because ddc.vim uses await before calling them.


and some type refactoring 😉 ( deno cache **/*.ts and deno lint )


I personally make escapeVimAutoloadName / escapeVimAutoloadNameCached as public domain, so if other source creators see this, please feel free to copy it.


@shun (and other users) It's maybe ready but not tested except escapeVimAutoloadName. Please test.

shun commented 3 years ago

@LumaKernel Thanks great PR !