Issue #26
Email Newsletter
Sign up with your email address to receive an email when a new issue of This Week in Neovim is available
Neovim Core updates {#core}
Updates of Neovim itself, which are available on Neovim nightly.
Important: if you are a plugin author, you are strongly advised to follow the #14090 breaking changes on master GitHub thread, as it contains important breaking changes information.
#21472: :hardcopy
is now removed.
- Commands removed:
:hardcopy
- Options removed:
printdevice
printencoding
printexpr
printfont
printheader
printmbcharset
#18706 nvim -l
now invokes Lua scripts instead of setting the lisp
option. To set the 'lisp' option as -l formerly did, just set it like any other option:
nvim -c "set lisp"
new-plugins-{#new-plugins}">New plugins {#new-plugins}
import-cost.nvim
View bundle size of Javascript imports inside of your editor. The VSCode import-cost plugin has finally been ported to Neovim! A plugin made by @barret-ruth
incolla.nvim
A Neovim Lua plugin to paste images from the MacOS clipboard. No dependencies, works for multiple formats and sources. Written by @mattdibi.
auto-hlsearch.nvim
By @asiryk. Enables the hlsearch
option when you start searching e.g. with key /
. Disables the hlsearch
when you move the cursor, so you don't have to think about enabling/disabling it manually.
telescope-all-recent.nvim
A telescope.nvim modification for adding (f)recency sorting to any telescope picker. Written by @prochri.
ts-node-action.nvim
A plugin framework for applying functional transformations to treesitter nodes. If you've ever found yourself doing some uninteresting reformatting actions on text frequently, speed up your workflow by writing a function to do the hard work for you! Out of the box most of the actions are for ruby, but Javascript, Python, Lua, and JSON have some actions too. And it's incredibly simple to add your own functions or reuse the builtin actions for new languages.
Some of the built-in functions are:
- Expand/collapse hashes/arrays/method params
- Cycle cases on identifiers/constants (snake, camel, underscore, screaming snake)
- Split/Join blocks
- Toggle Booleans
- Toggle conditionals with else into ternary and back
- Toggle conditionals without else into postfix format and back
- ... And more! Check out github for the full list :)
Pull requests for language support are welcome! Written by @CKolkey!
bufferline-cycle-windowless.nvim
Neovims default tab-window-buffer model allows viewing open buffers in multiple windows.
This plugin helps give a more traditional behaviour for tabs by configuring the ability to skip past buffers that are already open in an existing window. The behaviour is toggleable and configurable to be on or off by default.
Written by @roobert.
wrapping.nvim
A new plugin by @andrewferrier which is designed to make it easier to handle soft
and hard line wrapped files, and is especially useful if you deal with a lot of text-like files in Neovim (Markdown,
AsciiDoc, text, etc.) from different sources with different types of line wrapping. It's based on an older vim plugin
the author wrote called vim-wrapping-softhard
.
Updates {#updates}
🌈 nvim-ts-rainbow 🌈 has a new maintained fork
Rainbow parentheses for neovim using tree-sitter.
The nvim-ts-rainbow repo has been archived and the latest commit announces the original project will no longer be maintained.
@mrjones2014 has announced a new maintained fork, but look for updates on other forks from its many contributors.
Neogen
Neogen is a better annotation generator. Supports multiple languages and annotation conventions.
Neogen 2.11
version now generates default annotations from the best type match,
when calling :Neogen
without arguments (credits to @ssiyad).
Neogen will now try to guess (based on cursor position in the syntax tree) where to insert the annotations, by default.
No behaviour is changed when generating annotations with :Neogen <TYPE>
, >TYPE>
being the desired annotation type.
conceal.nvim
A Neovim Plugin which uses Tree-sitter to conceal typical boiler Code
Now supports python
in addition to lua
!
pvim
A portable Vim wrapper. It intends to contain everything to the one directory and if needed grab the Neovim app image.
New support for lazy.nvim
The wrapper is now more intelligent with setting up your plugin manager by waiting until your config calls for it. As such it is no longer limited to only Packer based configs and has added Lazy support. If you want to use it with another plugin manager feel free to open an issue or PR.
github-nvim-theme
Github Neovim themes
The author would like to remind that following the announcement of Neovim 0.9 to be released in Feb 2023, the plugin is going to have a migration / refactoring that might imply configuration issues. The author opens a discussion to discuss possible migration paths and warnings before the actual breaking changes start appearing.
did-you-know?-{#tips}">Did you know? {#tips}
Last week, we saw how to jump to the last place you’ve visited in a file.
Today we'll learn how to disable hlsearch
automatically when your search done and enable on next searching without
extra plugins. Add next lines in your init.lua
:
local ns = vim.api.nvim_create_namespace('toggle_hlsearch')
local function toggle_hlsearch(char)
if vim.fn.mode() == 'n' then
local keys = { '<CR>', 'n', 'N', '*', '#', '?', '/' }
local new_hlsearch = vim.tbl_contains(keys, vim.fn.keytrans(char))
if vim.opt.hlsearch:get() ~= new_hlsearch then
vim.opt.hlsearch = new_hlsearch
end
end
end
vim.on_key(toggle_hlsearch, ns)
Also, if you don’t want to have a listener listening to all your keys, you can just achieve the same result manually by
calling the :noh
(:nohlsearch
), which removes the highlighting of the search.
Special thanks {#special-thanks}
These people help contributing various updates about Neovim and its ecosystem! Thanks for your contributions! ❤️
want-to-contribute?-{#contribute}">Want to contribute? {#contribute}
You have noticed something missing that you saw lately? Do not keep the candies for yourself and please feel free to share with us! You can open a PR at This Week In Neovim Contents.
Feel free to read how to contribute to get started.