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

Make LWC & Aura language servers available as executables #581

Open
WuggyX2 opened this issue Oct 11, 2023 · 3 comments
Open

Make LWC & Aura language servers available as executables #581

WuggyX2 opened this issue Oct 11, 2023 · 3 comments
Assignees

Comments

@WuggyX2
Copy link
Contributor

WuggyX2 commented Oct 11, 2023

Is your feature request related to a problem? Please describe.
I've been looking into integrating Neovim's lsp client with lwc language server. Neovim's lsp client uses stdio to communicate with language servers. In my understanding this requires that the language server can be started with a terminal command.

Describe the solution you'd like
Add executable files for lwc and aura language servers. Which would be installed automatically when installing the language servers using npm. This is also the way other language servers written in TypeScript work. This would allow any editor with a lsp client to integrate with aura and lwc language servers, not just neovim

Describe alternatives you've considered
I do not think there are any alternative ways to to this.

Additional context
I've created a PR that should implement the required changes.
Neovim LSP docs

@gbockus-sf gbockus-sf transferred this issue from forcedotcom/salesforcedx-vscode Oct 17, 2023
@gbockus-sf
Copy link
Contributor

transferred to LSP repo to make the PR build happy.

@gbockus-sf gbockus-sf self-assigned this Oct 17, 2023
@asknet
Copy link

asknet commented Jun 21, 2024

@WuggyX2 Thanks for this PR. I was able to set up in my nvim. However, LSP works only for html tags, and doesn't see lwc tags. May I know if you were able to set up successfully in nvim, If yes can you share your working configuration? Thank you!

@WuggyX2
Copy link
Contributor Author

WuggyX2 commented Jul 3, 2024

@WuggyX2 Thanks for this PR. I was able to set up in my nvim. However, LSP works only for html tags, and doesn't see lwc tags. May I know if you were able to set up successfully in nvim, If yes can you share your working configuration? Thank you!

Just installing the lwc lsp through mason should do the trick. I do not have anything Salesforce specific in my config and I'm not currently using Neovim to do Salesforce stuff. Starting the language server should generate some common typings into a .sfdx folder. Make sure it has been generated. As for sobject completions, the vscode extensions have a command "Refresh SObject definitions" to generate mock typings. Use that to generate types for Sobjects. After that you should be good to go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants