From 2544ef62f6c42607cc1300c7b487d20ca06ef1af Mon Sep 17 00:00:00 2001 From: Erasin Date: Tue, 24 May 2022 21:58:56 +0800 Subject: [PATCH 1/2] Add lua lsp --- book/src/generated/lang-support.md | 5 ++++- languages.toml | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md index df4d36b5c58d..113189a4933e 100644 --- a/book/src/generated/lang-support.md +++ b/book/src/generated/lang-support.md @@ -50,7 +50,7 @@ | llvm | ✓ | ✓ | ✓ | | | llvm-mir | ✓ | ✓ | ✓ | | | llvm-mir-yaml | ✓ | | ✓ | | -| lua | ✓ | | ✓ | | +| lua | ✓ | | ✓ | [lua-language-server][lua] | | make | ✓ | | | | | markdown | ✓ | | | | | meson | ✓ | | ✓ | | @@ -94,3 +94,6 @@ | wgsl | ✓ | | | | | yaml | ✓ | | ✓ | `yaml-language-server` | | zig | ✓ | | ✓ | `zls` | + + +[lua]: https://github.com/sumneko/lua-language-server diff --git a/languages.toml b/languages.toml index d3c4ef4353d6..2c79b977070e 100644 --- a/languages.toml +++ b/languages.toml @@ -605,9 +605,10 @@ name = "lua" scope = "source.lua" file-types = ["lua"] shebangs = ["lua"] -roots = [] +roots = [".luarc.json", ".luacheckrc", ".stylua.toml", "selene.toml", ".git"] comment-token = "--" indent = { tab-width = 2, unit = " " } +language-server = { command = "lua-language-server", args = [] } [[grammar]] name = "lua" From 584770ba396e2329827c5220f0f915da1f076c6a Mon Sep 17 00:00:00 2001 From: Erasin Date: Tue, 24 May 2022 22:47:29 +0800 Subject: [PATCH 2/2] fix lang-support.md ;remove lua lsp link. --- book/src/generated/lang-support.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md index 113189a4933e..908021cf0bb3 100644 --- a/book/src/generated/lang-support.md +++ b/book/src/generated/lang-support.md @@ -50,7 +50,7 @@ | llvm | ✓ | ✓ | ✓ | | | llvm-mir | ✓ | ✓ | ✓ | | | llvm-mir-yaml | ✓ | | ✓ | | -| lua | ✓ | | ✓ | [lua-language-server][lua] | +| lua | ✓ | | ✓ | `lua-language-server` | | make | ✓ | | | | | markdown | ✓ | | | | | meson | ✓ | | ✓ | | @@ -94,6 +94,3 @@ | wgsl | ✓ | | | | | yaml | ✓ | | ✓ | `yaml-language-server` | | zig | ✓ | | ✓ | `zls` | - - -[lua]: https://github.com/sumneko/lua-language-server