[Lua] Load luarocks modules directory
This commit is contained in:
@@ -6,6 +6,10 @@ It uses Lazy.nvim as the plugin manager, lspconfig for the language server confi
|
|||||||
## Linter configs
|
## Linter configs
|
||||||
You may find the linter configs and setup-scripts for some linters that require some extra setup [here](https://git.janishutz.com/janishutz/dotfiles/)
|
You may find the linter configs and setup-scripts for some linters that require some extra setup [here](https://git.janishutz.com/janishutz/dotfiles/)
|
||||||
|
|
||||||
|
# Lua notes
|
||||||
|
To get your luarocks packages to be picked up by the language server, it is currently configured to only look at the `cwd` that nvim is open in.
|
||||||
|
I may expand that in the future to do a proper search for all open buffers, but that would require a language server restart to apply on every buffer add
|
||||||
|
|
||||||
# Issues with jdtls
|
# Issues with jdtls
|
||||||
Ensure you have jdk21-opnejdk or newer installed. On Arch (and derivatives) you can switch the preferred java version using `archlinux-java set <version name>`
|
Ensure you have jdk21-opnejdk or newer installed. On Arch (and derivatives) you can switch the preferred java version using `archlinux-java set <version name>`
|
||||||
|
|
||||||
|
|||||||
@@ -20,12 +20,13 @@ lsp.config("lua_ls", {
|
|||||||
library = {
|
library = {
|
||||||
vim.fn.expand("$VIMRUNTIME/lua"),
|
vim.fn.expand("$VIMRUNTIME/lua"),
|
||||||
vim.fn.stdpath("config") .. "/lua",
|
vim.fn.stdpath("config") .. "/lua",
|
||||||
vim.fn.expand("~/.luarocks/share/lua/5.3"),
|
vim.fn.expand("~/.luarocks/share/lua/5.4"),
|
||||||
-- To use LÖVR, follow https://lovr.org/docs/dev/VS_Code_Setup#manual-installation
|
-- 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
|
-- 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)
|
-- Then update the blow path (if you have not used the script in this repo)
|
||||||
vim.fn.expand("~/.local/share/lovr-docs/api/cats"),
|
vim.fn.expand("~/.local/share/lovr-docs/api/cats"),
|
||||||
"/usr/share/lua/5.3",
|
vim.fn.expand(vim.fn.getcwd() .. "/lua_modules/share/lua/5.4"),
|
||||||
|
"/usr/share/lua/5.4",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user