How to configure lsp.servers
content?
#75
Answered
by
MunifTanjim
HexSleeves
asked this question in
Q&A
-
Did you check the docs and existing issues?
Problemget_content of LSP config is currently hardcoded to a set function SolutionAllow for a configurable opts to be passed to allow overriding the default implementation AlternativesAn alternative would be created the
Additional ContextNo response |
Beta Was this translation helpful? Give feedback.
Answered by
MunifTanjim
Nov 23, 2023
Replies: 2 comments
-
What are you trying to config? Did you try the 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 = " ",
}) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
MunifTanjim
-
A more detailed example: #49 (comment) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What are you trying to config?
Did you try the
config.content
? For example, check #49 (comment)