在ecmascript/typescript中使用neovim和nvim,我希望菜单显示默认情况下不存在的两样东西。
文档展示了一些如何设置图标的示例,但没有显示路径。
发布于 2022-07-11 11:30:48
您可以通过在调用nvim的设置时在format函数中添加这些行来实现类似的目标:
if entry.completion_item.detail ~= nil and entry.completion_item.detail ~= "" then
vim_item.menu = entry.completion_item.detail
else
vim_item.menu = ({
nvim_lsp = "[LSP]",
luasnip = "[Snippet]",
buffer = "[Buffer]",
path = "[Path]",
})[entry.source.name]
end结果:

https://stackoverflow.com/questions/72668920
复制相似问题