Overview Version History Q & A Rating & Review
Elixir Snippet Extension
Overview
This Visual Studio Code extension provides a collection of useful Elixir snippets to speed up development. It includes common Elixir code patterns like defining modules, functions, and working with common Elixir constructs such as pipelines, pattern matching, and error handling.
Features
Predefined code snippets for Elixir development.
Includes snippets for:
Module definition
Function definition (public and private)
Pattern matching
Pipelines
Error handling with try-catch
JSON encoding and logging
Snippets
Snippet Name
Description
defmodule-template
Defines a new module.
defmodule-doc
Defines a new module with documentation.
def-template
Defines a public function.
defp-template
Defines a private function.
patternmatch-template
Defines a function using pattern matching.
json-encode
Encodes data to JSON format using Jason
.
logger-template
Logging template with different log levels.
pipeline-start
Starts a pipeline with an initial value.
pipeline-continue
Continues a pipeline.
Installation
Install from the VS Code Marketplace or manually via a .vsix
file.
To install manually:
Download the .vsix
file.
Open VS Code, go to the Extensions view.
Click the "..." menu in the top-right corner and select "Install from VSIX".
Select the .vsix
file you downloaded.
Usage
To use a snippet:
Open an Elixir file.
Type the prefix of the snippet (e.g., defmodule-template
) and hit Tab
.
The snippet will expand, allowing you to fill in the necessary details.
Requirements
Contributing
Feel free to open issues or submit pull requests if you find any bugs or have suggestions for new snippets.
License
MIT License