Skip to content

xmake-io/xmake-luals-addon

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XMake Lua Language Server Addon

This is the official lua language server addon for xmake, A cross-platform build utility based on Lua language.

Installation

For Zed Editor:

  Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression
scoop install extras/zed
scoop install main/lua
scoop install main/lua-language-server
git clone https://github.com/LuaLS/LLS-Addons.git; Set-Location LLS-Addons; git submodule update --init addons/xmake/module
  • Create an xmake project in the directory of your choice
xmake create -P "hello"
  • Open the project folder inside Zed Editor, then create a project settings file by pressing Ctrl + Shift + P and typing 'Open Project Settings', inside there point to the lua language server, by giving its binary directory
{
    "lsp": {
        "lua-language-server": {
            "binary": {
                "path": "C:/Users/cakit/scoop/apps/lua-language-server/current/bin/lua-language-server.exe"
            }
        }
    },
    "languages": {
        "Lua": {
            "language_servers": ["lua-language-server"]
        }
    }
}
  • Create .luarc.json file by running this command at the project directory, this file must point to your addons directory and the library folder of the xmake addon. Also disable the runtime builtin os module from showing up in the lsp.
@'
{
    "workspace.userThirdParty": ["C:/Users/cakit/Documents/LLS-Addons/addons"],
    "workspace.library": [
        "C:/Users/cakit/Documents/LLS-Addons/addons/xmake-luals-addon/library"
    ],
    "runtime.builtin":{
        "os": "disable"
    }
}
'@ | Out-File -Encoding utf8 .luarc.json

Authors

License

GPLv3

About

Lua-LS Addon for Xmake

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Lua 98.0%
  • Python 2.0%