Skip to content

add fish snippets from bmalehorn/vscode-fish #513

New issue

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

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

Already on ? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

remche
Copy link

@remche remche commented Oct 29, 2024

This PR add fish snippets from bmalehorn/vscode-fish

Thanks form maintaining this repo !

Copy link
Collaborator

@OkelleyDevelopment OkelleyDevelopment left a comment

Choose a reason for hiding this comment

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

Thanks for the PR, just a few things to revise and then we'll be golden 😎

"end"
]
},
"else operator": {
Copy link
Collaborator

Choose a reason for hiding this comment

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

The else snippet can probably be omitted since the if and if else are already defined here

"end"
]
},
"function with arguments definition": {
Copy link
Collaborator

Choose a reason for hiding this comment

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

these snippets should also be removed in favor of just having someone leverage the first function snippet.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Please take this comment to apply to the if and while snippet variants too.

Copy link
Author

Choose a reason for hiding this comment

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

Note sure what you mean here (not very familiar with snippet development). How to leverage the multiple possibility with only one snippet ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Hi @remche, sorry for the delay.

What I had meant earlier, was someone can just use the function definition for all of these cases (no arguments, arguments, etc) if we modify the body like so:

    "body": [
      "function ${1:name} $0",
      "end"
    ]
  }

Then we don't clutter the snippets and the user's cursor will end on the first line allowing for them to specify arguments OR enter and tab to define the function body.

This same approach can be done for the if, else snippets added above too.

"end"
]
},
"function with arguments definition": {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hi @remche, sorry for the delay.

What I had meant earlier, was someone can just use the function definition for all of these cases (no arguments, arguments, etc) if we modify the body like so:

    "body": [
      "function ${1:name} $0",
      "end"
    ]
  }

Then we don't clutter the snippets and the user's cursor will end on the first line allowing for them to specify arguments OR enter and tab to define the function body.

This same approach can be done for the if, else snippets added above too.

Sign up for free to join this conversation on . Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants