Skip to content

Commit

Permalink
Tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
lpil committed Jan 16, 2024
1 parent 3ec2773 commit e76f1f7
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ take a look at what's new!
## Multi-target projects

Gleam can compile to one of two targets: Erlang or JavaScript. Some packages may
only support one of the two targets, possibly because they make use of features
that are not available on the other target.
only support one of the two targets, possibly because they make use of
Erlang features that are not available in JavaScript, or vice versa.

Until now if you added one of these packages as a dependency to your project it
meant that your project could no longer be compiled for the other target, even
if your project only uses parts of the dependency that are cross-target.
if your only uses parts of the dependency that are cross-target.

This issue is now solved! The Gleam compiler now tracks target support at the
level of individual expressions, so if you only use code that supports the
Expand All @@ -40,17 +40,17 @@ Thank you to [Giacomo Cavalieri](https://github.com/giacomocavalieri/) for this

## Language server documentation

When a Gleam package is published it also has [generated HTML documentation
](https://hexdocs.pm/wisp/) published to HexDocs, the documentation hosting
website for the BEAM ecosystem.
When a Gleam package is published it also has [generated HTML
documentation](https://hexdocs.pm/wisp/) published to HexDocs, the documentation
hosting website for the BEAM ecosystem.

The Gleam language server (which is built in to the Gleam build tool binary)
also provides access to this documentation. When you hover over code it'll send
this same documentation to your editor for you to read, typically in a little
pop-up window.

Reading documentation in your editor is convenient, but it may not be as nice
an experience as reading it in your browser, so the language server now also
an experience as reading it in your browser. The language server now also
checks to see if the code is on HexDocs, and if so it'll append a link to the
appropriate page to the end of the documentation. Here you can see it within the
Neovim text editor:
Expand Down

0 comments on commit e76f1f7

Please sign in to comment.