From ad32aef55708cdfc20a0522e0925321f478600b5 Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Sun, 1 Nov 2026 23:09:49 +0000 Subject: [PATCH] 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. --- README.md | 1 + config/hypr/.luarc.json | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 config/hypr/.luarc.json diff --git a/README.md b/README.md index 39d2561..a3f6a28 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ The `config/` directory mirrors `$XDG_CONFIG_HOME`: ``` config/ ├── 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 ├── waybar/user-style.css # user layer; HyDE owns style.css/theme.css └── hyprlock/hyprlock.conf diff --git a/config/hypr/.luarc.json b/config/hypr/.luarc.json new file mode 100644 index 0000000..0cef594 --- /dev/null +++ b/config/hypr/.luarc.json @@ -0,0 +1,9 @@ +{ + "runtime.version": "Lua5.4", + "diagnostics.globals": [ + "hl", + "hyde", + "__require", + "vim" + ] +}