Shougo / ddc.vim

Dark deno-powered completion framework for Vim/NeoVim
MIT License
669 stars 33 forks source link

`SourceOptions.keywordPattern` differs between docs and implementation #127

Closed Milly closed 1 year ago

Milly commented 1 year ago

Problems summary

Document says:

keywordPattern
        It defines the keyword pattern for completion.
        NOTE: It is JavaScript regexp.
        NOTE: "\k" is converted to 'iskeyword' pattern.

But actual value in implementation (e.g. in Source.gather()):

{
  "sourceOptions": {
    "keywordPattern": "\\k*",
    // ...
  }
}

Expected

Add a note to the docs that developers should convert it themselves.

As an additional question, can vimoption2ts() be used as a public API? Or it would be nice to have a convenience function that can convert keywordPattern.

Environment Information

Provide a minimal init.vim/vimrc without plugin managers (Required!)

I omitted it because it's a documentation issue.

How to reproduce the problem from neovim/Vim startup (Required!)

I omitted it because it's a documentation issue.

Milly commented 1 year ago

One more point, how about adding @deprecated tag to the TSDoc for Options.keywordPattern?

Shougo commented 1 year ago

Fixed.