From 90b11dd02e12f7211cf54830c9fb420f38b210c0 Mon Sep 17 00:00:00 2001 From: Pete Davison Date: Thu, 27 Apr 2023 00:57:58 +0100 Subject: [PATCH] feat: improve docs for vscode-task (#1138) --- .github/ISSUE_TEMPLATE/config.yml | 3 ++ docs/Taskfile.yml | 2 +- docs/docs/community.md | 41 ++------------- docs/docs/integrations.md | 86 +++++++++++++++++++++++++++++++ 4 files changed, 94 insertions(+), 38 deletions(-) create mode 100644 docs/docs/integrations.md diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index d428e0c1..548dae2f 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1,8 @@ blank_issues_enabled: false contact_links: + - name: Extension for Visual Studio Code + url: https://github.com/go-task/vscode-task + about: Issues related to the Visual Studio Code extension should be opened here. - name: Help forum on Discord url: https://discord.com/channels/974121106208354339/1025054680289660989 about: 'The Discord #help channel is the best way to get help from the community.' diff --git a/docs/Taskfile.yml b/docs/Taskfile.yml index bd52d740..4e107a8e 100644 --- a/docs/Taskfile.yml +++ b/docs/Taskfile.yml @@ -14,7 +14,7 @@ tasks: deps: [yarn:install] aliases: [s, start] vars: - HOST: '{{default "localhost" .HOST}}' + HOST: '{{default "0.0.0.0" .HOST}}' PORT: '{{default "3001" .PORT}}' cmds: - npx docusaurus start --no-open --host={{.HOST}} --port={{.PORT}} diff --git a/docs/docs/community.md b/docs/docs/community.md index dec08294..3cb6d500 100644 --- a/docs/docs/community.md +++ b/docs/docs/community.md @@ -15,44 +15,11 @@ thankful for everyone that helps me to improve the overall experience. [Chinese translation](https://task-zh.readthedocs.io/zh_CN/latest/) of the website [on this repository](https://github.com/DeronW/task). -## Editor Integrations +## Integrations -### JSON Schema - -Initial work on the schema was made by [@KROSF](https://github.com/KROSF) on -[this Gist](https://gist.github.com/KROSF/c5435acf590acd632f71bb720f685895). The -schema is currently available at https://taskfile.dev/schema.json and linked at -https://json.schemastore.org/taskfile.json so it is be used automatically many -code editors, like VSCode. Contributions can be done by editing -[this file](https://github.com/go-task/task/blob/main/docs/static/schema.json). - -### Visual Studio Code extension - -Additionally, there's also some work done by -[@paulvarache](https://github.com/paulvarache) in making an Visual Studio Code -extension, which has its code -[here](https://github.com/paulvarache/vscode-taskfile) and is published -[here](https://marketplace.visualstudio.com/items?itemName=paulvarache.vscode-taskfile). - -### Sublime Text 4 package - -There is a convenience wrapper for initializing and running tasks from Sublime -Text's command palette. The package is developed by -[@biozz](https://github.com/biozz), the source code is available -[here](https://github.com/biozz/sublime-taskfile) and it is published on Package -Control [here](https://packagecontrol.io/packages/Taskfile). - -### IntelliJ plugin - -There's a JetBrains IntelliJ plugin done by -[@lechuckroh](https://github.com/lechuckroh), which has its code -[here](https://github.com/lechuckroh/task-intellij-plugin) and is published -[here](https://plugins.jetbrains.com/plugin/17058-taskfile). - -## Other Integrations - -- [mk](https://github.com/pycontribs/mk) command line tool recognizes Taskfiles - natively. +Many of our integrations are contributed and maintained by the community. You +can view the full list of community integrations +[here](./integrations#community-integrations). ## Installation methods diff --git a/docs/docs/integrations.md b/docs/docs/integrations.md new file mode 100644 index 00000000..7532b9d6 --- /dev/null +++ b/docs/docs/integrations.md @@ -0,0 +1,86 @@ +--- +slug: /integrations/ +sidebar_position: 5 +--- + +# Integrations + +## Visual Studio Code Extension + +Task has an +[official extension for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=task.vscode-task). +The code for this project can be found +[here](https://github.com/go-task/vscode-task). To use this extension, you must +have Task v3.23.0+ installed on your system. + +This extension provides the following features (and more): + +- View tasks in the sidebar. +- Run tasks from the sidebar and command palette. +- Go to definition from the sidebar and command palette. +- Run last task command. +- Multi-root workspace support. +- Initialize a Taskfile in the current workspace. + +To get autocompletion and validation for your Taskfile, see the +[Schema](#schema) section below. + +![Task for Visual Studio Code](https://github.com/go-task/vscode-task/blob/main/res/preview.png?raw=true) + +## Schema + +This was initially created by [@KROSF](https://github.com/KROSF) in +[this Gist](https://gist.github.com/KROSF/c5435acf590acd632f71bb720f685895) and +is now officially maintained in +[this file](https://github.com/go-task/task/blob/master/docs/static/schema.json) +and made available at https://taskfile.dev/schema.json. This schema can be used +to validate Taskfiles and provide autocompletion in many code editors: + +### Visual Studio Code + +To integrate the schema into VS Code, you need to install the +[YAML extension](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml) +by Red Hat. Any `Taskfile.yml` in your project should automatically be detected +and validation/autocompletion should work. If this doesn't work or you want to +manually configure it for files with a different name, you can add the following +to your `settings.json`: + +```json +// settings.json +{ + "yaml.schemas": { + "https://taskfile.dev/schema.json": [ + "**/Taskfile.yml", + "./path/to/any/other/taskfile.yml" + ] + } +} +``` + +You can also configure the schema directly inside of a Taskfile by adding the +following comment to the top of the file: + +```yaml +# yaml-language-server: $schema=https://taskfile.dev/schema.json +version: '3' +``` + +You can find more information on this in the +[YAML language server project](https://github.com/redhat-developer/yaml-language-server). + +## Community Integrations + +In addition to our official integrations, there is an amazing community of +developers who have created their own integrations for Task: + +- [Sublime Text Plugin](https://packagecontrol.io/packages/Taskfile) + [[source](https://github.com/biozz/sublime-taskfile)] by + [@biozz](https://github.com/biozz) +- [IntelliJ Plugin](https://plugins.jetbrains.com/plugin/17058-taskfile) + [[source](https://github.com/lechuckroh/task-intellij-plugin)] by + [@lechuckroh](https://github.com/lechuckroh) +- [mk](https://github.com/pycontribs/mk) command line tool recognizes Taskfiles + natively. + +If you have made something that integrates with Task, please feel free to open a +PR to add it to this list.