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 8 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. |
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! 😅