Skip to content
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

feat: improves vscode integration, support multiple backends #763

Merged
merged 11 commits into from
Dec 26, 2024

Conversation

gsxdsm
Copy link
Contributor

@gsxdsm gsxdsm commented Dec 19, 2024

🔗 Fixes

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

Improves support for VS Code integration:

  1. Support both the newer Microsoft "code" cli tool (using serve-web) and the legacy vs-code-server cli tool.
  2. Adds a new option (codeServer) under the vscode options object to select the server type to use: ms-code-server for the legacy (and existing) code-server cli, coder-code-server for the open-source Coder code-server and ms-code-cli for the VS Code cli server.
  3. Adds the root path to the repository location when going to a file from the vue-inspector, solves issue when running in a container/devcontainer.
  4. Adds host option ("0.0.0.0") to the arguments to support devcontainers that try to map to ipv6 addresses by default
  5. Adds the line/column to the vue-inspector click url parameter so that vscode correctly goes to the right location when in the embedded devtool view.
  devtools:{
      vscode:{
        codeServer: 'ms-code-cli', // or 'ms-code-server' or 'coder-code-server'
      }
  }

@antfu antfu changed the title Fixes #408, #737, #503, #750 - Improves vscode integration - allows support of both MS VS Code and Coder's code-server. Also makes integrated vscode + go-to line work in devcontainers feat: improves vscode integration - allows support of both MS VS Code and Coder's code-server. Also makes integrated vscode + go-to line work in devcontainers Dec 19, 2024
@antfu antfu changed the title feat: improves vscode integration - allows support of both MS VS Code and Coder's code-server. Also makes integrated vscode + go-to line work in devcontainers feat: improves vscode integration Dec 19, 2024
@@ -144,7 +168,7 @@ export async function setup({ nuxt, options, openInEditorHooks, rpc }: NuxtDevto
icon: 'bxl-visual-studio',
category: 'modules',
requireAuth: true,
view: !installed
view: !installed && !(vsOptions?.mode === 'tunnel')
? {
type: 'launch',
title: 'Install VS Code Server',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be great if we could provide a page in the docs and change the guide here to mention that there are different options to install. Are you interested in helping that as well? Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I can do that!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming you mean updating this page in the docs?

When you say guide, which guide are you referring to?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yeah, exactly!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we make the ms-code-cli the default? It seems to be the recommended approach from MS, but it's different from the current behavior?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note - would be good to publish antfu.vscode-server-controller into open-vsx marketplace so the install step works for code-server (from Coder) - https://open-vsx.org/user-settings/extensions

@antfu antfu changed the title feat: improves vscode integration feat: improves vscode integration, support multiple backends Dec 26, 2024
@antfu
Copy link
Member

antfu commented Dec 26, 2024

Awesome, thanks a lot!

@antfu antfu merged commit 463f6ad into nuxt:main Dec 26, 2024
1 check was pending
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants