2

Problem

When I type null, and use any form of code completion such as Ctrl-Shift-Return for example, it chooses the top-most option from the auto-complete dropdown, but the top-most option is never the one I want.

Example:

enter image description here

Question

Is it possible to "downvote" an option to rank it lower? Or in any other way modify the priorities of options in the auto-completer?

Extra info

The null() function comes from this project, via composer installation.

https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src/Standards/Squiz/Tests/Functions/FunctionDeclarationUnitTest.inc

This problem has persisted for quite a while, and has survived several version upgrades. Current version info:

PhpStorm 2019.1
Build #PS-191.6183.95, built on March 27, 2019
Licensed to [Redacted]
Subscription is active until [Redacted]
JRE: 1.8.0_202-release-1483-b39 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.9.0-8-amd64

I've manually picked the second option, plain null, many times without this affecting the priority of this list, so there's certainly no learning aspect to it.

PS: The tag PhpStorm-2019.1 does not yet exist, and I don't have the reputation required to create it. I added the 2018.1 tag because the problem has existed since that version.

Alec
  • 1,986
  • 4
  • 23
  • 47
  • 1
    *"Is it possible to "downvote" an option to rank it lower?"* Choosing actual `NULL` few times should give that entry a boost -- that's how it meant to work. Sometimes it does not work (maybe due to some plugin or something). You may try clearing the indexes/caches (deleting whole `~/.PhpStorm2019.1/system` folder (backup first if needed) -- may help but no guarantee. – LazyOne Apr 02 '19 at 12:16
  • 2
    Other than that -- try marking that file as Plain Text (right click on it in Project View panel -- see if it's possible for library files). If not, you may associate file name (`FunctionDeclarationUnitTest.inc`) with `Text File` entry in `Settings | Editor | File Types` -- text files are not indexed so that `null()` function should not appear in your completion results. – LazyOne Apr 02 '19 at 12:18

0 Answers0