Replies: 3 comments
-
Totally agree! There was a bit of chat about it in this issue: #244 (comment) In there, I've dropped a few links in around how the integration might work. At this point, I don't know whether it's something that should be done within the But... that might not work, so
I just haven't had chance to do much further research into it yet... |
Beta Was this translation helpful? Give feedback.
-
Oh, in my Gophercon UK talk from earlier this year, I talk about how the underlying protocol works, and cover how it works with templ. https://youtu.be/EkK8Jxjj95s |
Beta Was this translation helpful? Give feedback.
-
Hey, sorry for the delay, I haven't had time to deeply look into this solutions. Just saw the vscode request forwarding and it seems like a nice solution, but since i have a lack of knowledge on nvim and goland I don't really know how feasible it is. The thing with the templ lsp having the html lsp is that it requires more maintenance and will be bit bloated. Assuming the request forwarding as solution, maybe is worth at least that the templ cli can identify when the user is in a HTML part of templ, so the client don't have to rewrite this code. PD: I saw your talk like 1-2 months ago.. great talk 💯 . |
Beta Was this translation helpful? Give feedback.
-
I think it would be productive for templ users if the html had intellisense, so that they could have information about the tags and attributes. I think this is quite easy to do, I was able to do a minimum example just by making small changes to the library and adding the definitions as a json that I got from https://github.com/microsoft/vscode-html-languageservice/blob/main/src/languageFacts/data/webCustomData.ts . As in the photo below
About autocompletion I know there are snippets but I think this approach has some cons. For example, it would be good if when I put an attribute with autocompletion it would automatically add the attribute plus the equals and the double quotes. And that the autocomplete brings the definitions of the attribute/tag that corresponds to it.
In this case I don't know how to achieve it and I don't know how difficult it would be to do it.
Beta Was this translation helpful? Give feedback.
All reactions