[Lua] Add lovr support
This commit is contained in:
14
lovr-integration.sh
Executable file
14
lovr-integration.sh
Executable 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
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user