You've already forked dotfiles
feat: Removing nvim-lspconfig and starting the removal of Mason, adding
in LSP definitions for servers that are used, adding in a script to check for LSPs, removing some extraneous items in the tmux conf, moving autopairs to its own file
This commit is contained in:
@@ -1,9 +1,47 @@
|
||||
-- Lua LSP config handles the initialization of workspace folders to pull in library references for completion
|
||||
return {
|
||||
cmd = { 'lua-language-server' },
|
||||
filetypes = { 'lua' },
|
||||
on_init = function (client)
|
||||
if client.workspace_folders then
|
||||
local path = client.workspace_folders[1].name
|
||||
if
|
||||
path ~= vim.fn.stdpath('config')
|
||||
and (vim.uv.fs_stat(path .. '/.luarc.json') or vim.uv.fs_stat(path .. '/.luarc.jsonc'))
|
||||
then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua, {
|
||||
runtime = {
|
||||
version = 'LuaJIT',
|
||||
path = {
|
||||
'lua/?.lua',
|
||||
'lua/?/init.lua',
|
||||
},
|
||||
},
|
||||
workspace = {
|
||||
checkThirdParty = false,
|
||||
library = {
|
||||
vim.env.VIMRUNTIME,
|
||||
vim.api.nvim_get_runtime_file('lua/lspconfig', false)[1],
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
root_markers = {
|
||||
'.emmyrc.json',
|
||||
'.git',
|
||||
'.luachecrc',
|
||||
'.luarc.json',
|
||||
'.luarc.jsonc',
|
||||
'.stylua.toml',
|
||||
},
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
globals = { 'vim' }
|
||||
}
|
||||
}
|
||||
}
|
||||
codeLens = { enable = true },
|
||||
hint = { enable = true, semicolon = 'Disable' },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user