aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim-lsp-installer/servers/sumneko_lua/init.lua
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2021-08-14 23:19:23 +0200
committerWilliam Boman <william@redwill.se>2021-08-15 00:47:15 +0200
commitd8f4f30463fcfc4b8b60811dbe195aba86917966 (patch)
treec6a004cb1a08921184f7b5d85721e9144f20aa00 /lua/nvim-lsp-installer/servers/sumneko_lua/init.lua
parentadd `env` option to shell.raw, and other cosmetic improvements (diff)
downloadmason-d8f4f30463fcfc4b8b60811dbe195aba86917966.tar
mason-d8f4f30463fcfc4b8b60811dbe195aba86917966.tar.gz
mason-d8f4f30463fcfc4b8b60811dbe195aba86917966.tar.bz2
mason-d8f4f30463fcfc4b8b60811dbe195aba86917966.tar.lz
mason-d8f4f30463fcfc4b8b60811dbe195aba86917966.tar.xz
mason-d8f4f30463fcfc4b8b60811dbe195aba86917966.tar.zst
mason-d8f4f30463fcfc4b8b60811dbe195aba86917966.zip
stylua
Diffstat (limited to 'lua/nvim-lsp-installer/servers/sumneko_lua/init.lua')
-rw-r--r--lua/nvim-lsp-installer/servers/sumneko_lua/init.lua34
1 files changed, 19 insertions, 15 deletions
diff --git a/lua/nvim-lsp-installer/servers/sumneko_lua/init.lua b/lua/nvim-lsp-installer/servers/sumneko_lua/init.lua
index 01828749..bda3718c 100644
--- a/lua/nvim-lsp-installer/servers/sumneko_lua/init.lua
+++ b/lua/nvim-lsp-installer/servers/sumneko_lua/init.lua
@@ -1,8 +1,8 @@
-local server = require("nvim-lsp-installer.server")
-local path = require("nvim-lsp-installer.path")
-local zx = require("nvim-lsp-installer.installers.zx")
+local server = require "nvim-lsp-installer.server"
+local path = require "nvim-lsp-installer.path"
+local zx = require "nvim-lsp-installer.installers.zx"
-local root_dir = server.get_server_root_path("lua")
+local root_dir = server.get_server_root_path "lua"
local uname_alias = {
Darwin = "macOS",
@@ -13,29 +13,33 @@ local bin_dir = uname_alias[uname] or uname
return server.Server:new {
name = "sumneko_lua",
root_dir = root_dir,
- installer = zx.file("./install.mjs"),
+ installer = zx.file "./install.mjs",
pre_install_check = function()
- if vim.fn.executable("ninja") ~= 1 then
- error("ninja not installed (see https://github.com/ninja-build/ninja/wiki/Pre-built-Ninja-packages)")
+ if vim.fn.executable "ninja" ~= 1 then
+ error "ninja not installed (see https://github.com/ninja-build/ninja/wiki/Pre-built-Ninja-packages)"
end
end,
default_options = {
- cmd = { path.concat { root_dir, "bin", bin_dir, "lua-language-server" }, "-E", path.concat { root_dir, "main.lua" } },
+ cmd = {
+ path.concat { root_dir, "bin", bin_dir, "lua-language-server" },
+ "-E",
+ path.concat { root_dir, "main.lua" },
+ },
settings = {
Lua = {
diagnostics = {
-- Get the language server to recognize the `vim` global
- globals = {"vim"}
+ globals = { "vim" },
},
workspace = {
-- Make the server aware of Neovim runtime files
library = {
- [vim.fn.expand("$VIMRUNTIME/lua")] = true,
- [vim.fn.expand("$VIMRUNTIME/lua/vim/lsp")] = true,
+ [vim.fn.expand "$VIMRUNTIME/lua"] = true,
+ [vim.fn.expand "$VIMRUNTIME/lua/vim/lsp"] = true,
},
- maxPreload = 10000
- }
- }
+ maxPreload = 10000,
+ },
+ },
},
- }
+ },
}