Nvim Rename State

screenshot of Nvim Rename State

Rename the getter and the setter of a state hook in react/solidjs at the same time.

Overview

The nvim-rename-state is a powerful tool designed for developers working with React and SolidJS in Neovim. This plugin simplifies the process of renaming state hooks, whether you need to change the getter or setter at the same time. With its reliance on Treesitter, it provides a seamless experience for cleaning up your code efficiently.

This utility is particularly beneficial for those who frequently use useState or createSignal hooks, allowing developers to streamline their workflow and maintain code quality with minimal effort. The installation process is user-friendly and compatible with various package managers, making it accessible to a broad audience.

Features

  • Treesitter Integration: Leverages Treesitter for enhanced syntax parsing, requiring Neovim version 0.5.0 or higher.
  • Multi-Language Support: Compatible with both Javascript and Typescript files, ensuring flexibility in your projects.
  • Framework Compatibility: Works with state hooks from both React and Solid, catering to a variety of development needs.
  • Easy Installation: Can be easily installed using popular package managers like lazy.nvim, packer.nvim, or vim-plug.
  • User-Friendly Usage: Simply place your cursor over the defined hook and initiate the rename process for efficiency.
  • Custom Naming: Allows users to specify a new name for the hook in advance for even faster renaming.
  • Open for Contributions: Actively encourages community involvement through pull requests and issue reporting.