{"id":13681948,"url":"https://github.com/olrtg/nvim-rename-state","last_synced_at":"2025-04-24T17:30:59.789Z","repository":{"id":111723582,"uuid":"540215802","full_name":"olrtg/nvim-rename-state","owner":"olrtg","description":"Rename the getter and the setter of a state hook in react/solidjs at the same time.","archived":false,"fork":false,"pushed_at":"2024-06-02T01:01:40.000Z","size":13,"stargazers_count":24,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-19T03:58:58.881Z","etag":null,"topics":["neovim","nvim"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/olrtg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-23T00:14:03.000Z","updated_at":"2025-03-23T18:08:43.000Z","dependencies_parsed_at":"2024-08-02T13:21:19.761Z","dependency_job_id":null,"html_url":"https://github.com/olrtg/nvim-rename-state","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olrtg%2Fnvim-rename-state","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olrtg%2Fnvim-rename-state/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olrtg%2Fnvim-rename-state/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olrtg%2Fnvim-rename-state/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/olrtg","download_url":"https://codeload.github.com/olrtg/nvim-rename-state/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250674242,"owners_count":21469183,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["neovim","nvim"],"created_at":"2024-08-02T13:01:38.220Z","updated_at":"2025-04-24T17:30:59.530Z","avatar_url":"https://github.com/olrtg.png","language":"Lua","funding_links":[],"categories":["Lua"],"sub_categories":[],"readme":"# nvim-rename-state\n\nRename the getter and a setter of a state hook in react/solidjs at the same time using `:RenameState`.\n\n```javascript\n// Initial code\nconst [anchorEl, setAnchorEl] = useState(null)\n\n// After renaming with `:RenameState` or `:RenameState anchor`\nconst [anchor, setAnchor] = useState(null)\n```\n\n## Features\n\n- Leverages [Treesitter](https://tree-sitter.github.io/tree-sitter/) (requires [neovim](https://neovim.io/) \u003e= 0.5.0).\n- Supports Javascript and Typescript files.\n- Supports [React](https://reactjs.org/) and [Solid](https://www.solidjs.com/) state hooks.\n\n## Installation\n\n[lazy.nvim](https://github.com/folke/lazy.nvim)\n\n```lua\n{ \"olrtg/nvim-rename-state\" }\n```\n\n[packer.nvim](https://github.com/wbthomason/packer.nvim)\n\n```lua\nuse { \"olrtg/nvim-rename-state\" }\n```\n\n[vim-plug](https://github.com/junegunn/vim-plug)\n\n```vim\nPlug 'olrtg/nvim-rename-state'\n```\n\n## Usage\n\nPut your cursor in the row of the defined `useState` or `createSignal` hook and use:\n\n```vim\n:RenameState\n```\n\nOr if you want to pass the new name for the hook in advance:\n\n```vim\n:RenameState \u003cnew_name\u003e\n```\n\n## Contributing\n\nAll contributions are welcomed! Just open a pull request or an issue.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folrtg%2Fnvim-rename-state","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Folrtg%2Fnvim-rename-state","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folrtg%2Fnvim-rename-state/lists"}