neoclide / coc-css

Css language server extension for coc.nvim
193 stars 11 forks source link

Variables separated with a '-' not being picked up correctly #39

Closed theTechGoose closed 2 years ago

theTechGoose commented 2 years ago

Variables separated by a '-' are cut off. Here is an example:

random css file image

_vars.scss image

theTechGoose commented 2 years ago

Never mind, the solution is related to my previous issue;

Can you consider adding the following to the readme so that newer people like myself are less confused?

To get variable intelligence working correctly:

autocmd FileType scss setl iskeyword+=@ autocmd FileType scss setl iskeyword+=$ autocmd FileType scss setl iskeyword+=-

autocmd FileType css setl iskeyword+=@ autocmd FileType css setl iskeyword+=$ autocmd FileType css setl iskeyword+=-

theTechGoose commented 2 years ago

Still a small issue of the split variables are still in the list. How do I fix?

image

These three are part of the other variables and the plugin for some reason treats them as two separate variables.

$base $shadow $primary

chemzqm commented 2 years ago

It's by design https://github.com/neoclide/coc.nvim/blob/master/src/sources/native/around.ts#L21, you can disable around source and create your own source.