aboutsummaryrefslogtreecommitdiff
path: root/store/home/config/nvim/lua/setup/lsp/lua_ls.lua
diff options
context:
space:
mode:
Diffstat (limited to 'store/home/config/nvim/lua/setup/lsp/lua_ls.lua')
-rw-r--r--store/home/config/nvim/lua/setup/lsp/lua_ls.lua29
1 files changed, 29 insertions, 0 deletions
diff --git a/store/home/config/nvim/lua/setup/lsp/lua_ls.lua b/store/home/config/nvim/lua/setup/lsp/lua_ls.lua
new file mode 100644
index 0000000..93aa503
--- /dev/null
+++ b/store/home/config/nvim/lua/setup/lsp/lua_ls.lua
@@ -0,0 +1,29 @@
+local lspconfig = require("lspconfig")
+
+local function setup()
+ lspconfig.lua_ls.setup {
+ settings = {
+ Lua = {
+ runtime = {
+ version = "LuaJIT"
+ },
+ diagnostics = {
+ globals = { "vim" },
+ },
+ workspace = {
+ library = {
+ [vim.fn.expand "$VIMRUNTIME/lua"] = true,
+ [vim.fn.expand "$VIMRUNTIME/lua/vim/lsp"] = true,
+ [vim.fn.stdpath "data" .. "/lazy/lazy.nvim/lua/lazy"] = true,
+ },
+ maxPreload = 100000,
+ preloadFileSize = 10000,
+ },
+ },
+ },
+ }
+end
+
+return {
+ setup = setup
+}