razzmatazz / csharp-language-server

Roslyn-based LSP language server for C#
MIT License
576 stars 37 forks source link

Support for Razor pages #138

Open mphe opened 6 months ago

mphe commented 6 months ago

Is support for Razor pages planned? I'm currently working on an ASP.NET Core Razor project and having LSP support in cshtml files would be awesome.

razzmatazz commented 6 months ago

I was working on a prototype at one point but left it abandoned due to lack of time :(

My initial dabblings at parser+lexer for razor: https://github.com/razzmatazz/fazor

razzmatazz commented 6 months ago

Not sure if that is the right approach. Ideally it should integrate with microsoft asp.net razor libs/parsers to not maintain our own.

mphe commented 6 months ago

I have found https://github.com/dotnet/razor, which supposedly implements a LS "rzls", but apparently noone is using it. According to this comment, the integration of rzls seems to be non-trivial. Also just found this post related to the LS included with the vscode C# plugin.

haras-unicorn commented 6 months ago

i found the rzls thing a while back as well and tried to build and then use it but failed even building it i might try building it again, setting up a script, then try to reverse enegineer how vscode uses it most probably not cuz im no expert and dont have that much time but ill post here and on that omnisharp-vim thread if i find anything

haras-unicorn commented 6 months ago

ok so getting rzls to build and work wasnt so hard now but it seems it has a ton of custom LSP messages and that language server wont work with a general LSP client implementation

razzmatazz commented 4 months ago

☝🏻 that was exactly the result of my investigation of rzls, --you would need to implement additional behaviour and preserve a lot of state on the client to integrate it

tris203 commented 3 months ago

I am working on a plugin to hopefully work towards support for this is anyone is looking to collaborate

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