It must be noted that it doesn't perform a static analysis and is pretty much many regexes bundled together so it's actually dumb.Hi there and thank you for viewing my item! ![]() You only get functions defined above the code you are currently writing and doesn't follow requires so it's pretty much what ZeroBrane provides which is good enough for 90% of the cases. Note that I have made an issue in symbol-gen because currently it uses exuberant-ctags which is outdated, universal-ctags has better support for Lua. Using ctags (you don't actually need ctags installed because one of the packages installs it) and a combination of three packages, you basically install symbols-tree-view (not necessary 'cause you can use the bundled symbols-view), symbol-gen and autocomplete-ctags. I got something like this working (without the LuaDoc part) in Atom. So I can use code completion when working with some library, for example. I want it to read LuaDoc and trace types for at least some of the variables that I use. An actual code completion, not only for basic Lua functions and LOVE API but also for all my own functions and classes/tables I create. If you change the scope to "local", "Go to Definition" should work.Ģ. "Go to Definition" doesn't work because it's a global function (and those don't have "definitions"). Yet the code works fine.Ĭorrect as I mentioned, tooltips are not generated for user functions based on LDoc syntax. ![]() It doesn't get recognized, no tooltips, nothing. > And an invocation for this function below. > function createObject(x, y, width, height) Right, it's not available for user functions. Now the problem is that it only shows tops for built-in Lua and LOVE functions (and it mixes up different functions - if I hover over some user-defined function called "update" is shows all functions with the same name from LOVE API, but not the user function.). > OK the tooltip was suppressed because I used the referencepanel plugin. It's probably a small price to pay for it being correct most of the time. ![]() True, but there is no guarantee that the function is going to be available and to support that requires a different level of analysis right now the logic just looks if that symbol is available at the point in the code by scanning the tree generated by the parser. > Yeah but I'm INSIDE another function (not at the same level as function declaration), and so other function is available at the moment this function is being executed. > The IDE takes the scope into account, so if the function is defined below the spot you are typing in, it won't be offered in auto-complete. > Is this some kind of extended syntax? I don't see such syntax in LuaDoc It's covered in the LDoc manual (in the Tag modifiers section). ![]() OK the tooltip was suppressed because I used the referencepanel plugin. Try typing `love.draw(` and you should see its tooltip (assuming LOVE interpreter is set as the current one). Similarly, when you type `print(` you should see the same tooltip. For example, if you mouse over `print(123)`, you should see a tooltip with description for the "print" function. But in almost every other IDE such tips are usually displayed right next to the symbol or mouse cursor when you hover over it or press some key combination.īoth typing and mousing-over should work for all functions/methods the IDE "knows" about. There is no tooltips for functions and any other symbols, or maybe I don't understand how to configure them? I installed a plugin that displays some Lua reference tips (as well as LOVE API tips) inside the docked window in the bottom.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |