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. ![]()
Most Liked
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
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
Great idea! I’m definitely installing that tomorrow when I get back to work ![]()
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
@dogweather terrific
thank you for this extension!
dogweather
Yeah, you’re right. It’s good to keep a history of this.











