Coder Social home page Coder Social logo

reloader.nvim's Introduction

Reloader.nvim

A simple plugin that reloads your neovim configuration painlessly. No more closing neovim and starting it again when you make a change in your configuration or when a new plugin update comes, a simple :Reload and you are off!

This is an nvim-reload fork.

Installation

Requirements

How to install?

Use your favorite package manager and install this plugin as you would any other.

Using packer:

use({ "milkias17/reloader.nvim", requires = { { "nvim-lua/plenary.nvim" } } })

Using plug:

Plug 'nvim-lua/plenary.nvim'
Plug 'milkias17/reloader.nvim'

Usage/Examples

After installation, a :Reload command will be available, just call that command whenever you want to reload your configuration.

Want to reload your configuration automatically

Just set a global variable named auto_reload_config to true and reloader.nvim will create an autocommand to do this for you!

vim.g.auto_reload_config = true

Wanted to run something before/after reloading

Reloader.nvim exposes two hooks: pre_reload_hook and post_reload_hook which are functions to run before and after reloading.

local reloader = require("reload-nvim")
reloader.post_reload_hook = function()
    require("feline").reset_highlights()
end

reloader.nvim's People

Contributors

milkias17 avatar

Stargazers

 avatar Saint avatar ryujinscales avatar Annenpolka avatar Amar Al-Zubaidi avatar muriel avatar Patrick Haller avatar Patryk Kielar avatar Khalid H. Ahmed avatar  avatar Yuta Katayama avatar  avatar Myroslav Rys avatar

Watchers

 avatar

reloader.nvim's Issues

:Reload does not work

When I try to use the Reload command, I get this error message:

Error executing Lua callback: ...ack/packer/start/reloader.nvim/lua/reload-nvim/utils.lua:141: E31: No such mapping
stack traceback:
        [C]: in function 'nvim_del_keymap'
        ...ack/packer/start/reloader.nvim/lua/reload-nvim/utils.lua:141: in function 'unload_keybindings'
        ...pack/packer/start/reloader.nvim/lua/reload-nvim/init.lua:24: in function <...pack/packer/start/reloader.nvim/lua/reload-nvim/init.lua:7>

Error related to lsp configs

Hi, great work so far!

I am seeing the error below on :Reload.
I have not looked into the details yet, but it seems there might be some lsp config that does not look as expected.
My config can be seen here: https://github.com/mikaelelkiaer/nvim-config

Error executing vim.schedule lua callback: .../pack/packer/opt/reloader.nvim/lua/reload-nvim/utils.lua:78: bad argument #1 to 'ipairs' (table expected, got nil)
stack traceback:
        [C]: in function 'ipairs'
        .../pack/packer/opt/reloader.nvim/lua/reload-nvim/utils.lua:78: in function 'table_contains'
        .../pack/packer/opt/reloader.nvim/lua/reload-nvim/utils.lua:154: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.