aqzhyi / Sublime-Better-Completion

手刻的浪漫 DEPRECATED, use TypeScript!
338 stars 75 forks source link

Value substitution for preprocessor variables (LESS, SASS, Stylus) #33

Open Isk1n opened 8 years ago

Isk1n commented 8 years ago

There is a plugin for ST https://github.com/MaciekBaron/sublime-list-stylesheet-vars, which creates a list of currently available variables (both declared and imported!) with corresponding values.

It would be awesome, if you blend your plugins.

ctf0 commented 8 years ago

what exactly are u after ? can u show an example ?

Isk1n commented 8 years ago

Currently your plugin loads predefined lists of completions. It doesn't see my own variables and their values (unless I hardcode them into sbc-api-*.sublime-settings, which isn't practical)

The plugin I mentioned before creates a list of all available variables and their values on the fly. It finds all imports and all declared variables with their values in the current opened document. Then it reads all import files and adds their variables to the list. Unfortunately that plugin doesn't use the list for autocompletion.

Current suggestions:

sbc

What I would like to see:

slsv

I realize that such feature might be out of scope of your plugin, it could greatly impact the performance and it would probably be hard to extend on other languages.

ctf0 commented 8 years ago

thats because u mixed up what this plugin is for vs autocompletion or fuzzy search.

this package is mainly a different way or using snippets, so instead of a snippet file per each u simply combine them all in one file under the same scope.