I created a Headers (C).sublime-completions with (shortened) the following contents:
- Code: Select all
"scope": "string.quoted.other.lt-gt.include.c meta.preprocessor.c.include source.c",
I cannot get this to work. If I take out the parts in scope before "source.c" then I can get it to complete. I have set the syntax explicitly to C in the View menu. So what obvious thing am I doing wrong here? It should be similar to your C++ example. I've tried "meta.preprocessor.c.include source.c" as well as "string.quoted.other.lt-gt.include.c source.c" as well, but they also failed.
Also, my question before was actually different. Since I communicated the idea across badly, let me try again. Within the scope of the source file if you would allow all completion tokens it would be incredibly bloated. So depending on which #include files are included at the top I would like to limit the tokens. E.g. if #include <stdio.h> is included I want fclose() to be available in autocompletion, but if #include <stdio.h> is not present, I don't want to offer the possibility.