Skip to content

Commit 4ea551a

Browse files
authored
UltiSnips: add an option to remove options decriptions. (pearofducks#128)
Co-authored-by: Guillaume-Jean Herbiet <[email protected]>
1 parent 469e55b commit 4ea551a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

UltiSnips/generate.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def option_data_to_snippet_completion(option_data: Any) -> str:
150150
return "false"
151151

152152
# if there is no default and no choices, return the description
153-
if not choices and default is None:
153+
if not choices and default is None and not args.no_description:
154154
return f"# {description}"
155155

156156
# if there is a default but no choices return the default as string
@@ -316,6 +316,12 @@ def get_collection_name(filepath:str) -> str:
316316
action="store_true",
317317
default=False
318318
)
319+
parser.add_argument(
320+
'--no-description',
321+
help="Remove options description",
322+
action="store_true",
323+
default=False
324+
)
319325
args = parser.parse_args()
320326

321327

0 commit comments

Comments
 (0)