neoclide/coc-sources

How to enable case insensitive for tag completion?

zoumi opened this issue · 2 comments

zoumi commented

I have set smartcase in my vimrc.
But it seems that coc-tag doesn't follow this? coc-tag requires the first char to be case sensitive?

It is smart case but first character must match by design https://github.com/neoclide/coc-sources/blob/master/packages/tag/index.js#L84, you can write your own source which should be easy.

zoumi commented

Thank you.

          if (input[0].toUpperCase() === input[0])
          {
            if (word[0] !== input[0]) continue
          }
          else
          {
            if (word[0].toLowerCase() !== input[0]) continue
          }