fix(plugins): properly pass diagnostics settings to cosmic-ui

This commit is contained in:
Matt Leong 2021-12-06 12:35:01 -08:00
parent e13ad63873
commit 14bf17764e
2 changed files with 8 additions and 6 deletions

View file

@ -35,6 +35,7 @@ local default_config = {
local config = vim.tbl_deep_extend('force', default_config, user_config)
local user_servers = vim.tbl_keys(config.lsp.servers)
function config.lsp.can_client_format(client_name)
if config.lsp.servers[client_name] == true then
return true

View file

@ -106,16 +106,17 @@ return packer.startup(function()
local diagnostic = {}
local hover = {}
local signature_help = {}
local user_config = require('cosmic.config')
local icons = require('cosmic.theme.icons')
if config and config.lsp and config.lsp.diagnostic then
diagnostic = config.lsp.diagnostic
if user_config and user_config.lsp and user_config.lsp.diagnostic then
diagnostic = user_config.lsp.diagnostic
end
if config and config.lsp and config.lsp.hover then
hover = config.lsp.hover
if user_config and user_config.lsp and user_config.lsp.hover then
hover = user_config.lsp.hover
end
if config and config.lsp and config.lsp.signature_help then
signature_help = config.lsp.signature_help
if user_config and user_config.lsp and user_config.lsp.signature_help then
signature_help = user_config.lsp.signature_help
end
require('cosmic-ui').setup({