Browse Source

fix(config): set termguicolors on start, avoid a strange error that I was having

my-config
NTBBloodbath 3 years ago
parent
commit
0bad1c3693
No known key found for this signature in database GPG Key ID: 18D6730BC846AAC5
  1. 62
      lua/doom/core/config/init.lua

62
lua/doom/core/config/init.lua

@ -24,6 +24,11 @@ else
)
end
-- Set termguicolors on load
if vim.fn.has('vim_starting') then
vim.opt.termguicolors = true
end
-- {{{ Default doom_config values
-- default_doom_config_values loads the default doom_config values
@ -418,31 +423,38 @@ end
--
-- @param langs The list of languages in the doomrc
M.install_servers = function(langs)
local lspinstall = require('lspinstall')
local installed_servers = lspinstall.installed_servers()
local available_servers = lspinstall.available_servers()
for _, lang in ipairs(langs) do
local lang_str = lang
lang = lang:gsub('%s+%+lsp', '')
-- If the +lsp flag exists and the language server is not installed yet
if
lang_str:find('%+lsp')
and (not utils.has_value(installed_servers, lang))
then
-- Try to install the server only if there is a server available for
-- the language, oterwise raise a warning
if utils.has_value(available_servers, lang) then
lspinstall.install_server(lang)
else
log.warn(
'The language '
.. lang
.. ' does not have a server, please remove the "+lsp" flag'
)
end
end
-- selene: allow(undefined_variable)
if
packer_plugins
and packer_plugins['lspinstall']
and packer_plugins['lspinstall'].loaded
then
local lspinstall = require('lspinstall')
local installed_servers = lspinstall.installed_servers()
local available_servers = lspinstall.available_servers()
for _, lang in ipairs(langs) do
local lang_str = lang
lang = lang:gsub('%s+%+lsp', '')
-- If the +lsp flag exists and the language server is not installed yet
if
lang_str:find('%+lsp')
and (not utils.has_value(installed_servers, lang))
then
-- Try to install the server only if there is a server available for
-- the language, oterwise raise a warning
if utils.has_value(available_servers, lang) then
lspinstall.install_server(lang)
else
log.warn(
'The language '
.. lang
.. ' does not have a server, please remove the "+lsp" flag'
)
end
end
end
end
end

Loading…
Cancel
Save