Prioritizing Code Completion?
Is there any way to prioritize which items come up first with code completion?
I typically work with the WordPress CMS and I'd like to give priority to my theme directory.
I'd also like to promote code completion provided by the upcoming Tailwind CSS plugin.
Much thanks,
请先登录再写评论。
There are two things that affect the completion items' order dynamically:
1. Library roots are being ranked down in the completion list. A library root is a folder that is marked as excluded and added as a library at the same time, the vendor contents are a good example of that.
2. If you invoke a certain completion item three times in a certain context, it's going to be considered prioritized and get into the top of the list.
Other than that, there's no way you can manipulate the order, unfortunately, everything else is hard-coded.
Same problem, in JS...
PHPStorm priorizes the prototype methods, before the members:
Then, ok, we can top-up our properties but the current behavior is strange and doesn't really improves anything if we don't use the same objets often.
Lcf.vs, what are prototype methods? The context in which you invoke completion matters, could you please share a code sample?
Eugene,
Sure, I'm working on my https://www.npmjs.com/package/@etchedjs/etched#a-concrete-example
The screened completions occurs on `jack.`
(Moreover, I'm not working with `Object.prototype` but empty objects, then no reason to suggest that methods... but that part is maybe an error in my TS declarations)
Sorry for the delay! What IDE version do you use?
I just created a new project, installed the package and pasted your code in 2020.3 RC. The completion works for me:
Hi,
Sorry too, for the delay.
I use the 2020.2.4 #PS-202.8194.11, with typescript@4.1.2
If you have the same, can you share your config, please?
Please check 2020.3. It works for me in that version.