Code annotation for Awesome window manager.
For more information about annotations see the LuaLS website.
-
Clone this repository:
git clone https://github.com/SeleneCosmia/AwesomeWM
-
Add this repository as a git submodule by running the following command in your config directory:
git submodule add https://github.com/SeleneCosmia/AwesomeWM
[!TIP] You can optionally choose the path to clone the git submodule into by adding a path to the end of the above command. For example:
git submodule add https://github.com/SeleneCosmia/AwesomeWM library/awesome
This will clone the repo into a directory named 'awesome' inside of the library directory which is in the root of your git repository.
Tip
There are several ways to define the settings. See the wiki for more information.
.luarc.json (lua-ls)
Add a .luarc.json file to your config directory.
In it, add the path to the cloned repository to the workspace.library
setting:
{
"workspace.library": [
"/path/to/this-repo"
]
}
VS Code (Lua extension)
Add the path to the cloned repository to the Lua.workspace.library
setting:
{
"Lua.workspace.library": ["/home/user/path/to/this-repo"]
}
Neovim (nvim-lspconfig plugin)
Add the path to the cloned repository to settings.Lua.workspace.library
setting:
require("lspconfig")["lua_ls"].setup({
settings = {
Lua = {
workspace = {
library = {
-- other library definition...
["/path/to/this-repo"] = true
}
}
}
}
})
Lite-XL (lite-xl-lsp plugin)
Add the path to the cloned repository to settings.Lua.workspace.library
setting:
require("plugins.lsp").add_server {
name = "lua-language-server",
language = "lua",
file_patterns = { "%.lua$" },
command = { 'lua-language-server' },
verbose = false,
settings = {
Lua = {
workspace = {
library = {
["/path/to/this-repo"] = true
}
}
}
}
]