RSSAmplifier

Blog

Pierre-Adrien Buisson : Le Blog !

blog.pabuisson.comRSS feed ↗11 posts

Latest posts

Low-tech Elixir LSP in vim with fzf and Ripgrep

For the past year, I’ve worked as an Elixir developer. The language and platform are great and I enjoy working within this ecosystem. However, one thing has been bothering me: LSP server(s). When they work, they work very well. When they work . Last year, a new LSP project was launched to regroup the efforts of contributors from the 3 major LSP engines (ElixirLS, Lexical and Next LS) in order to…

Cleaning trailing spaces in vim and neovim

I’m not sure where this all started. I’m pretty sure that at some point in a place I used to work at, we tried to normalize our code and get rid of trailing whitespaces was a part of that. Since then, I’ve always kept this bit of configuration, but the way I do this evolved over time. Here are a few solutions I used to get rid of these unnecessary trailing spaces. Solution 1: using a custom…

Filter rails routes easily with FZF

In my last two jobs, I’ve been working on pretty big Ruby on Rails applications. Over time and despite our best efforts, interacting with the application through the built-in commands becomes slower. This is especially sensible for commands such as rails routes that I use frequently. But searching the rails routes output does not have to be painful: I have a tip for this that I shared with many…

Show background jobs number in your ZSH prompt

My daily workflow is based around vim (neovim, actually) in an iTerm 2 terminal. As a consequence, I spend most my day navigating iTerm 2 tabs and switching between editing/viewing code in vim and doing stuff in my terminal: running tests, interacting with my file system or with git for instance. Which makes me use Ctrl-Z pretty often. Ctrl-Z and background jobs What is Ctrl-Z you may ask? It…

Neovim modern features: treesitter and LSP

Since its 0.5 release, Neovim received huge updates allowing advanced features that we usually find in full-fledged IDEs. The main ones are treesitter , which gives Neovim more precise language parsing and syntax highlighting, and native LSP , allowing Neovim to benefit from autocompletion, go-to-definition, inline documentation, refactoring actions, and such awesome features, tailored to each…

My 8 favorite color schemes for modern vim

I’ve been a vim user for a long time now, and a color schemes nerd for quite a while as well. The color scheme landscape has changed a lot lately. Since the introduction of true colors terminals, you’re not limited to a 256 colors palette anymore and therefore, lots of new fancy color schemes appeared over the course of the past years. In the same time, several “modern” text editors appeared and…

À la découverte de Sinatra #3 - Utiliser SASS/SCSS dans un projet Sinatra

Comme nous l’avons évoqué dans un article précédent (voir par ailleurs : 3 raisons d’aimer SCSS ), SASS/SCSS est un pré-processeur de CSS qui apporte à vos feuilles de style un lot de fonctionnalités qui vont vous faciliter la vie et alléger votre code. Il devient très vite impossible de s’en passer ! Nous allons reprendre le projet Sinatra débuté dans les articles À la découverte de Sinatra #1 -…

Sinatra : authentification avec Warden

Récemment, pour plusieurs sites et prototypes développés avec Sinatra, j’ai eu à me poser la question de comment faire un système d’authentification digne de ce nom. En Rails, la solution de-facto s’appelle Devise , mais étant très rails-centric, cette solution est compliquée à utiliser dans un projet Sinatra. Pour ce genre de fonctionnalités, on va alors plutôt avoir recours à la gem warden.…

Grape : custom validator conditionnel

Depuis le début de l’année, j’ai passé une partie importante de mon temps à travailler sur la conception et le développement d’une API publique. C’est un vaste chantier, et, une fois passé le temps de la recherche, de la structuration et de la définition des grandes lignes, il était temps de passer à l’implémentation. Pour cela, j’ai choisi d’utiliser le gem Grape , qui fournit un DSL facilitant…

Recherchez dans votre code avec Ack

Si comme moi vous passez la majeure partie de votre temps à éditer du texte ou des documents, vous générez beaucoup de contenu, et vous avez régulièrement besoin de rechercher dans ce contenu. Et il s’avère que rechercher dans un projet de développement présente des spécificités pour lesquelles des outils génériques comme Spotlight montrent vite leurs limites. Dans un environnement unix, vous…

Firefox : filtrer les résultats de la barre d'adresse

Voilà déjà un moment que je voulais vous présenter cette astuce de Firefox qui, à mon avis, n’est pas très connue mais très pratique. Pourquoi maintenant ? Parce que cette astuce est en lien avec la barre d’adresse de Firefox (la bien-nommée “Awesome Bar”) qui a récemment une refonte importante de son design. Si vous êtes comme moi et que vous utilisez Firefox depuis plusieurs années au quotidien,…