I use lazyvim default, it turns out that gohtml is not recognized as html, I ended up creating a filetype.lua file and setting .gohtml to .html
In this case, the LSP recognizes it through :LspInfo
However, when saved, it even appears that null-ls is formatting, but it does not format.
I've been researching for a few days and I haven't been able to get it to work yet, if I change it to .html it formats it, but that's a pain.
Here's an example of a filetype.lua file:
Once you have created the filetype.lua file, you need to load it into Vim. You can do this by adding the following line to your vimrc file:
After loading the filetype.lua file, you should be able to use :LspInfo to see that the LSP recognizes .gohtml files as HTML. However, you may still encounter issues with formatting when saving the files.
This is because the null-ls formatter is not able to automatically format .gohtml files without additional configuration. To fix this issue, you need to manually configure null-ls to use the appropriate formatter for .gohtml files.
Here's an example of how to configure null-ls to use the prettier formatter for .gohtml files:
With this configuration, null-ls should be able to automatically format .gohtml files when you save them.