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:
012abcABC -> 012abcABC
lsp/ts -> lsp_47_ts
a-b_c -> a_45_b_95_c
Converting with escaping _ to make this injective (=reversible).
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.
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 theawait
statement.escapeVimAutoloadName
is for escaping Unicode sequences into vim variable compatible names. eg:012abcABC
->012abcABC
lsp/ts
->lsp_47_ts
a-b_c
->a_45_b_95_c
Converting with escaping
_
to make this injective (=reversible).And invocations of members of the source (eg: gatherCandidates) may be shuffled after calling
ddc#refresh_candidates
because ddc.vim usesawait
before calling them.and some type refactoring 😉 (
deno cache **/*.ts
anddeno 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.