{"id":13896278,"url":"https://github.com/famiu/nvim-reload","last_synced_at":"2025-07-17T12:31:35.359Z","repository":{"id":52674309,"uuid":"359507999","full_name":"famiu/nvim-reload","owner":"famiu","description":"Plugin to easily reload your Neovim config","archived":true,"fork":false,"pushed_at":"2021-07-08T13:50:23.000Z","size":33,"stargazers_count":92,"open_issues_count":5,"forks_count":13,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-07T18:38:57.764Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/famiu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-19T15:27:09.000Z","updated_at":"2024-07-01T06:09:59.000Z","dependencies_parsed_at":"2022-08-22T03:41:07.773Z","dependency_job_id":null,"html_url":"https://github.com/famiu/nvim-reload","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/famiu%2Fnvim-reload","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/famiu%2Fnvim-reload/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/famiu%2Fnvim-reload/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/famiu%2Fnvim-reload/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/famiu","download_url":"https://codeload.github.com/famiu/nvim-reload/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226260601,"owners_count":17596494,"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":[],"created_at":"2024-08-06T18:02:47.980Z","updated_at":"2024-11-25T01:31:14.110Z","avatar_url":"https://github.com/famiu.png","language":"Lua","funding_links":[],"categories":["Lua"],"sub_categories":[],"readme":"# nvim-reload\n## About\nNvim-reload is a Neovim plugin that allows you to reload your entire Neovim config completely, including your start plugins. It also reloads all lua modules inside your Neovim config directory.\n\n**THIS PROJECT IS NO LONGER BEING MAINTAINED. YOU MIGHT STILL BE ABLE TO USE IT BUT DO NOT EXPECT ANY ISSUES YOU HAVE WITH IT TO BE FIXED. THOSE WILLING TO MAINTAIN IT CAN FEEL FREE TO CREATE A FORK**\n\n### Requires:\n* Neovim \u003e= 0.5\n* [plenary.nvim](https://github.com/nvim-lua/plenary.nvim)\n\n## How to install\n* [packer.nvim](https://github.com/wbthomason/packer.nvim/):\n```\nuse 'famiu/nvim-reload'\n```\n\n* [paq-nvim](https://github.com/savq/paq-nvim/)\n```\npaq 'famiu/nvim-reload'\n```\n\n* [vim-plug](https://github.com/junegunn/vim-plug/):\n```\nPlug 'famiu/nvim-reload'\n```\n\n## How to use\nJust install the plugin and it'll define two commands for you, `:Reload` and `:Restart`, to reload and restart your Vim config, respectively. Note that 'restart' here just means reloading and manually triggering the `VimEnter` autocmd to emulate a new run of Vim, it will not actually restart Vim.\n\nYou can also use the following Lua functions `require('nvim-reload').Reload()` and `require('nvim-reload').Restart()` instead of the `:Reload` and `:Restart` commands.\n\n### Configuration\nBy default, nvim-reload reloads:\n* Your init file.\n* Your config files (VimL files in `stdpath('config')`. \n* Your start plugins (plugins that are automatically loaded when Neovim is started, located in `stdpath('data')/site/pack/*/start/*`).\n\n**NOTE:** The asterisks used above are file globs, not literal asterisks.\n\nIn case you didn't know, Lua caches the modules you load using `require()`. Which can prevent you from reloading your configuration since Lua will use the cached version of your config instead of the modified version. So the plugin also unloads the Lua modules inside your Neovim config located in `stdpath('config')/lua`, which makes Lua actually reload them.\n\nIf you want, you can change the default behavior through the following configuration options.\n\n* `vim_reload_dirs` - Table containing list of directories to reload the Vim files from. The plugin will look into the `'compiler'`, `'doc'`, `'keymap'`, `'syntax'` and `'plugin'` subdirectories of each directory provided here and reload all VimL files in them.\u003cbr\u003eDefault: `{ vim.fn.stdpath('config'), vim.fn.stdpath('data') .. '/site/pack/*/start/*' }`\n\n* `lua_reload_dirs` - Table containing list of directories to load the Lua modules from. The plugin will look into the `lua` subdirectory of each directory provided here for modules to reload.\u003cbr\u003eDefault: `{ vim.fn.stdpath('config') }`\n\n* `files_reload_external` - Table containing paths to external VimL files (files not inside any of the `vim_reload_dirs`) to reload.\u003cbr\u003eDefault: `{}`\n\n* `modules_reload_external` - Table containing Names of external modules (modules not inside any of the `lua_reload_dirs`) to reload.\u003cbr\u003eDefault: `{}`\n\n* `pre_reload_hook` - Function to run before reloading the config.\n\u003cbr\u003eDefault: `nil`\n\n* `post_reload_hook` - Function to run after reloading the config.\n\u003cbr\u003eDefault: `nil`\n\n#### Example config:\n```lua\nlocal reload = require('nvim-reload')\n\n-- If you use Neovim's built-in plugin system\n-- Or a plugin manager that uses it (eg: packer.nvim)\nlocal plugin_dirs = vim.fn.stdpath('data') .. '/site/pack/*/start/*'\n\n-- If you use vim-plug\n-- local plugin_dirs = vim.fn.stdpath('data') .. '/plugged/*'\n\nreload.vim_reload_dirs = {\n    vim.fn.stdpath('config'),\n    plugin_dirs\n}\n\nreload.lua_reload_dirs = {\n    vim.fn.stdpath('config'),\n    -- Note: the line below may cause issues reloading your config\n    plugin_dirs\n}\n\nreload.files_reload_external = {\n    vim.fn.stdpath('config') .. '/myfile.vim'\n}\n\nreload.modules_reload_external = { 'packer' }\n\nreload.post_reload_hook = function()\n    require('feline').reset_highlights()\nend\n```\n\n**NOTE:** The directories provided in `lua_reload_dirs` and `vim_reload_dirs` can be globs, which will automatically be expanded by the plugin.\n\n## Note\nThis plugin is still quite new and might have some bugs. And in case it does, feel free to make an issue here to report them.\n\n## Self-plug\nIf you liked this plugin, also check out:\n- [feline.nvim](https://github.com/famiu/feline.nvim) - A nice customizable statusline for Neovim written in Lua.\n- [bufdelete.nvim](https://github.com/famiu/bufdelete.nvim) - Delete Neovim buffers without losing your window layout.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffamiu%2Fnvim-reload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffamiu%2Fnvim-reload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffamiu%2Fnvim-reload/lists"}