Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UltiSnips: add an option to remove options decriptions. #128

Merged
merged 1 commit into from
Jan 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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