Skip to content
Discussion options

You must be logged in to vote

An addon can include a plugin.lua, but LuaLS plugins operate on the language-server analysis pipeline; they are not a replacement formatter API. The built-in formatter is EmmyLuaCodeStyle and is configured through .editorconfig / Lua.format.defaultConfig.

For Premake's indentation-by-function-call semantics, first check whether EmmyLuaCodeStyle can express the layout you need. If it cannot, the robust approach is a separate Premake-aware formatter that implements your editor's formatting command (or an LSP textDocument/formatting server), while keeping the LLS addon for definitions and diagnostics.

In other words: the definitions belong in this addon, but a formatter with Premake-specific…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@lolrobbe2
Comment options

Answer selected by lolrobbe2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants