Skip to content

Commit

Permalink
UltiSnips: add an option to remove options decriptions. (#128)
Browse files Browse the repository at this point in the history
Co-authored-by: Guillaume-Jean Herbiet <gjherbiet@restena.lu>
  • Loading branch information
gjherbiet and gjherbiet committed Jan 7, 2022
1 parent 469e55b commit 4ea551a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion UltiSnips/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def option_data_to_snippet_completion(option_data: Any) -> str:
return "false"

# if there is no default and no choices, return the description
if not choices and default is None:
if not choices and default is None and not args.no_description:
return f"# {description}"

# if there is a default but no choices return the default as string
Expand Down Expand Up @@ -316,6 +316,12 @@ def get_collection_name(filepath:str) -> str:
action="store_true",
default=False
)
parser.add_argument(
'--no-description',
help="Remove options description",
action="store_true",
default=False
)
args = parser.parse_args()


Expand Down

0 comments on commit 4ea551a

Please sign in to comment.