-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
company backend #87
Comments
There's https://github.com/ptrv/company-lua for builtin stuff. As for dynamic completions, I don't think it will come soon. |
That is if you wait it from me :) But, of course, PRs are welcome. |
I have some code here for loading completions dynamically from a subprocess: http://p.hagelb.org/pnh-lua-completion.el.html It uses Emacs's built-in There are a few shortcomings; first that it uses a tempfile to communicate candidates back to Emacs. I believe this is the only way since lua-mode only seems to support one-way Emacs->Lua communication, but this is kind of tacky. Secondly it only supports completing from |
I have a new version that works with top-level lexical scope; however the means by which it accomplishes it is somewhat questionable: http://p.hagelb.org/pnh-lua-complete.el.html Basically it greps the file for "local x = require y" matches and then during the point of calculating the completions, it creates a clone of Anyway, this seems a lot more useful than completing based on |
I've taken technomancy's PR and fixed various issues that made CI testing fail, and made some significant improvements. These include using comint-redirect to avoid writing an external file, traversing the globals tree in a limited breadth-first search, caching completion results for speed, and more. Very usable at this point, including with company mode; see the discussion in the PR's: #147, #148 . |
It be great if lua-mode came with a company backend.
The text was updated successfully, but these errors were encountered: