From af18201866ea29d179fd61bacd36b849a7d86a7d Mon Sep 17 00:00:00 2001 From: Ariel D'Alessandro Date: Mon, 18 Sep 2023 23:13:11 +0200 Subject: refactor lsp configurations --- lua/alpha/lsp/servers/lua_ls.lua | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 lua/alpha/lsp/servers/lua_ls.lua (limited to 'lua/alpha/lsp/servers/lua_ls.lua') diff --git a/lua/alpha/lsp/servers/lua_ls.lua b/lua/alpha/lsp/servers/lua_ls.lua new file mode 100644 index 0000000..64f012c --- /dev/null +++ b/lua/alpha/lsp/servers/lua_ls.lua @@ -0,0 +1,29 @@ +local lsp_attach = require "alpha.lsp.attach" +local lsp_flags = require("alpha.lsp.flags") + +return function(ops) + return vim.tbl_extend("force", { + on_attach = lsp_attach, + flags = lsp_flags, + settings = { + Lua = { + runtime = { + version = "LuaJIT", + }, + diagnostics = { + globals = { "vim" }, + }, + workspace = { + library = vim.api.nvim_get_runtime_file("", true), + checkThirdParty = false, + }, + telemetry = { + enable = false, + }, + hint = { + enable = true, + }, + }, + }, + }, ops) +end -- cgit v1.2.3