refactor(vim): update the LSP config to better support nvim dev

This commit is contained in:
Ade Attwood 2023-06-02 18:03:31 +01:00
parent 7940bd4b94
commit d196ed266b
2 changed files with 12 additions and 13 deletions

View file

@ -1,12 +1,5 @@
-- Rerun tests only if their modification time changed.
cache = true
std = luajit
codes = true codes = true
globals = {
self = false "vim",
"configz"
-- Global objects defined by the C code
read_globals = {
"vim",
} }

View file

@ -1,5 +1,8 @@
local lspconfig = require "lspconfig" local lspconfig = require "lspconfig"
local workspace_library = vim.api.nvim_get_runtime_file("lua", true)
table.insert(workspace_library, os.getenv("HOME") .. "/Code/src/github.com/AdeAttwood/Configz/definitions/configz.lua")
local servers = { local servers = {
-- Language servers for the day to day web development, could probably think -- Language servers for the day to day web development, could probably think
-- about loosing the html and css one and living with typescript, rescript -- about loosing the html and css one and living with typescript, rescript
@ -26,10 +29,13 @@ local servers = {
lua_ls = { lua_ls = {
settings = { settings = {
Lua = { Lua = {
runtime = { version = "LuaJIT" },
diagnostics = { globals = { "vim" } },
workspace = { library = vim.api.nvim_get_runtime_file("", true) },
telemetry = { enable = false }, telemetry = { enable = false },
runtime = { version = "LuaJIT" },
diagnostics = { globals = { "vim", "configz" } },
workspace = {
library = workspace_library,
checkThirdParty = false,
},
}, },
}, },
}, },