Hacker News new | ask | show | jobs
by oDot 773 days ago
That's pretty cool.

I'm the author of vleam[0], which enables Gleam usage in Vue SFCs.

If there's one thing I missed building the LSP is an awesome-list, where I could find stuff like Multispy -- LSP resources weren't easy for me to navigate as a beginner.

[0] https://github.com/vleam/vleam

3 comments

It is, of course, hit or miss whether someone chose to add the topic to their repo[1], but I have found that browsing the GitHub topics for things to be a much more up-to-date list than any awesome-list which relies on both submissions and PR approval - like some kind of "wiki over postal mail"

https://github.com/topics/language-server

https://github.com/topics/lsp

FWIW, GitLab has a similar system https://gitlab.com/explore/projects/topics/language-server

1: and here's my semi-annual plea to anyone at GitHub to allow submitting repo topics via a PR process, since there are quite a few repos that would really benefit from the discoverability afforded by topics but the repo authors sometimes don't know or can't be bothered, but may very well merge a PR containing (e.g.) .github/topics.yaml

That's a great idea, thanks for sharing
This is my first time reading about Gleam and it looks really cool! How's the experience of writing Vue components in it? Web frameworks like it and Svelte tend to liberally meddle with the syntax & semantics of JS through transpilation to have a specialized dev experience, so it can be difficult to use a different language and feel like a first class citizen since it's not like using a simple API anymore (unless there is special consideration given to it like ReScript and React).

Also, what's the concurrency story like? Gleam does not seem to support async/await but apparently it has colored functions when compiling to JS, though I'm not sure how those interop with the JS ecosystem.

vleam does not use Vue's `<script setup>`, but instead transpiles to a regular `<script>` block, so it does not rely on specialized syntax.

It works surprisingly well, and Gleam, being such a simple language, is a joy to code in. The main issues are honestly vleam itself -- the LSP is a bit finicky and the Vite plugin needs more work, as it sometimes requires a full restart and tends to transpile excessively. I expect most of this to be solved soon enough.

As for concurrency, the `fetch` usage example sums it up fairly well:

https://github.com/gleam-lang/fetch/tree/main

There is a list of supporting tooling under the official LSP site, but it's not very descriptive: https://microsoft.github.io/language-server-protocol/impleme...
That's what I used, indeed not very comprehensive