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

feat: add taplo completion spec #1713

Merged
merged 7 commits into from
Nov 23, 2022
Merged

feat: add taplo completion spec #1713

merged 7 commits into from
Nov 23, 2022

Conversation

batunpc
Copy link
Contributor

@batunpc batunpc commented Nov 20, 2022

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Fixes #1532

What is the current behavior? (You can also link to an open issue here)
The completion spec does not exist for taplo

What is the new behavior (if this is a feature change)?
autocomplete will be supported for taplo

Additional info:
I used taplo --help as reference to work with all the subcommands and options. Also used the
taplo <subcommand> --help which produces different manual for each corresponding subcommands and option(s) in taplo.

Autocompletion for taplo in action;
CleanShot 2022-11-20 at 03 47 35@2x

@withfig-bot
Copy link
Collaborator

Overview

src/taplo.ts:

Info:

@withfig-bot
Copy link
Collaborator

Hello @batunpc,
thank you very much for creating a Pull Request!
Here is a small checklist to get this PR merged as quickly as possible:

  • Do all subcommands / options which take arguments include the args property (args: {})?
  • Are all options modular? E.g. -a -u -x instead of -aux
  • Have all other checks passed?

Please add a 👍 as a reaction to this comment to show that you read this.

Copy link
Contributor

@fedeci fedeci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @batunpc! I left some comments to solve before merging the PR, but overall it seems good to me!

src/taplo.ts Show resolved Hide resolved
src/taplo.ts Show resolved Hide resolved
args: {
name: "CONFIG",
template: "filepaths",
suggestCurrentToken: true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
suggestCurrentToken: true,
suggestCurrentToken: true,
template: "filepaths",

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here template: "filepaths", is above the suggestCurrentToken
Would you like me to swap their places ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is indifferent in a JS object. For styles we want to enforce we create eslint rules, so it npm run lint does not complain it is good to go!

src/taplo.ts Show resolved Hide resolved
src/taplo.ts Show resolved Hide resolved
src/taplo.ts Outdated Show resolved Hide resolved
@batunpc
Copy link
Contributor Author

batunpc commented Nov 22, 2022

Thank you @fedeci I have addressed the requested changes in my last commit 9d4467f and left a comment for #1713 (comment)

@batunpc batunpc requested a review from fedeci November 22, 2022 19:46
Copy link
Contributor

@fedeci fedeci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@fedeci fedeci merged commit ace03e1 into withfig:master Nov 23, 2022
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.

[taplo] missing spec
3 participants