Add ability to specify non-default language server and package.json path via LSP settings vol.2#90
Add ability to specify non-default language server and package.json path via LSP settings vol.2#90firu11 wants to merge 21 commits intozed-extensions:mainfrom
Conversation
add settings to explicitly specify the path to `@vue/language-server` and the parent directory of `package.json`
|
We require contributors to sign our Contributor License Agreement, and we don't have @firu11 on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
|
While manually specifying lsp working dir could be useful and that's how it was done back in the day eg in vetur: module.exports = {
projects: [
{
root: './src/frontend/', //root of subproject
package: './package.json', // It is relative to root property.
}
]
}Currently most common approach would be to just use root markers. |
|
I agree. This is just a temporary solution. |
This PR updates the CI workflow files from the main Zed repository based on the commit zed-industries/zed@e439c29 Co-authored-by: zed-zippy[bot] <234243425+zed-zippy[bot]@users.noreply.github.com>
just update readme for settings options --------- Co-authored-by: Kunall Banerjee <hey@kimchiii.space>
) ## Summary Restrict the `@vue/typescript-plugin` `languages` list to only `vue.js` when configuring `vtsls`. ## Problem With the Vue extension enabled, TypeScript completion items were duplicated in plain `.ts`/`.tsx` files (issue #72). ## Change - Updated plugin config in `src/vue.rs`: - from: `["typescript", "vue.js"]` - to: `["vue.js"]` This keeps Vue-specific behavior for Vue files while avoiding plugin overlap in TypeScript files. ## Validation - `cargo test` passes locally. Fixes #72
Release Notes: - N/A
This PR bumps the version of this extension to v0.3.1 Co-authored-by: zed-zippy[bot] <234243425+zed-zippy[bot]@users.noreply.github.com>
This PR updates the CI workflow files from the main Zed repository based on the commit zed-industries/zed@0c49aaa This changes the workflows to instead use a pinned version of the workflows from the main repository. Co-authored-by: zed-zippy[bot] <234243425+zed-zippy[bot]@users.noreply.github.com>
This PR updates the CI workflow files from the main Zed repository based on the commit zed-industries/zed@3e7f2e3 This adds initial support for extensions not located at the root of the repository. Co-authored-by: zed-zippy[bot] <234243425+zed-zippy[bot]@users.noreply.github.com>
This PR updates the CI workflow files from the main Zed repository based on the commit zed-industries/zed@30d3467 This includes some fixes to the upstream publishing review which help the Zed team with publishing extension versions quicker 🎉 Co-authored-by: zed-zippy[bot] <234243425+zed-zippy[bot]@users.noreply.github.com>
This changes the tree-sitter capture for Vue directive names (`v-if`, `v-model`, `v-for`, etc.) from `@keyword` to `@keyword.directive`. ## Motivation Currently, Vue directives like `v-if` and `v-model` are captured as `@keyword`, making them visually identical to HTML attributes, not that there's something wrong with that but because they're being captured as `@keyword` it makes it impossible for themes to style them differently, and they often need to style the attributes differently in order for the directives be styled differently. `@keyword.directive` is already used by other languages for similar constructs (e.g., preprocessor directives). With this change, theme authors can distinguish Vue template directives from language-level keywords. ### Breaking changes? None! Themes that don't define `keyword.directive` will fall back to `keyword` styling, so this is a non-breaking change for existing themes.
The Vue language server crashes silently in Zed when providing attribute completions. The crash originates in `@vue/language-service` at `vue-template.js:604`, where the code uses: ```js meta?.props.map(prop => [prop.name, prop]) ?? [] ``` This throws a `TypeError: Cannot read properties of undefined (reading 'map')` when `meta` exists but `meta.props` is `undefined`. The safe form would be `meta?.props?.map(...)`. This bug was introduced upstream in [vuejs/language-tools#5888](vuejs/language-tools#5888) and affects `@vue/language-server` versions **3.2.2+**. **Upstream issue:** vuejs/language-tools#5956 Pin `@vue/language-server` to version **3.2.1** (the last known working version before the buggy change) instead of dynamically fetching the latest version via `npm_package_latest_version`. This is a temporary workaround. Once the upstream package publishes a fix, the pin should be removed so users can receive future updates. - Added a `PINNED_SERVER_VERSION` constant set to `"3.2.1"` with a comment explaining the reason and linking to the upstream issue. - Replaced `zed::npm_package_latest_version(PACKAGE_NAME)?` with `PINNED_SERVER_VERSION.to_string()` in `server_script_path`. - Added a `TODO` comment to remove the pin once upstream is fixed. Fixes #92 Co-authored-by: theiter8r <theiter8r@users.noreply.github.com>
This PR bumps the version of this extension to v0.3.2 Co-authored-by: zed-zippy[bot] <234243425+zed-zippy[bot]@users.noreply.github.com>
This PR updates the CI workflow files from the main Zed repository based on the commit zed-industries/zed@3183c04 The update includes a new version of the extension CLI which adds validation for semantic token rules for languages Co-authored-by: zed-zippy[bot] <234243425+zed-zippy[bot]@users.noreply.github.com>
|
I've just tested the |
Building on top of #77 by @GamerGirlandCo
You can now specify the relative path to "vue-language-server" via
settings.jsonlike so:An example project/dir structure:
settings.json:{ // ... "lsp": { "vue-language-server": { "settings": { "server_path": "frontend/node_modules/@vue/language-server/bin/vue-language-server.js", "package_json_path": "frontend" } } }, // ... }It tries to find the lsp in this order:
settings.jsonSERVER_PATHaka. the root dirI'm not a good rust programmer, please check the changes thoroughly. Thanks! 😅