my demo first config lua
This commit is contained in:
36
lua/alpha/lsp/servers/lua_ls.lua
Normal file
36
lua/alpha/lsp/servers/lua_ls.lua
Normal file
@@ -0,0 +1,36 @@
|
||||
local lsp_attach = require "alpha.lsp.attach"
|
||||
local lsp_flags = require "alpha.lsp.flags"
|
||||
|
||||
return function(ops)
|
||||
if ops.neodev == true then
|
||||
require("neodev").setup()
|
||||
end
|
||||
|
||||
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,
|
||||
},
|
||||
completion = {
|
||||
callSnippet = "Replace",
|
||||
},
|
||||
},
|
||||
},
|
||||
}, ops)
|
||||
end
|
||||
Reference in New Issue
Block a user