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
@@ -13,6 +13,7 @@ The `config/` directory mirrors `$XDG_CONFIG_HOME`:
|
|||||||
```
|
```
|
||||||
config/
|
config/
|
||||||
├── hypr/hyprland.lua # HyDE's user override layer (never overwritten by HyDE)
|
├── hypr/hyprland.lua # HyDE's user override layer (never overwritten by HyDE)
|
||||||
|
├── hypr/.luarc.json # lua-language-server: silence "Undefined global hl" in Neovim
|
||||||
├── kitty/kitty.conf # fully user-owned
|
├── kitty/kitty.conf # fully user-owned
|
||||||
├── waybar/user-style.css # user layer; HyDE owns style.css/theme.css
|
├── waybar/user-style.css # user layer; HyDE owns style.css/theme.css
|
||||||
└── hyprlock/hyprlock.conf
|
└── hyprlock/hyprlock.conf
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"runtime.version": "Lua5.4",
|
||||||
|
"diagnostics.globals": [
|
||||||
|
"hl",
|
||||||
|
"hyde",
|
||||||
|
"__require",
|
||||||
|
"vim"
|
||||||
|
]
|
||||||
|
}
|
||||||
Reference in new issue
Block a user