Skip to content

Commit

Permalink
Merge branch 'master' of github.com:CppCXY/lua-language-server
Browse files Browse the repository at this point in the history
  • Loading branch information
CppCXY committed Feb 22, 2024
2 parents 483fe24 + 3e6fd3c commit 9b6df71
Show file tree
Hide file tree
Showing 890 changed files with 13,554 additions and 93,956 deletions.
4 changes: 0 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ continuation_indent = 4
# this option decides when to chopdown the code
max_line_length = 120

# optional crlf/lf/cr/auto, if it is 'auto', in windows it is crlf other platforms are lf
# in neovim the value 'auto' is not a valid option, please use 'unset'
end_of_line = auto

#optional keep/never/always/smart
trailing_table_separator = keep

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ body:
label: Log File
description: >
Please provide your log file. Refer to the wiki to find your log file:
https://github.com/LuaLS/lua-language-server/wiki/FAQ#where-can-i-find-the-log-file
https://luals.github.io/wiki/faq#where-can-i-find-the-log-file
- type: markdown
attributes:
value: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
if: ${{ matrix.target == 'linux' && matrix.libc == 'musl' }}
run: |
apk update
apk add git ninja bash build-base nodejs
apk add git ninja bash build-base nodejs linux-headers
- uses: actions/checkout@v3
with:
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: test
on: [ push, pull_request ]
jobs:
test:
strategy:
fail-fast: false
matrix:
include:
- { os: ubuntu-20.04, platform: linux-x64 }
- { os: macos-latest, platform: darwin-x64 }
- { os: windows-latest, platform: win32-x64 }
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actboy168/setup-luamake@master
- run: luamake -platform ${{ matrix.platform }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
/meta/*
!/meta/template
!/meta/3rd
!/meta/whimsical
/bin*
42 changes: 42 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,45 @@
[submodule "3rd/json.lua"]
path = 3rd/json.lua
url = https://github.com/actboy168/json.lua
[submodule "meta/3rd/OpenResty"]
path = meta/3rd/OpenResty
url = https://github.com/LuaCATS/openresty.git
[submodule "meta/3rd/bee"]
path = meta/3rd/bee
url = https://github.com/LuaCATS/bee.git
[submodule "meta/3rd/busted"]
path = meta/3rd/busted
url = https://github.com/LuaCATS/busted.git
[submodule "meta/3rd/Cocos4.0"]
path = meta/3rd/Cocos4.0
url = https://github.com/LuaCATS/cocos4.0.git
[submodule "meta/3rd/Defold"]
path = meta/3rd/Defold
url = https://github.com/LuaCATS/defold.git
[submodule "meta/3rd/Jass"]
path = meta/3rd/Jass
url = https://github.com/LuaCATS/jass.git
[submodule "meta/3rd/lfs"]
path = meta/3rd/lfs
url = https://github.com/LuaCATS/luafilesystem.git
[submodule "meta/3rd/love2d"]
path = meta/3rd/love2d
url = https://github.com/LuaCATS/love2d.git
[submodule "meta/3rd/lovr"]
path = meta/3rd/lovr
url = https://github.com/LuaCATS/lovr.git
[submodule "meta/3rd/luaecs"]
path = meta/3rd/luaecs
url = https://github.com/LuaCATS/luaecs.git
[submodule "meta/3rd/luassert"]
path = meta/3rd/luassert
url = https://github.com/LuaCATS/luassert.git
[submodule "meta/3rd/skynet"]
path = meta/3rd/skynet
url = https://github.com/LuaCATS/skynet.git
[submodule "meta/3rd/ffi-reflect"]
path = meta/3rd/ffi-reflect
url = https://github.com/LuaCATS/ffi-reflect.git
[submodule "meta/3rd/luv"]
path = meta/3rd/luv
url = https://github.com/LuaCATS/luv.git
3 changes: 2 additions & 1 deletion .luarc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"disable": [
"close-non-object",
"incomplete-signature-doc",
"missing-global-doc"
"missing-global-doc",
"missing-local-export-doc"
],
"groupFileStatus": {
"ambiguity": "Any",
Expand Down
27 changes: 14 additions & 13 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@
"stopOnEntry": false,
"program": "${workspaceRoot}/test.lua",
"luaexe": "${workspaceFolder}/bin/lua-language-server",
"cpath": null,
"arg": [
],
"luaVersion": "5.4",
"luaVersion": "lua54",
"sourceCoding": "utf8",
"console": "internalConsole",
"console": "integratedTerminal",
"internalConsoleOptions": "openOnSessionStart",
"outputCapture": [
"print",
"stderr",
Expand All @@ -36,9 +34,6 @@
]
],
"windows": {
"name": "🍄attach",
"type": "lua",
"request": "attach",
"sourceMaps": [
[
"script\\*",
Expand All @@ -55,9 +50,11 @@
"luaexe": "${workspaceFolder}/bin/lua-language-server",
"program": "${workspaceRoot}/tools/build-3rd-meta.lua",
"cpath": "${workspaceFolder}/bin/?.dll;${workspaceFolder}/bin/?.so",
"console": "integratedTerminal",
"internalConsoleOptions": "openOnSessionStart",
"arg": [
],
"luaVersion": "latest",
"luaVersion": "lua-latest",
"sourceCoding": "utf8",
"outputCapture": [
"print",
Expand All @@ -72,9 +69,11 @@
"luaexe": "${workspaceFolder}/bin/lua-language-server",
"program": "${workspaceRoot}/tools/locale.lua",
"cpath": "${workspaceFolder}/bin/?.dll;${workspaceFolder}/bin/?.so",
"console": "integratedTerminal",
"internalConsoleOptions": "openOnSessionStart",
"arg": [
],
"luaVersion": "latest",
"luaVersion": "lua-latest",
"sourceCoding": "utf8",
"outputCapture": [
"print",
Expand All @@ -89,9 +88,11 @@
"luaexe": "${workspaceFolder}/bin/lua-language-server",
"program": "${workspaceRoot}/tools/build-doc.lua",
"cpath": "${workspaceFolder}/bin/?.dll;${workspaceFolder}/bin/?.so",
"console": "integratedTerminal",
"internalConsoleOptions": "openOnSessionStart",
"arg": [
],
"luaVersion": "latest",
"luaVersion": "lua-latest",
"sourceCoding": "utf8",
"outputCapture": [
"print",
Expand All @@ -110,7 +111,7 @@
"--check",
"${workspaceRoot}",
],
"luaVersion": "5.4",
"luaVersion": "lua-latest",
"sourceCoding": "utf8",
"outputCapture": [
"print",
Expand All @@ -129,7 +130,7 @@
"--doc",
"${workspaceRoot}",
],
"luaVersion": "5.4",
"luaVersion": "lua-latest",
"sourceCoding": "utf8",
"outputCapture": [
"print",
Expand Down
2 changes: 1 addition & 1 deletion 3rd/bee.lua
Submodule bee.lua updated 153 files
2 changes: 1 addition & 1 deletion 3rd/json.lua
2 changes: 1 addition & 1 deletion 3rd/lovr-api
Submodule lovr-api updated 372 files
2 changes: 1 addition & 1 deletion 3rd/lpeglabel
2 changes: 1 addition & 1 deletion 3rd/luamake
Submodule luamake updated 55 files
+132 −0 .editorconfig
+4 −4 .github/workflows/publish.yml
+10 −5 README.md
+1 −1 bee.lua
+1 −1 compile/install.bat
+24 −29 compile/install.sh
+4 −2 compile/msvc/find_msvc.bat
+0 −2 compile/msvc/find_winsdk.bat
+1 −1 compile/msvc/setpath.bat
+34 −24 compile/ninja/android.ninja
+32 −22 compile/ninja/freebsd.ninja
+31 −21 compile/ninja/linux.ninja
+35 −26 compile/ninja/macos.ninja
+39 −26 compile/ninja/mingw.ninja
+50 −33 compile/ninja/msvc.ninja
+32 −22 compile/ninja/netbsd.ninja
+32 −22 compile/ninja/openbsd.ninja
+2 −2 make.lua
+14 −14 scripts/action.lua
+5 −5 scripts/arguments.lua
+1 −1 scripts/command/clean.lua
+2 −2 scripts/command/help.lua
+1 −1 scripts/command/lua.lua
+1 −1 scripts/command/shell.lua
+1 −1 scripts/command/test.lua
+54 −21 scripts/compiler/clang.lua
+43 −14 scripts/compiler/emcc.lua
+123 −82 scripts/compiler/gcc.lua
+98 −73 scripts/compiler/msvc.lua
+44 −40 scripts/env/find_msvc.lua
+16 −16 scripts/env/msvc.lua
+56 −0 scripts/env/ndk.lua
+29 −19 scripts/fsutil.lua
+16 −11 scripts/glob.lua
+18 −14 scripts/globals.lua
+55 −20 scripts/log.lua
+2 −2 scripts/lua_def.lua
+13 −24 scripts/lua_support.lua
+1 −5 scripts/main.lua
+44 −35 scripts/ninja_syntax.lua
+18 −4 scripts/ninja_writer.lua
+10 −5 scripts/pathutil.lua
+14 −10 scripts/perf.lua
+25 −28 scripts/sandbox.lua
+0 −133 scripts/simulator.lua
+1 −1 scripts/version.lua
+46 −0 scripts/workspace.lua
+313 −156 scripts/writer.lua
+16 −11 tools/lua54/lua.h
+10 −3 tools/lua54/luaconf.h
+303 −0 tools/lua55/lauxlib.h
+553 −0 tools/lua55/lua.h
+9 −0 tools/lua55/lua.hpp
+802 −0 tools/lua55/luaconf.h
+65 −0 tools/lua55/lualib.h
59 changes: 25 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,43 @@
# lua-language-server

[![build](https://github.com/LuaLS/lua-language-server/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/LuaLS/lua-language-server/actions/workflows/build.yml)
[![version](https://vsmarketplacebadges.dev/version-short/sumneko.lua.svg)](https://marketplace.visualstudio.com/items?itemName=sumneko.lua)
![installs](https://vsmarketplacebadges.dev/installs-short/sumneko.lua.svg)
![downloads](https://vsmarketplacebadges.dev/downloads-short/sumneko.lua.svg)
![build](https://img.shields.io/github/actions/workflow/status/LuaLS/lua-language-server/.github%2Fworkflows%2Fbuild.yml)
![Version (including pre-releases)](https://img.shields.io/visual-studio-marketplace/v/sumneko.lua)
![Installs](https://img.shields.io/visual-studio-marketplace/i/sumneko.lua)
![Downloads](https://img.shields.io/visual-studio-marketplace/d/sumneko.lua)


***Lua development just got a whole lot better*** 🧠

The Lua language server provides various language features for Lua to make development easier and faster. With around half a million installs on Visual Studio Code, it is the most popular extension for Lua language support.
The Lua language server provides various language features for Lua to make development easier and faster. With nearly a million installs in Visual Studio Code, it is the most popular extension for Lua language support.

[See our website for more info](https://luals.github.io).

## Features

- ⚙️ Supports `Lua 5.4`, `Lua 5.3`, `Lua 5.2`, `Lua 5.1`, and `LuaJIT`
- 📄 Over 20 supported [annotations](https://github.com/LuaLS/lua-language-server/wiki/Annotations) for documenting your code
- 📄 Over 20 supported [annotations](https://luals.github.io/wiki/annotations/) for documenting your code
- ↪ Go to definition
- 🦺 Dynamic [type checking](https://github.com/LuaLS/lua-language-server/wiki/Type-Checking)
- 🦺 Dynamic [type checking](https://luals.github.io/wiki/type-checking/)
- 🔍 Find references
- ⚠️ [Diagnostics/Warnings](https://github.com/LuaLS/lua-language-server/wiki/Diagnostics)
- 🕵️ [Syntax checking](https://github.com/LuaLS/lua-language-server/wiki/Syntax-Errors)
- ⚠️ [Diagnostics/Warnings](https://luals.github.io/wiki/diagnostics/)
- 🕵️ [Syntax checking](https://luals.github.io/wiki/syntax-errors/)
- 📝 Element renaming
- 🗨️ Hover to view details on variables, functions, and more
- 🖊️ Autocompletion
- 📚 Support for [libraries](https://github.com/LuaLS/lua-language-server/wiki/Libraries)
- 💅 [Code formatting](https://github.com/LuaLS/lua-language-server/wiki/Formatter)
- 💬 [Spell checking](https://github.com/LuaLS/lua-language-server/wiki/Formatter)
- 🛠️ Custom [plugins](https://github.com/LuaLS/lua-language-server/wiki/Plugins)
- 📖 [Documentation Generation](https://github.com/LuaLS/lua-language-server/wiki/Export-Documentation)
- 📚 Support for [libraries](https://luals.github.io/wiki/settings/#workspacelibrary)
- 💅 [Code formatting](https://luals.github.io/wiki/formatter/)
- 💬 [Spell checking](https://luals.github.io/wiki/diagnostics/#spell-check)
- 🛠️ Custom [plugins](https://luals.github.io/wiki/plugins/)
- 📖 [Documentation Generation](https://luals.github.io/wiki/export-docs/)

## Install
The language server can be installed for use in Visual Studio Code, NeoVim, and any [other clients](https://microsoft.github.io/language-server-protocol/implementors/tools/) that support the [Language Server Protocol](https://microsoft.github.io/language-server-protocol/). The language server can be configured using a [configuration file](https://github.com/LuaLS/lua-language-server/wiki/Configuration-File). For a more detailed intro, check out the [getting started page in the wiki](https://github.com/LuaLS/lua-language-server/wiki/Getting-Started).

### Visual Studio Code
[![Install in VS Code](https://img.shields.io/badge/VS%20Code-Install-blue?style=for-the-badge&logo=visualstudiocode "Install in VS Code")](https://marketplace.visualstudio.com/items?itemName=sumneko.lua)

The language server and Visual Studio Code client can be installed from [the VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=sumneko.lua).

### NeoVim
[![Install for NeoVim](https://img.shields.io/badge/NeoVim-Install-blue?style=for-the-badge&logo=neovim "Install for NeoVim")](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#lua_ls)

View the installation instructions for NeoVim in the [nvim-lspconfig repo](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#lua_ls).

For a guide to getting started from scratch using Mason, read [Heiker's guide](https://dev.to/vonheikemen/getting-started-with-neovims-native-lsp-client-in-the-year-of-2022-the-easy-way-bp3).
The language server can be installed for use in Visual Studio Code, NeoVim, and any [other clients](https://microsoft.github.io/language-server-protocol/implementors/tools/) that support the [Language Server Protocol](https://microsoft.github.io/language-server-protocol/).

### Command Line
[![Install for command line](https://img.shields.io/badge/Command%20Line-Install-blue?style=for-the-badge&logo=windowsterminal "Install for command line")](https://github.com/LuaLS/lua-language-server/wiki/Getting-Started#command-line)
See [installation instructions on our website](https://luals.github.io/#install).

Check the [wiki for a guide](https://github.com/LuaLS/lua-language-server/wiki/Getting-Started#command-line) to install the language server for use on the command line. This allows the language server to be used with [other clients](https://microsoft.github.io/language-server-protocol/implementors/tools/) that follow the [language server protocol](https://microsoft.github.io/language-server-protocol/overviews/lsp/overview/).
[![Install in VS Code](https://img.shields.io/badge/VS%20Code-Install-blue?style=for-the-badge&logo=visualstudiocode "Install in VS Code")](https://luals.github.io/#vscode-install)
[![Install for NeoVim](https://img.shields.io/badge/NeoVim-Install-blue?style=for-the-badge&logo=neovim "Install for NeoVim")](https://luals.github.io/#neovim-install)
[![Other](https://img.shields.io/badge/Other-Install-blue?style=for-the-badge&logo=windowsterminal "Install for command line")](https://luals.github.io/#other-install)

### Community Install Methods
The install methods below are maintained by community members.
Expand All @@ -55,8 +46,8 @@ The install methods below are maintained by community members.

## Links
- [Changelog](https://github.com/LuaLS/lua-language-server/blob/master/changelog.md)
- [Wiki](https://github.com/LuaLS/lua-language-server/wiki)
- [FAQ](https://github.com/LuaLS/lua-language-server/wiki/FAQ)
- [Wiki](https://luals.github.io/wiki)
- [FAQ](https://luals.github.io/wiki/faq)
- [Report an issue][issues]
- [Suggest a feature][issues]
- [Discuss](https://github.com/LuaLS/lua-language-server/discussions)
Expand All @@ -79,13 +70,13 @@ The install methods below are maintained by community members.
> **Note**
> All translations are provided and collaborated on by the community. If you find an inappropriate or harmful translation, [please report it immediately](https://github.com/LuaLS/lua-language-server/issues).
Are you able to [provide a translation](https://github.com/LuaLS/lua-language-server/wiki/Translations)? It would be greatly appreciated!
Are you able to [provide a translation](https://luals.github.io/wiki/translations)? It would be greatly appreciated!

Thank you to [all contributors of translations](https://github.com/LuaLS/lua-language-server/commits/master/locale)!


## Privacy
The language server had **opt-in** telemetry that collected usage data and sent it to the development team to help improve the extension. Read our [privacy policy](https://github.com/LuaLS/lua-language-server/wiki/Home#privacy) to learn more. Telemetry was removed in `v3.6.5` and is no longer part of the language server.
The language server had **opt-in** telemetry that collected usage data and sent it to the development team to help improve the extension. Read our [privacy policy](https://luals.github.io/privacy#language-server) to learn more. Telemetry was removed in `v3.6.5` and is no longer part of the language server.


## Contributors
Expand Down
Loading

0 comments on commit 9b6df71

Please sign in to comment.