dogweather

dogweather

ByeSpec—a VS Code extension to customize @spec appearance

The byesig extension is one of my favorites when doing Ruby+Sorbet coding. I forked it to create ByeSpec to do the same for Elixir specs. Here’s how I use it:

Before

After

On a light theme

I want to see my specs, but I also want to reduce visual noise from so much text on the screen. Opacity and some other settings are configurable, like the option to show the green markers in the left-hand column. Personally, they help me navigate my code, seeing where the functions begin.

Byesig does code folding too for the Sorbet sigs, which needs a little effort to get working with specs.

This is v1.0.0 and my first IDE extension, so YMMV. :slight_smile:

Most Liked

cmo

cmo

Nice one @dogweather. It doesn’t seem to work on multi-line specs. The first line is subdued, but the following lines are not.

Would be handy to be able to subdue @impl too.

sodapopcan

sodapopcan

Vim users can achieve this with the following:

" ~/.vim/after/colors/elixir.vim

hi link elixirFunctionSpec Comment
call matchadd("elixirFunctionSpec", '^\s\+@spec\_.*::.*$')

Regex may need tweaking, I haven’t used this since my old job.

sheerlox

sheerlox

Great idea! I’m definitely installing that tomorrow when I get back to work :wink:

Quick licensing heads up: I noticed you’ve replaced the original license file. You should probably restore the original copyright (while keeping your own), as mentioned in the MIT License (“The above copyright notice […] shall be included in all […] substantial portions of the Software.”)

This would do the trick:

MIT License

Copyright (c) 2023 Public.Law
Copyright (c) 2022 Peter Arato
sheerlox

sheerlox

dogweather

dogweather

Yeah, you’re right. It’s good to keep a history of this.

Where Next?

Popular in Libraries Top

RobertDober
Earmark is a pure-Elixir Markdown converter. It is intended to be used as a library (just call Earmark.as_html), but can also be used as...
239 11851 134
New
mbuhot
Leverage Open Api 3.0 (Swagger) to document, test, validate and explore your Plug and Phoenix APIs. Generate and serve a JSON Open API ...
New
aditya7iyengar
Rummage.Ecto and Rummage.Phoenix provide ways to perform Searching, Sorting and Pagination over Ecto queries and Phoenix collections. Fo...
New
Crowdhailer
I have been updating a library that allows you to pipe between functions that use the erlang result tuple convention. Assuming you have...
New
benlime
LiveMotion enables high performance animations declared on the server and run on the client. As a follow up to my previous thread A libr...
New
woylie
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries. offset-based pagination with...
New
tmbb
PhoenixWS - Websockets over Phoenix Channels Source code on Github here: https://github.com/tmbb/phoenix_ws Phoenix channels are a great...
New
gabrielpoca
Hello everyone! I want to share with you something that I’m really proud of: https://stillstatic.io/ Still is a static site builder for...
New
vic
Expat is a tiny experiment I did for extracting patterns and being able to reuse them (compose and share patterns between elixir librarie...
New
mischov
import Meeseeks.CSS html = HTTPoison.get!("https://news.ycombinator.com/").body for story <- Meeseeks.all(html, css("tr.athing")) do...
New

Other popular topics Top

lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 49522 488
New
chrismccord
As promised, the first release candidate of Phoenix 1.3.0 is out! This release focuses on code generators with improved project structure...
New
mgjohns61585
Could someone help me? I'm making my first elixir program, number guessing game. I can't figure out how to convert the user's guess from ...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
beno
I will often find my self writing things similar to: case some_value do nil -> something() "" -> something() _ -> someth...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers' Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
lucidguppy
I have a super simple question about elixir - how would I take a file like this foo bar baz and output a new file that enumerates th...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New

Sub Categories:

We're in Beta

About us Mission Statement