quangnguyen30192/cmp-nvim-tags

`get_keyword_pattern` should use `\k` (or `[:keyword:]`) regex instead of `\w`

Closed this issue · 4 comments

cpkio commented

return '\\%([^[:alnum:][:blank:]]\\|\\w\\+\\)'

Could you provide what the use-case is ?

cpkio commented

\w+ in Vim/Neovim includes ASCII only, not other glyphs. When using ctags on cyrillic asciidoc files for example, \w works erroneously. Or you should enable option = { keyword_pattern = [[\k\+]] } like github.com/hrsh7th/cmp-buffer does.

cpkio commented

btw iskeyword can be different for various filetypes, so \k makes more sense. For now you limit cmp-tags behaviour.

Updated