fix(plugins): properly pass diagnostics settings to cosmic-ui
This commit is contained in:
parent
e13ad63873
commit
14bf17764e
2 changed files with 8 additions and 6 deletions
|
@ -35,6 +35,7 @@ local default_config = {
|
||||||
|
|
||||||
local config = vim.tbl_deep_extend('force', default_config, user_config)
|
local config = vim.tbl_deep_extend('force', default_config, user_config)
|
||||||
local user_servers = vim.tbl_keys(config.lsp.servers)
|
local user_servers = vim.tbl_keys(config.lsp.servers)
|
||||||
|
|
||||||
function config.lsp.can_client_format(client_name)
|
function config.lsp.can_client_format(client_name)
|
||||||
if config.lsp.servers[client_name] == true then
|
if config.lsp.servers[client_name] == true then
|
||||||
return true
|
return true
|
||||||
|
|
|
@ -106,16 +106,17 @@ return packer.startup(function()
|
||||||
local diagnostic = {}
|
local diagnostic = {}
|
||||||
local hover = {}
|
local hover = {}
|
||||||
local signature_help = {}
|
local signature_help = {}
|
||||||
|
local user_config = require('cosmic.config')
|
||||||
local icons = require('cosmic.theme.icons')
|
local icons = require('cosmic.theme.icons')
|
||||||
|
|
||||||
if config and config.lsp and config.lsp.diagnostic then
|
if user_config and user_config.lsp and user_config.lsp.diagnostic then
|
||||||
diagnostic = config.lsp.diagnostic
|
diagnostic = user_config.lsp.diagnostic
|
||||||
end
|
end
|
||||||
if config and config.lsp and config.lsp.hover then
|
if user_config and user_config.lsp and user_config.lsp.hover then
|
||||||
hover = config.lsp.hover
|
hover = user_config.lsp.hover
|
||||||
end
|
end
|
||||||
if config and config.lsp and config.lsp.signature_help then
|
if user_config and user_config.lsp and user_config.lsp.signature_help then
|
||||||
signature_help = config.lsp.signature_help
|
signature_help = user_config.lsp.signature_help
|
||||||
end
|
end
|
||||||
|
|
||||||
require('cosmic-ui').setup({
|
require('cosmic-ui').setup({
|
||||||
|
|
Loading…
Add table
Reference in a new issue