Some suggestions and bugs...
See original GitHub issueHello, Great job on this plugin, it looks very promising and already has some features that are superior to Sylvanaar’s Lua plugin that I was using until now… 😃
Here is some feedback (I’ll probably edit this message as I go):
Bugs:
-
local a = function(...)
isn’t recognized as a function, contrary tolocal function a(...)
. (screenshot) - Blacklisting parameter hints (right click on them) doesn’t work (no function name detected ,as far as I can tell)
- When a variable (let’s say
a
) is detected as being a string, for instance, autocompletinga:
gives nothing, buta.
lists all applicable string methods (with a string argument as first parameter). This should be the reverse: propose autocompletions ona:
and nota.
, and remove the first ‘s’ argument as it is passed implicitely with the colon call. - Type info doesn’t fully propagate, apparently. For instance, if function
a
returns a string, andb
returnsa()
, then ifc = b()
,c
won’t be automatically recognized as a string. - Typo: it’s “Tail call” not “Trail call”.
Modifications:
-
private
support in@field
. Which would autocomplete inside the class, but not anywhere else - support for multiple inheritance in
@class
. Separated by commas after the:
? - Improve the stdlib documentation by writing the parameters etc. in the emmylua doc format (with @return, type hinting, etc.)
- Multiple return values annotation support for
@return
. Separated by commas? - Table of type support. For instance:
Vehicle[]
would be for a table of Vehicle instances. Useful forpairs()
where the variables would get auto-typed as Vehicle. - Alt-Enter support on standalone function names, not only on table methods or function arguments. Right now we have to type
--- @return ...
manually. - Support backticks (
`
) in comments/documentation to make it clear it’s a piece of code or code reference.
New:
- Semantic highlighting support. See this video by JetBrains
- metamethods name autocompletion (
__index
,__tostring
, etc. The standard ones) - Propose to refactor things like
string.find(str, pattern)
intostr:find(pattern)
- Custom class constructor hint support (maybe
@constructor
?). The class system I’m using is like:function MyClass:new(arg1, arg2...)
(notinit
) called implicitely by the MyClass table__call
, so it’d be helpful iflocal test = MyClass("hello", 42)
would be recognized as calling the constructor, thus proposing parameters autocompletion etc. - LuaCheck static analysis support (parsing its output to add inline annotations, for instance)
- More refactoring options like “Introduce variable” (like Sylvanaar’s in this video), methods, etc.
- More code style options (about indenting, especially)
- English documentation too 😄
Edit :
- Custom postfix completions isn’t possible until Intellij supports it, see https://youtrack.jetbrains.com/issue/IDEA-122443.
Also, regarding the plugin itself, you should add support for automatically report crashes to you (bug tracker in JetBrains I think?). Sylvanaar’s plugin (and others) are able to do that, so they gather user-reported bugs automatically (they just have to click a button to send a report when something goes wrong, and you get the backtrace)
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
How to Write A Good Bug Report? Tips and Tricks
Good Bug report should be clear and concise without any missing key points. Any lack of clarity leads to misunderstanding and slows down...
Read more >Bugs and Suggestions
An option to notify all group members or admins using a special mention (e.g. @all and @admins). Use cases Important news and major...
Read more >How to Help Prevent Bugs – Insect Prevention Tips - Raid
HOW TO HELP PREVENT BUGS. Bugs invade homes looking for food, water, or shelter. By eliminating the things that attract insects, you can...
Read more >Bugs and Suggestions - CodeProject
Bugs and Suggestions - Free source code and tutorials for Software ... General discussions, site bug reports and suggestions about the site.
Read more >Tips for Effectively Reporting Bugs and Issues - Sifter
Some easily shareable guidelines for writing good bug reports.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
oh, that’s my mistake. usage should be like this
but it doesn’t work, seems like a bug, let me fix
oh okay thanks 😃