EmmyLua / IntelliJ-EmmyLua

Lua IDE/Debugger Plugin for IntelliJ IDEA
https://emmylua.github.io
Apache License 2.0
1.74k stars 293 forks source link

"Exclude list..." is missing for Lua Inlay Hints #393

Open pouwelsjochem opened 3 years ago

pouwelsjochem commented 3 years ago

Environment(环境)

name version
IDEA version 2020.3
EmmyLua version 1.3.5
OS MacOS 10.15.7

What are the steps to reproduce this issue?(重现步骤?)

Open Preferences -> Editor -> Inlay Hints

What happens?(出现什么问题?)

The Groovy, Java and Kotlin options have an "Exclude list..." For Lua it is missing.

What were you expecting to happen?(期望?)

"Exclude list..." to appear so Inlay Hints are even more useful.

Any other comments?(其它说明)

Inlay Hints are a pretty useful feature in Intellij. But having no way to make exceptions makes it less desirable, it makes a lot of the code very bulky. In some situations it is just very clear what the parameters are:

require(modname: "module") doesn't have to say you passed a 'modname' since everyone knows what require() does. math.max(x: 1, 10) hints '1' is 'x', which only make it less understandable string.lower(s: "Test") the 's' hint here is pretty obvious as well

These are just some examples for the default Lua libraries, the "Exclude list..." could also allow enable/disable inlay hints for your own code.

e.g. it would be great code like worldHelper:getObjectByName(_objectName: "myObjectName") wouldn't give any hints about the parameter being a _objectUID

pouwelsjochem commented 3 years ago

I've adding initial support for the Exclude List myself, could be improved later on when necessary but it already adds the ability to disable Inlay Params in a lot of occasions. See #399