-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deno doesn't work in VSCode workspaces properly #23245
Comments
I, as well, am having some issues with vscode workspaces. I have a regular deno project so no bun is involved. But I do have the setup where I have a subdirectory with deno code that I want to be linted, formatted, and enabled for deno scripts, and for the rest of the project, I do not want to use deno. The issues that I am having are related to manually formatting my deno scripts which are typescript code. I only get this when I have my project opened as a vscode workspace. If I open the project in a standard way at the root of the project/repo, formatting works fine, I get no message box, and I also do not get any strange enable vs disable behavior. Note I am running deno version At this point, it seems obvious to me that the issue is related to deno support with VSCode workspaces. I have a docusaurus website where I am using deno for dev stuff and cicd related things. This is why I have the workspaces. The project is open source named VelaptorDocs and you can see what I have set up there. Here is my vscode workspace
{
"folders": [
{
"name": "VelaptorDocs",
"path": ".",
},
{
"name": "SampleProjects",
"path": "./SampleProjects",
},
{
"name": "CICD",
"path": ".github/cicd",
}
],
"settings": {
"testing.followRunningTest": true,
"testing.gutterEnabled": false,
"testing.openTesting": "neverOpen",
"typescript.referencesCodeLens.enabled": true,
"powershell.cwd": "VelaptorDocs",
}
} I have 2 `setting.json` files. One is in the standard location at the root `.vscode` directory shown below
{
"deno.enable": false,
"cSpell.words": [
"cicd",
"clsx",
"defaultdocumentation",
"Infima",
"Kinson",
"KXVA",
"Multiauthor",
"Playmegames",
"preinstall",
"Reguler",
"Structs",
"tailwindcss",
"Texinfo",
"typecheck",
"Velaptor"
],
"files.exclude": {
".docusaurus/": true,
"node_modules": true,
"VelaptorDocs.code-workspace": true,
"build/": true,
".github/cicd/": true,
".config": false,
"RepoSrc/": true,
"*.lock": true,
"SampleProjects": true,
},
"search.exclude": {
"**/node_modules": true,
"**/bower_components": true,
"**/*.code-search": true,
"build/": true
},
"[typescriptreact]": {
"editor.defaultFormatter": "vscode.typescript-language-features",
"editor.insertSpaces": false,
"editor.tabSize": 3,
},
"[typescript]": {
"editor.defaultFormatter": "vscode.typescript-language-features",
"editor.insertSpaces": false,
"editor.tabSize": 4,
},
"[yaml]": {
"editor.insertSpaces": true,
"editor.tabSize": 2,
},
"[jsonc]": {
"editor.insertSpaces": false,
"editor.tabSize": 4,
},
"[mdx]": {
"editor.insertSpaces": true,
"editor.tabSize": 4,
},
"editor.detectIndentation": false,
"[github-actions-workflow]": {
"editor.tabSize": 2,
"editor.insertSpaces": true
}
} The other 'settings.json' file is in the {
"deno.enable": true,
"deno.config": "../deno.json",
"cSpell.words": [
"cicd",
"defaultdocumentation",
"docu",
"Kinson",
"Velaptor"
],
} I have tried simple projects with minimum files just to try and get it working. I have also tried disabling all extensions except for the deno extension to see if that would help. |
In {
"deno.enablePaths": ["packages/ts-utils"],
} Please comment here if that doesn't work. |
I have a workspace that looks like this:
I enabled deno in the workspace:
However when I do this some files in workspace gives errors due to deno:
This file uses Bun APIs so should not be linted with Deno.
I tried to solve it by making a file
~/src/ts/.vscode/settings.json
with this content:It makes errors go away:
Great. However I have this repo that is actual Deno project in
~/src/ts/packages/ts-utils
(GitHub repo).And if I do
"deno.enable": false
above, Deno breaks down on that project.In workspace:
Standalone:
Please help solve this. Big blocker in adopting Deno for me.
The text was updated successfully, but these errors were encountered: