Neovim's vim.keymap.set and similar utilities are very useful for creating and managing keymaps, however they lack some ergonomics when building more complex keymaps that require setting and deleting the keymaps periodically. A simply utility function makes this really clean and easy to do.
Bits and bytes of code
Bytes is my collection of short-form posts, tips, and things I learn as I build software.
Showing results for #neovim
ClearThe nvim_create_augroup and nvim_create_autocmd APIs in Neovim work great for creating auto commands, however they sometimes are a bit cumbersome to use compared to the old Vimscript style augroup command where auto commands inside the augroup block were automatically grouped. Let's recreate this same type of experience in Lua!
Emmet support for JSX is somewhat limited in Neovim as it is not able to easily distinguish between when it should provide JSX completions in render methods or CSS completions in styled components or similar CSS-in-JS libraries. If you only care about CSS completions and you are okay with a few config changes, you can make it work pretty easily with an entry_filter for your completions.