Closed bayou-brogrammer closed 9 months ago
What are you trying to config?
Did you try the config.content
? For example, check https://github.com/MunifTanjim/nougat.nvim/issues/49#issuecomment-1823920378
local lsp_servers = nut.lsp.servers.create({
ctx = {
content = {
lua_ls = "LuaLS",
},
hl = {
lua_ls = { fg = "cyan" },
},
},
priority = 1,
hl = { bg = "gray", fg = "white" },
sep_left = sep.left_lower_triangle_solid(true),
config = {
content = function(client, item)
return {
content = item.ctx.content[client.name] or client.name,
hl = item.ctx.hl[client.name],
}
end,
sep = " ",
},
suffix = " ",
})
A more detailed example: https://github.com/MunifTanjim/nougat.nvim/issues/49#issuecomment-1825004239
Did you check the docs and existing issues?
Problem
get_content of LSP config is currently hardcoded to a set function
Solution
Allow for a configurable opts to be passed to allow overriding the default implementation
Alternatives
An alternative would be created the
Item
then merging it with another table that has my custom functionAdditional Context
No response