0

I have a Lua module written in C compiled as a shared library, but when I use the module, editors cannot autocomplete it because they cannot see the content of the library.

In C, editors can deduce from the header files, how do you do that in Lua?

The Lua standard library does that but I can't figure out how. Every lua editor can tell me about standard library functions (their signature and documentation). How does it get this info from? How do I add such documentation to my own lua module?

1
  • "How does it get this info from?" The editors probably hard-coded them (that is, they have some file(s) containing available stuff and they have a Lua standard library file already written). Lua's standard library isn't that big, after all. It is certainly not parsing a C header. Commented Mar 8, 2020 at 2:30

1 Answer 1

1

It depends on editor you use. Each editor has own implementation, and you must check documentation how to extend autocomplete.

For notepad++ documentation about autocomplete: https://npp-user-manual.org/docs/auto-completion/, and file for this: Notepad++\autoCompletion\lua.xml

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.