[Lua] Add lovr support

This commit is contained in:
2026-03-11 15:06:31 +01:00
parent bc8830555e
commit 4a2203892f
2 changed files with 37 additions and 18 deletions

14
lovr-integration.sh Executable file
View File

@@ -0,0 +1,14 @@
#!/bin/sh
cd ~/.local/share
if [[ -d lovr-docs ]] then
echo "Already present, updating repo"
cd lovr-docs
git pull
else
git clone https://bjornbytes/lovr-docs
cd lovr-docs
fi
lovr api cats

View File

@@ -18,15 +18,20 @@ lsp.config("lua_ls", {
workspace = {
-- make language server aware of runtime files
library = {
[vim.fn.expand("$VIMRUNTIME/lua")] = true,
[vim.fn.stdpath("config") .. "/lua"] = true,
vim.fn.expand("$VIMRUNTIME/lua"),
vim.fn.stdpath("config") .. "/lua",
vim.fn.expand("~/.luarocks/share/lua/5.3"),
-- To use LÖVR, follow https://lovr.org/docs/dev/VS_Code_Setup#manual-installation
-- TL;DR run lovr api cats in the lovr-docs repo and update the path below
-- Then update the blow path (if you have not used the script in this repo)
vim.fn.expand("~/.local/share/lovr-docs/api/cats/"),
"/usr/share/lua/5.3",
},
},
},
},
})
-- ── Enable configs ───────────────────────────────────────────────
local enable = vim.lsp.enable
enable("lua_ls")