aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2022-09-02 08:14:48 +0200
committerGitHub <noreply@github.com>2022-09-02 14:14:48 +0800
commitacae6772360c245d9bd8bd00b4bacdc3e6b79df0 (patch)
tree805a3e7ab444255829154c7c2f1380cfdafe8c2f /lua
parentdocs: update server_configurations.md (diff)
downloadnvim-lspconfig-acae6772360c245d9bd8bd00b4bacdc3e6b79df0.tar
nvim-lspconfig-acae6772360c245d9bd8bd00b4bacdc3e6b79df0.tar.gz
nvim-lspconfig-acae6772360c245d9bd8bd00b4bacdc3e6b79df0.tar.bz2
nvim-lspconfig-acae6772360c245d9bd8bd00b4bacdc3e6b79df0.tar.lz
nvim-lspconfig-acae6772360c245d9bd8bd00b4bacdc3e6b79df0.tar.xz
nvim-lspconfig-acae6772360c245d9bd8bd00b4bacdc3e6b79df0.tar.zst
nvim-lspconfig-acae6772360c245d9bd8bd00b4bacdc3e6b79df0.zip
feat: add luau_lsp (#2107)
Diffstat (limited to 'lua')
-rw-r--r--lua/lspconfig/server_configurations/luau_lsp.lua27
1 files changed, 27 insertions, 0 deletions
diff --git a/lua/lspconfig/server_configurations/luau_lsp.lua b/lua/lspconfig/server_configurations/luau_lsp.lua
new file mode 100644
index 00000000..c916114a
--- /dev/null
+++ b/lua/lspconfig/server_configurations/luau_lsp.lua
@@ -0,0 +1,27 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'luau-lsp', 'lsp' },
+ filetypes = { 'luau' },
+ root_dir = util.find_git_ancestor,
+ },
+ docs = {
+ [[
+https://github.com/JohnnyMorganz/luau-lsp
+
+Language server for the [Luau](https://luau-lang.org/) language.
+
+`luau-lsp` can be installed by downloading one of the release assets available at https://github.com/JohnnyMorganz/luau-lsp.
+
+You might also have to set up automatic filetype detection for Luau files, for example like so:
+
+```vim
+autocmd BufRead,BufNewFile *.luau setf luau
+```
+]],
+ default_config = {
+ root_dir = [[root_pattern(".git")]],
+ },
+ },
+}