vivaxyblog / vivaxyblog.github.io

Blog
https://vivaxyblog.github.io/
3 stars 1 forks source link

2019/08/14/alfred-workflow-open-in-vscode #11

Open utterances-bot opened 3 years ago

utterances-bot commented 3 years ago

Alfred 4 Workflow Open in VSCode - vivaxy's Blog

Alfred 4 Workflow Open in VSCode

https://vivaxyblog.github.io/2019/08/14/alfred-workflow-open-in-vscode.html

bluprince13 commented 3 years ago

Hey! Thanks for this.

Is the code for this public? I noticed that it doesn't detect projects that start with a dot. e.g. .dotfiles

This would be resolved by adding dot: true in the following line:

 const names = await glob('*', { cwd: wd, onlyDirectories: true, dot: true });
vivaxy commented 3 years ago

@bluprince13 Feel free to update the extension. But why is the project starts with a dot?

bluprince13 commented 3 years ago

Yeah, I did on my system. I just thought it’d be nice to update the source code too, but don’t think you’ve made it public?

Ahaha I guess it’s rare. But, some people have such a repo to keep their config. Mine for example: https://github.com/bluprince13/.dotfiles

vivaxy commented 3 years ago

@bluprince13 https://github.com/vivaxy/alfred-open-in-vscode. Added dot: true and released with npm.

bluprince13 commented 3 years ago

Nice 🙂

DanielOfir commented 3 years ago

Love it! Is there a way that the bar will show all available folders in the path without typing anything after "code"?

vivaxy commented 3 years ago

Hi @DanielOfir, thank you for the support.

It's not possible to show all available folders when code is typed. Because code means open folder in VSCode currently.

But it could be possible to show all folders when code is typed. Related codes: https://github.com/vivaxy/alfred-open-in-vscode/blob/main/index.js#L86.