Skip to content

Commit 7169352

Browse files
authored
feat: add multiple new langs (#217)
1 parent 424835a commit 7169352

4 files changed

Lines changed: 202 additions & 3 deletions

File tree

docs/src/content/docs/reference/Settings.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,14 @@ List of extensions that should not be configured automatically.
9191
- `oxc.oxc-vscode`
9292
- `bazelbuild.vscode-bazel`
9393
- `swiftlang.swift-vscode`
94+
- `Pkl.pkl-vscode`
95+
- `exiasr.hadolint`
96+
- `astral-sh.ty`
97+
- `tombi-toml.tombi`
98+
- `foxundermoon.shell-format`
99+
- `sumneko.lua`
100+
- `twxs.cmake`
101+
- `ms-dotnettools.vscode-dotnet-runtime`
94102

95103
---
96104

@@ -128,6 +136,14 @@ List of extensions that should be configured automatically. If both include and
128136
- `oxc.oxc-vscode`
129137
- `bazelbuild.vscode-bazel`
130138
- `swiftlang.swift-vscode`
139+
- `Pkl.pkl-vscode`
140+
- `exiasr.hadolint`
141+
- `astral-sh.ty`
142+
- `tombi-toml.tombi`
143+
- `foxundermoon.shell-format`
144+
- `sumneko.lua`
145+
- `twxs.cmake`
146+
- `ms-dotnettools.vscode-dotnet-runtime`
131147

132148
---
133149

docs/src/content/docs/reference/Supported-extensions.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@ List of extensions that can be automatically configured to use tools from
3939
| [oxc](https://marketplace.visualstudio.com/items?itemName=oxc.oxc-vscode) | `oxc.path.oxfmt`, `oxc.path.oxlint`, `oxc.path.tsgolint` | Not enabled by default. Update `"mise.configureExtensionsAutomaticallyIgnoreList"` to `[]` to enable it. Use it only if you don't install oxc with npm. Note that `oxfmt` and `npm:tsgolint` are separate tools from `oxlint`. |
4040
| [bazel](https://marketplace.visualstudio.com/items?itemName=BazelBuild.vscode-bazel) | `bazel.executable`, `bazel.buildifierExecutable` | Does not work with shims |
4141
| [Swift](https://marketplace.visualstudio.com/items?itemName=swiftlang.swift-vscode) | `swift.path` | Does not work with shims |
42+
| [Pkl](https://marketplace.visualstudio.com/items?itemName=Pkl.pkl-vscode) | `pkl.cli.path` | |
43+
| [Hadolint](https://marketplace.visualstudio.com/items?itemName=exiasr.hadolint) | `hadolint.hadolintPath` | Does not work with symlinks |
44+
| [ty](https://marketplace.visualstudio.com/items?itemName=astral-sh.ty) | `ty.path` | |
45+
| [Shell-format](https://marketplace.visualstudio.com/items?itemName=foxundermoon.shell-format) | `shellformat.path` | |
46+
| [Lua](https://marketplace.visualstudio.com/items?itemName=sumneko.lua) | `Lua.misc.executablePath` | Does not work with symlinks |
47+
| [CMake](https://marketplace.visualstudio.com/items?itemName=twxs.cmake) | `cmake.cmakePath` | |
48+
| [.NET Runtime](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.vscode-dotnet-runtime) | `dotnetAcquisitionExtension.sharedExistingDotnetPath` | |
49+
| [Tombi TOML](https://marketplace.visualstudio.com/items?itemName=tombi-toml.tombi) | `tombi.path` | Does not work with symlinks |
4250

4351
Extensions which have built-in support for `mise`:
4452

@@ -51,7 +59,8 @@ Extensions which have built-in support for `mise`:
5159
If the extension you're using is not listed above, you can still configure it manually. See the [Custom Extensions Guide](/mise-vscode/guides/custom-extensions/) for more details.
5260

5361
Extensions that are not supported:
54-
- [Rust](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer) does not offer to update the cargo path automatically. See [this discussion](https://github.com/hverlin/mise-vscode/discussions/70) for workarounds.
62+
63+
- [Rust](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer) does not offer to update the cargo path automatically. See [this discussion](https://github.com/hverlin/mise-vscode/discussions/70) for workarounds.
5564

5665
If you would like to add one, you can open a PR that updates
5766
[src/utils/supportedExtensions.ts](https://github.com/hverlin/mise-vscode/blob/main/src/utils/supportedExtensions.ts)

package.json

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,15 @@
217217
"biomejs.biome",
218218
"oxc.oxc-vscode",
219219
"bazelbuild.vscode-bazel",
220-
"swiftlang.swift-vscode"
220+
"swiftlang.swift-vscode",
221+
"Pkl.pkl-vscode",
222+
"exiasr.hadolint",
223+
"astral-sh.ty",
224+
"tombi-toml.tombi",
225+
"foxundermoon.shell-format",
226+
"sumneko.lua",
227+
"twxs.cmake",
228+
"ms-dotnettools.vscode-dotnet-runtime"
221229
]
222230
},
223231
"markdownDescription": "List of extensions that should not be configured automatically."
@@ -256,7 +264,15 @@
256264
"biomejs.biome",
257265
"oxc.oxc-vscode",
258266
"bazelbuild.vscode-bazel",
259-
"swiftlang.swift-vscode"
267+
"swiftlang.swift-vscode",
268+
"Pkl.pkl-vscode",
269+
"exiasr.hadolint",
270+
"astral-sh.ty",
271+
"tombi-toml.tombi",
272+
"foxundermoon.shell-format",
273+
"sumneko.lua",
274+
"twxs.cmake",
275+
"ms-dotnettools.vscode-dotnet-runtime"
260276
]
261277
},
262278
"markdownDescription": "List of extensions that should be configured automatically. If both include and ignore lists are set, the ignore list takes precedence. If the include list includes 'all' (default), all supported extensions are considered except those in the ignore list."

src/utils/supportedExtensions.ts

Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -604,6 +604,164 @@ export const SUPPORTED_EXTENSIONS: Array<ConfigurableExtension> = [
604604
};
605605
},
606606
},
607+
{
608+
toolNames: ["aqua:apple/pkl"],
609+
extensionId: "Pkl.pkl-vscode",
610+
generateConfiguration: async ({
611+
miseService,
612+
tool,
613+
miseConfig,
614+
useShims,
615+
useSymLinks,
616+
}) => {
617+
return configureSimpleExtension(miseService, {
618+
configKey: "pkl.cli.path",
619+
binName: "pkl",
620+
useShims,
621+
useSymLinks,
622+
tool,
623+
miseConfig,
624+
});
625+
},
626+
},
627+
{
628+
toolNames: ["aqua:hadolint/hadolint"],
629+
extensionId: "exiasr.hadolint",
630+
generateConfiguration: async ({
631+
miseService,
632+
tool,
633+
miseConfig,
634+
useShims,
635+
}) => {
636+
return configureSimpleExtension(miseService, {
637+
configKey: "hadolint.hadolintPath",
638+
binName: "hadolint",
639+
useShims,
640+
useSymLinks: false,
641+
tool,
642+
miseConfig,
643+
});
644+
},
645+
},
646+
{
647+
toolNames: ["aqua:astral-sh/ty"],
648+
extensionId: "astral-sh.ty",
649+
generateConfiguration: async ({
650+
miseService,
651+
tool,
652+
miseConfig,
653+
useShims,
654+
useSymLinks,
655+
}) => {
656+
return configureSimpleExtension(miseService, {
657+
configKey: "ty.path",
658+
binName: "ty",
659+
useShims,
660+
useSymLinks,
661+
tool,
662+
miseConfig,
663+
valueTransformer: (bin: string) => [bin],
664+
});
665+
},
666+
},
667+
{
668+
toolNames: ["aqua:tombi-toml/tombi"],
669+
extensionId: "tombi-toml.tombi",
670+
generateConfiguration: async ({
671+
miseService,
672+
tool,
673+
miseConfig,
674+
useShims,
675+
}) => {
676+
return configureSimpleExtension(miseService, {
677+
configKey: "tombi.path",
678+
binName: "tombi",
679+
useShims,
680+
useSymLinks: false,
681+
tool,
682+
miseConfig,
683+
});
684+
},
685+
},
686+
{
687+
toolNames: ["aqua:mvdan/sh"],
688+
extensionId: "foxundermoon.shell-format",
689+
generateConfiguration: async ({
690+
miseService,
691+
tool,
692+
miseConfig,
693+
useShims,
694+
useSymLinks,
695+
}) => {
696+
return configureSimpleExtension(miseService, {
697+
configKey: "shellformat.path",
698+
binName: "shfmt",
699+
useShims,
700+
useSymLinks,
701+
tool,
702+
miseConfig,
703+
});
704+
},
705+
},
706+
{
707+
toolNames: ["aqua:LuaLS/lua-language-server"],
708+
extensionId: "sumneko.lua",
709+
generateConfiguration: async ({
710+
miseService,
711+
tool,
712+
miseConfig,
713+
useShims,
714+
}) => {
715+
return configureSimpleExtension(miseService, {
716+
configKey: "Lua.misc.executablePath",
717+
binName: "lua-language-server",
718+
useShims,
719+
useSymLinks: false,
720+
tool,
721+
miseConfig,
722+
});
723+
},
724+
},
725+
{
726+
toolNames: ["aqua:Kitware/CMake"],
727+
extensionId: "twxs.cmake",
728+
generateConfiguration: async ({
729+
miseService,
730+
tool,
731+
miseConfig,
732+
useShims,
733+
useSymLinks,
734+
}) => {
735+
return configureSimpleExtension(miseService, {
736+
configKey: "cmake.cmakePath",
737+
binName: "cmake",
738+
useShims,
739+
useSymLinks,
740+
tool,
741+
miseConfig,
742+
});
743+
},
744+
},
745+
{
746+
toolNames: ["dotnet"],
747+
extensionId: "ms-dotnettools.vscode-dotnet-runtime",
748+
generateConfiguration: async ({
749+
miseService,
750+
tool,
751+
miseConfig,
752+
useShims,
753+
useSymLinks,
754+
}) => {
755+
return configureSimpleExtension(miseService, {
756+
configKey: "dotnetAcquisitionExtension.sharedExistingDotnetPath",
757+
binName: "dotnet",
758+
useShims,
759+
useSymLinks,
760+
tool,
761+
miseConfig,
762+
});
763+
},
764+
},
607765
];
608766

609767
function appendSubdirs(basePath: string, subdirs?: string[]): string {

0 commit comments

Comments
 (0)