Add .luarc.json to silence lua-language-server 'Undefined global hl'
Hyprland injects hl/hyde/__require as globals at runtime; the LSP lints against stock Lua 5.4 and flags every use. Declaring them as known globals in ~/.config/hypr/.luarc.json clears the diagnostics for all Lua files in that directory.
This commit is contained in:
1 parent
84357d4f1f
commit
ad32aef557
2 files changed
+10
No files matched your search
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"runtime.version": "Lua5.4",
|
||||
"diagnostics.globals": [
|
||||
"hl",
|
||||
"hyde",
|
||||
"__require",
|
||||
"vim"
|
||||
]
|
||||
}
|
||||
Reference in new issue
Block a user