Skip to content

AwesomeWM type definitions for use with Lua Language Server.

Notifications You must be signed in to change notification settings

SeleneCosmia/AwesomeWM

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LuaLS Definitions for AwesomeWM

Code annotation for Awesome window manager.

For more information about annotations see the LuaLS website.

Installation

  1. Clone this repository:

    git clone https://github.com/SeleneCosmia/AwesomeWM
    
  2. 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.

Setup

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
                }
            }
        }
    }
]

About

AwesomeWM type definitions for use with Lua Language Server.

Topics

Resources

Stars

Watchers

Forks

Languages

  • Lua 99.4%
  • Shell 0.6%