RSSAmplifier

Blog

Evgeni Chasnovski

Personal website of Evgeni Chasnovski

echasnovski.comRSS feed ↗20 posts

Latest posts

A Guide to vim.pack (Neovim built-in plugin manager)

The upcoming Neovim 0.12 release will have a built-in plugin manager . It is implemented in Lua and is available as a built-in vim.pack module (hence the name). This blog post describes the fundamentals of how vim.pack is intended to be used. Reading only selected sections should be fine, but it is written to be read from top to bottom. Note Beware that, although unlikely, some information from…

How many Neovim plugins is too many

First, to directly answer the implied question in the title: there is no specific number. Each Neovim user decides for themselves how many plugins bring the most joy out of using the editor. It can be as low as zero and as many as 100+. What I am curious about is how the number of loaded plugins affects overall performance of using Neovim. Motivation There are at least two main reasons for me to…

Neovim now has built-in plugin manager

Originally posted on Reddit Hello, Neovim users! After rounds of discussions and iterations, Neovim now has a minimal built-in plugin manager . Its functionality is present only on latest master branch and located in vim.pack module. It is planned to land in 0.12 (which is still not quite soon). You can read more about the design and workflow here . You can also see the demo of the latest state in…

Neovim + mini.pick + nushell = CLI fuzzy picker. Why? Because why not.

Originally posted on Reddit Hello, Neovim users! For quite some time I was interested in trying out Nushell as my default shell. To be perfectly honest, I am not sure why. Probably because I am drawn to the idea of “piping structured data” and mastering a powerful tool for the future. Or maybe it is just pretty tables, who knows. Several weeks ago I decided to give it a try but only in Ghostty…

PSA for color scheme authors: you might want to adjust PmenuSel

Originally posted on Reddit TL;DR: to account for possible new custom highlighting in popup menu items, you might want to switch fg and bg colors in Pmenu*Sel groups while adding reverse attribute. Neovim Nightly (0.11) recently landed new features regarding adding custom highlighting to items of built-in popup menu: Whole item via hl_group ( thanks to glepnir ). Only “kind” field via kind_hlgroup…

You can remove padding around Neovim instance with this one simple trick…

Originally posted on Reddit Left: with "frame" from terminal emulator; Right: without that "frame" (Sorry for a slightly clickbait-y title. Always wanted to use one of those :) ) If you have different background color in your terminal emulator and Neovim, then chances are that you experience this weird “frame” around your Neovim instance. Like the one shown in the left part of the picture. This is…

Neovim now has built-in commenting

Originally posted on Reddit The PR for built-in commenting has been merged into Nightly builds. There is more info in the initial PR comment and help entry , but for the lazy: All it does is out of the box mappings: gc operator (Normal and Visual mode) to toggle comments. gc textobject (Operator-pending mode) as operator target. gcc for toggling comments in current line (basically a convenient gc_…

Exactly 10 years ago Neovim had its first commit

Originally posted on Reddit A link to first commit . To celebrate this, Neovim team created an official store: https://store.neovim.io . It should be live now. All profit will go to benefit Neovim project.

Neovim now has its own default color scheme

Originally posted on Reddit See this PR for more details. And if you think you’ll miss magenta floating windows and completion menu, there is colorscheme vim .

Floating windows in Neovim can now have footer

Originally posted on Reddit After merging this PR , nvim_open_win() now supports footer and footer_pos options. They are symmetrical to title and title_pos options, but affect the bottom part of floating window border. Important : this is a part of Neovim 0.10, not current stable Neovim 0.9.1. Will also be available in next Nightly build. I am excited to see how Neovm community can leverage this.…

Average Neovim color scheme

Originally posted on Reddit Hello, Neovim users! For quite some time I was wondering how would “average popular Neovim color scheme” look like. I mean, it would certainly contain much purple and blue, but how much exactly ? It is not a trivial thing to compute. Thankfully, the recent release of ‘mini.colors’ makes this task much more manageable. I decided that general approach to averaging color…

You don’t need ‘vim-rooter’ (usually) or How to set up smart autochange of current directory

Originally posted on Reddit Hello, Neovim users! The airblade/vim-rooter plugin is an essential part of my Neovim workflow. It automatically changes current directory ( :h current-directory ) for every buffer to a more natural one (like to path of its Git repository). For me this has the following benefits: Most file explorers open closer to the file of current buffer and not inside directory in…

Results of “Neovim built-in options survey”

Originally posted on Reddit Hello, Neovim users! Around two weeks ago I decided to make a Neovim built-in options survey . Now it is closed, as it doesn’t seem to have an intensive answer supply (last one was more than 24 hours ago). There were total 227 legible answers. Not as many as I had hoped starting it, but it is what it is. Main summary of basic options are in the post image. To answer…

Neovim built-in options survey needs your contribution

Originally posted on Reddit Hello, Neovim users! Update from 2022-12-08 . Survey is closed. Here is a post with results . For a long time I have been curious about how other people use built-in Neovim settings. For example, I am almost sure that most of you set termguicolors to leverage modern color schemes, but I have nothing to back it up. So I decided to make a survey and it needs your…

Create and apply randomly generated Base16 color scheme

Originally posted on Reddit Hello, Neovim users! I decided to share a bit silly, but fun way to choose a color scheme you like. Maybe even have this in your startup config, if you feel particularly adventurous :) It uses mini.base16 module of mini.nvim for both palette generation and color scheme application. Granted, results are not that different from one another (mainly because they share same…

Usage of ‘after/ftplugin’ directory for filetype-specific configuration

Originally posted on Reddit Do you create any configuration that is specific to a certain file type (like setting local options or buffer-local variables, creating local mappings, running some function, etc.)? No . Sooner or later you probably will. So let’s pretend that the answer is… Yes . Do you use autocommands with FileType event for this? No . Good. There is probably nothing valuable for you…

I contributed to (mostly) 14 top-rated Neovim color schemes. Here are some observations

Originally posted on Reddit Some time ago I decided to improve user experience for my mini.nvim plugin by adding its explicit support to popular color schemes. Although out of the box experience should be pretty good (most coloring is done by linking to carefully selected builtin highlight groups), having them tailored to color scheme choices is certainly better. So I went to…

StyLua now supports collapsing simple statements

Originally posted on Reddit Starting from version 0.14.0, StyLua ( the Lua code formatter in Neovim world) implements option collapse_simple_statement . From release notes: It can take the values Never (default), FunctionOnly , ConditionalOnly or Always . When enabled, “simple” functions or if statements (ones where they only return a value or have a simple statement such as a function call) will…

Useful functions to explore Lua objects

Originally posted on Reddit To look at contents of Lua object a you can execute :lua print(vim.inspect(a)) . This will print content inside command line. Following nvim-lua-guide’s tip ( edit : after making PR to nvim-lua-guide, it is currently in sync with edited version of this post), this can be wrapped into _G.dump() function and become :lua dump(a) (and even :lua dump(a, b) ). However, in…

Count bounces in table tennis world record

Prologue Dan Ives is no stranger to participating in “prolonged” table tennis activities and capturing it on camera. He once said “table tennis” 100,000 times , which took him about 15 hours. With his father Peter he also set a world record for the longest table tennis rally which lasted for 8 hours, 40 minutes, and 10 seconds (8h40m10s as a shorter description of time period). On May 7th 2020 Dan…