Gleam Snippets for Zed IDE
A collection of Gleam snippets for the Zed IDE that you might be used to from other editors.
Features
This extension provides a comprehensive set of snippets for Gleam development, including:
- Package and import declarations
caseanduseexpressionsletandconstassignment expressions- Public, private, test and anonymous function declarations
- Type declarations
- Pipes
- And much more!
Installation
Method 1
- Go to Extensions menu in Zed IDE
- Search for "gleam-snippets"
- Click "Install"
Method 2
- Clone this repo:
git clone https://github.com/BlueBlizzardd/gleam-zed-snippets- Go to Extensions menu in Zed IDE
- Click "Install Dev Extension"
- Select the folder you cloned
Usage
Start typing the snippet prefix in a Gleam file and press Tab to expand the snippet.
Available Snippets
| Prefix | Description |
|---|---|
pub / pub fn |
Public function |
fn |
Private function |
test |
Test function |
af |
Anonymous function |
let |
Let assignment |
leta |
Let assert assignment |
const |
Const assignment |
pub / pub const |
Public const assignment |
use |
use expression |
case |
case expression |
type |
Type declaration |
pty / pub type |
Public type declaration |
pexfn / pub external / pub external fn |
Public external function declaration |
im |
Import |
im. |
Import unqualified |
p / |> |
Pipe |
# |
Tuple |
bl |
Block |
seq / should |
Should equal |
strue / should / should.b |
Should be true |
sfalse / should / should.b |
Should be true |
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
Author
Eduardo Juliao - ejuliao9@gmail.com