fix(config): pass along diagnostic configs to cosmic-ui
This commit is contained in:
parent
3c1a01664d
commit
14f4d39ad7
2 changed files with 25 additions and 1 deletions
lua/cosmic
|
@ -62,6 +62,10 @@ config.lsp = {
|
|||
-- See Cosmic defaults lsp/providers/tsserver.lua
|
||||
-- If adding additional sources, be sure to also copy the defaults that you would like to preserve from lsp/providers/null_ls.lua
|
||||
ts_utils = {},
|
||||
|
||||
-- see Cosmic-UI settings
|
||||
hover = {},
|
||||
signature_help = {},
|
||||
}
|
||||
|
||||
-- See https://github.com/rmagatti/auto-session#%EF%B8%8F-configuration
|
||||
|
|
|
@ -89,7 +89,27 @@ return packer.startup(function()
|
|||
'CosmicNvim/cosmic-ui',
|
||||
requires = { 'MunifTanjim/nui.nvim', 'nvim-lua/plenary.nvim', 'ray-x/lsp_signature.nvim' },
|
||||
config = function()
|
||||
require('cosmic-ui').setup({})
|
||||
local diagnostic = {}
|
||||
local hover = {}
|
||||
local signature_help = {}
|
||||
local icons = require('cosmic.theme.icons')
|
||||
|
||||
if config and config.lsp and config.lsp.diagnostic then
|
||||
diagnostic = config.lsp.diagnostic
|
||||
end
|
||||
if config and config.lsp and config.lsp.hover then
|
||||
hover = config.lsp.hover
|
||||
end
|
||||
if config and config.lsp and config.lsp.signature_help then
|
||||
signature_help = config.lsp.signature_help
|
||||
end
|
||||
|
||||
require('cosmic-ui').setup({
|
||||
icons = icons,
|
||||
diagnostic = diagnostic,
|
||||
hover = hover,
|
||||
signature_help = signature_help,
|
||||
})
|
||||
end,
|
||||
after = 'nvim-lspconfig',
|
||||
})
|
||||
|
|
Loading…
Add table
Reference in a new issue