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

Question: implementation / planned support for Blazor & Razor Pages #20

Open
gpfaucher opened this issue Jan 1, 2024 · 5 comments
Open

Comments

@gpfaucher
Copy link

Hi! Thanks for the awesome plugin. Really impressed with the speed of the LSP.
I'm trying to migrate my workflow to NeoVim from the classic IDE's. Old Vim user, but had to switch to IDE's to get started at a new job.
I've got everything working, except for Blazor support. I found a whole bunch of issues and threads saying how horrible the LSP's for C# are, and I've had similar issues even in VSCode. Now to my question: do you have any idea if it's even possible to implement support for Blazor & Razor Pages? If so, I'd love to get an idea of how you would go about it. I'd be more than happy to make a PR with the implementation, but I've got no idea where to even begin of starting right now. Thanks in advance!

For reference:

@jmederosalvarado
Copy link
Owner

I would have to look into it, I'm not sure how razor support works in the vscode extension but I believe it's a separate language server managed within the same extension. To be honest at the moment it's very unlikely I would prioritize razor support if it requires adding a separate language server. Although I'd be happy to accept a PR for it.

@tris203
Copy link

tris203 commented Jan 31, 2024

I've got the Razor LSP working within neovim, but only parsing the Razor parts, not the C# parts.

I think this is where it would interface with roslyn to hand over the virtual document, but I can't get roslyn to stay up. I am just running the LSPs raw, so later on tonight I will fork this repo and see if I can get it to run nicer using the wrapper

But, I think it's possible, and famous last words, it doesn't seem that hard...

@WillEhrendreich
Copy link

hey @tris203 I'm really interested in how you did it. would you point me to where you have this working?

@tris203
Copy link

tris203 commented Feb 28, 2024

hey @tris203 I'm really interested in how you did it. would you point me to where you have this working?

hey @WillEhrendreich
it's really hacky at the moment.

Essentially, I've got as far as running the razor lsp, attaching it to the buffer, and generating the virtual html and virtual cs files in neovim (it uses a lot of custom LSP events)

Although, I need to go diving through the VsCode extension code more to work out what we do next.
Which LSPs we attach to what and how do we amalgamate the results back to show in the source file

@tris203
Copy link

tris203 commented Jun 3, 2024

This is how far I got with the implementation, I have made it public and am willing to work on it again if anybody wants to collaborate

https://github.com/tris203/rzls.nvim

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

4 participants