local lspconfig = require("lspconfig") local function on_attach() vim.cmd("doautocmd User lspAttached") end lspconfig.lua_ls.setup { on_attach = on_attach, settings = { Lua = { diagnostics = { globals = { 'vim' } } } } } local signs = { Error = " ", Warn = " ", Hint = " ", Info = " " } for type, icon in pairs(signs) do local hl = "DiagnosticSign" .. type vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl }) end