Neovim Tips for a Better Coding Experience — Part 2
Overview
I walked through with you the tips and tricks using tree-sitter
in my previous article. This article continues to explore how we can improve our coding experience using Neovim.
This article can be read independently from the other related articles.
- Neovim Tips for a Better Coding Experience
- Neovim Plugins for a Better Coding Experience — Part 3
- Neovim Plugins for a Better Coding Experience — Part 4
- Neovim Plugins for a Better Coding Experience — Part 5
Better Select
nvim-treehopper is a plugin using tree-sitter
that provides region selection using hints on the abstract syntax tree of a document. This is intended to be used for pending operator mappings.
Using packer.nvim
, I install and configure the plugin.
use {
"mfussenegger/nvim-treehopper",
config = function()
vim.cmd [[omap <silent> m :<C-U>lua require('tsht').nodes()<CR>]]
vim.cmd [[vnoremap <silent> m :lua require('tsht').nodes()<CR>]]
end,
}