Currently custom_view support three fields, kind, abbr and menu, and menu field is left-align, which is a bit awkward because if I set capabilities.textdocument.completion.labelDetailsSupport=true, some lsp(rust-analyzer for example) sends back something like:
and cmp simply concat these strings in menu field, something looks like:
and if I cut off menu field it looks like:
The disadvantage of this approach is that the starting position on the leftmost side of all menus must be greater than the longest string in abbr, leaving many remaining useless spaces in between, I would like add a new field called detail to stay closely behind abbr, and leave menu field right unchanged(left algin)
note: vscode indeed have a detail field in completion items, for detail, it follows abbr and for description, it sitck to right side.
Currently custom_view support three fields, kind, abbr and menu, and menu field is left-align, which is a bit awkward because if I set
capabilities.textdocument.completion.labelDetailsSupport=true
, some lsp(rust-analyzer for example) sends back something like:and cmp simply concat these strings in menu field, something looks like:
and if I cut off menu field it looks like:
The disadvantage of this approach is that the starting position on the leftmost side of all menus must be greater than the longest string in abbr, leaving many remaining useless spaces in between, I would like add a new field called detail to stay closely behind abbr, and leave menu field right unchanged(left algin)
note: vscode indeed have a detail field in completion items, for
detail
, it follows abbr and for description, it sitck to right side.