Skip to content

Commit

Permalink
feat: ✨ add vscode language matching guide microblog, update aqua too…
Browse files Browse the repository at this point in the history
…ling instructions
  • Loading branch information
sheldonhull committed Feb 29, 2024
1 parent 46d3965 commit 8ad664c
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
8 changes: 8 additions & 0 deletions content/notes/development/tooling/aqua.md
Expand Up @@ -195,6 +195,14 @@ packages:
This is focused on `ubuntu-latest` as the windows agent has some quirks not addressed in this format.
This still uses `pwsh` on the ubuntu agent to avoid me having to rework logic for 2 platforms.

```yaml
- bash: |
echo "##vso[task.prependpath]${AQUA_ROOT_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/aquaproj-aqua}/bin"
export PATH="${AQUA_ROOT_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/aquaproj-aqua}/bin:$PATH"
curl -sSfL https://raw.githubusercontent.com/aquaproj/aqua-installer/v2.3.0/aqua-installer | bash -s
displayName: install-aqua
```

```yaml
- pwsh: |
&curl -sSfL https://raw.githubusercontent.com/aquaproj/aqua-installer/v2.1.1/aqua-installer | bash -s -- -v v2.3.6
Expand Down
@@ -0,0 +1,33 @@
---

date: 2024-02-29T20:15:36+0000
title: Improve Language Matching in Vscode
slug: improve-language-matching-in-vscode
tags:

- tech
- development
- microblog

# images: [/images/]

typora-root-url: ../../../static
typora-copy-images-to: ../../../static/images
---

Let's say you have the Red Hat YAML extension.
This does a great job with formatting and validation.

However, other directories contain files for Azure DevOps Pipelines that are also `yaml`.
You can tweak the matching logic based on common paths you'd use and get those to default to a different language.

```json
"files.associations": {
"*.json5": "json5",
"CODEOWNERS": "plaintext",
"*.aliases": "gitconfig",
"{**/tasks/*.y*ml,**/jobs/*.y*ml,**/variables/*.y*ml,**/stages/*.y*ml,**/pipelines/*.y*ml,**/ci/*.y*ml,**/build/*.y*ml,**/templates/*.y*ml}": "azure-pipelines"
},
```

You can see the icon in the explorer switch to the new type as well to have a quick visual validation.

0 comments on commit 8ad664c

Please sign in to comment.