Skip to content

Conversation

xieyonn
Copy link
Contributor

@xieyonn xieyonn commented Aug 15, 2025

The snippet description will be displayed on the document window by default, which is a bit inconvenient.

Generally speaking, snippet description is very short, so I have added an option to display the description directly on the completion menu, in column label_details or label_description.

config example:

opts = {
	completion = {
		menu = {
			draw = {
				snippet_desc_column = "label_description",
			},
		},
	},
}

If snippets provide a description, eg:

snippet desc show desc in menu column
  hello world

Show this description in menu column, see preview:
image

Already tested for mini_snippets, luasnip, and the default snippets.

@xieyonn xieyonn force-pushed the feat/snippet_desc branch 8 times, most recently from 087f925 to 2502c0f Compare August 16, 2025 21:02
@xieyonn xieyonn changed the title feat(snippets): add config option snippet.desc_column feat(snippets): add option completion.menu.draw.snippet_desc_column Aug 16, 2025
@xieyonn xieyonn force-pushed the feat/snippet_desc branch from 2502c0f to 19459e7 Compare August 16, 2025 21:08
Show snippet desc in completion column label_detail or label_description
@xieyonn xieyonn force-pushed the feat/snippet_desc branch from 9706eed to ee33572 Compare August 22, 2025 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant