reddit / emacs

How to work with Razor and Blazor in Emacs?

looopTools · 2022-07-26 07:07
Hello lads and lasses, I am working at a C# shop where our systems utilise Blazor, Razor and MudBlazor. I have configured Emacs so the C# part is walk in the park. But I cannot find a good way to integrate working with Blazor and Razor. Is there a good way to do this or is it a lost cause?
[deleted] · 2022-07-26 08:49
[removed]
jsled · 2022-07-26 09:40
This has been removed, as posts must relate to emacs.
notperm · 2022-07-26 20:20
[Web Mode](https://web-mode.org/) has support for razor pages. I used it briefly and it seems to be good. Here are the relevant parts of my config: ``` (require 'web-mode) (add-to-list 'auto-mode-alist '("\\.html?\\'" . web-mode)) (add-to-list 'auto-mode-alist '("\\.cshtml?\\'" . web-mode)) (add-to-list 'auto-mode-alist '("\\.svelte?\\'" . web-mode)) (setq web-mode-engines-alist '(("razor" . "\\.cshtml\\'") ("blade" . "\\.blade\\.") ("svelte" . "\\.svelte\\.") )) ```
looopTools · 2022-07-27 05:49
MOTHER OF SHADOWS I did not know that! thanks a lot!