You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
LuaLS-style quoted literal aliases cause false type mismatches #1271
LuaLS-style string literal aliases use an outer single-quoted annotation string around a quoted literal, for example ---| '"fallback"'. EmmyLua accepts the syntax but does not match the Lua value 'fallback' against it, causing a false param-type-mismatch.
This affects existing Neovim plugin annotations. For example, stevearc/conform.nvim defines conform.LspFormatOpts this way, so its documented default_format_opts = { lsp_format = 'fallback' } configuration is reported as incompatible with conform.setupOpts.
warning: expected `SetupOpts?` but found `{ default_format_opts = table }`. [param-type-mismatch]
The same mismatch is reported by emmylua_ls when configuring Conform:
expected `conform.setupOpts?` but found `{ default_format_opts = table }`. [param-type-mismatch]
Expected behavior
No type mismatch. This literal alias spelling is used by LuaLS annotations in existing Lua projects and should describe the value fallback, not a string containing quote characters.
Changing the alias to EmmyLua's spelling makes the reproduction pass:
This syntax is actually not recommended for use. This syntax originally came from intellij-emmylua. Later, when the sumnek asked me about the syntax format for alias, I gave this version as an answer. This version is not very good. The version most people commonly use is the one without the middle quotation marks, so I set things right and removed support for this redundant version.
sorry for this issue - I accidentally let my agent open issues and PR when debugging emmylua warnings from nvim-lua/kickstart.nvim#2163, instead of just triaging the issues.
I'm closing this in favor of a fix in conform (stevearc/conform.nvim#902).
again, sorry for the spam and thanks for the quick response :)
Activity
CppCXY commentedon Oct 3, 2026
This syntax is actually not recommended for use. This syntax originally came from intellij-emmylua. Later, when the sumnek asked me about the syntax format for alias, I gave this version as an answer. This version is not very good. The version most people commonly use is the one without the middle quotation marks, so I set things right and removed support for this redundant version.
oriori1703 commentedon Oct 3, 2026
sorry for this issue - I accidentally let my agent open issues and PR when debugging emmylua warnings from nvim-lua/kickstart.nvim#2163, instead of just triaging the issues.
I'm closing this in favor of a fix in conform (stevearc/conform.nvim#902).
again, sorry for the spam and thanks for the quick response :)