GithubHelp home page GithubHelp logo

nvim-reload's Introduction

About Me

I'm Famiu (IPA pronunciation: fαmjʊ), I'm currently a student and like to contribute to Open Source projects in my free time.

Activity

Contact Information

nvim-reload's People

Contributors

famiu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

nvim-reload's Issues

Errors on :Reload and :Restart

Hi,

I'm getting the following when running ':Reload' or ':Restart':
E5108: Error executing lua ...e\pack\packer\start\nvim-reload\lua\nvim-reload\init.lua:107: bad argument #1 to 'gsub' (string expected, got nil)

I haven't added anything specific for nvim-reload to my init.lua or plugins.lua, which is called with require('plugins.lua') from init.lua (which lives under stdpath('config')). I'm just installing it and running it via packer, This is with nvim 0.5.0 on windows. nvim-reload and plenary are pulled as start plugins by packer:

  -- Lua Reloading Related
  use {
	  'famiu/nvim-reload',
	  opt = false,
	  requires = {
	  	{'nvim-lua/plenary.nvim', opt = false}
	  }
}

Any idea what the issue might be?

pre/post reload hooks

I'm currently trying to build some auto reload functionality for the main packer file, however I noticed that feline drops highlights after the reload. Being able to add hooks in config to do this would be super neat.

I could see sth like the following (however I really have no experience with lua whatsoever, I'm just replicating what I've seen over the past days)

use {
  'famiu/nvim-reload',
  config = function()
    local post_reload = function()
      require('feline').reset_highlights()
      vim.api.nvim_command('syntax on') -- no clue why but syntax seems slightly broken when reloading, probably another plugin
    end

    require('nvim-reload').setup {
      post = post_reload
    }
  end
}

Lsp isnt restarted properly (using dein.vim)

Hey there,
nice plugin, exactly what i need, though im having a little trouble.
Im using dein and it has a little bit of a weird policy for folders. As far as i understood it it has all the repos in ~/.cache/dein/repos/github.com/ and it caches them all together in a cache dir (~/.cache/dein/.cache/init.vim/.dein/), so the rtp of vim isnt as cluttered. Anyway, i did this to setup your plugin:
`" nvim-reload
lua <<EOF
local reload = require('nvim-reload')

local plugin_dirs = os.getenv("HOME") .. '/.cache/dein/.cache/init.vim/.dein/*'

reload.vim_reload_dirs = {
vim.fn.stdpath('config'),
plugin_dirs
}

reload.lua_reload_dirs = {
vim.fn.stdpath('config'),
-- Note: the line below may cause issues reloading your config
plugin_dirs
}
EOF`

i dont know lua but it seems to work? but not quite.
when i do either :Reload or :Restart i get
Client 1 quit with exit code 1 and signal 0 Client 3 quit with exit code 1 and signal 0 Client 5 quit with exit code 1 and signal 0
(called it three times and the client count is increasing by 2 each time)
and also before the restart :LspInfo gives this
`Configured servers: clangd
Neovim logs at: /home/momo/.cache/nvim/lsp.log

1 client(s) attached to this buffer: clangd

Client: clangd (id 1)
root: ..
filetypes: c, cpp, objc, objcpp
cmd: clangd --background-index

1 active client(s):

Client: clangd (id 1)
root: ..
filetypes: c, cpp, objc, objcpp
cmd: clangd --background-index

Clients that match the filetype cpp:

Config: clangd
cmd: clangd --background-index
cmd is executable: True
identified root: ..
custom handlers:
`

and afterwards it gives this
`Configured servers: clangd
Neovim logs at: /home/momo/.cache/nvim/lsp.log

0 client(s) attached to this buffer:

1 active client(s):

Client: clangd (id 3)
root: ..
filetypes: c, cpp, objc, objcpp
cmd: clangd --background-index

Clients that match the filetype cpp:

Config: clangd
cmd: clangd --background-index
cmd is executable: True
identified root: ..
custom handlers:
`

there is some code to restart the lsp in your plugin but it isnt doing it properly for me at least. Any thoughts?

Add a vim help file

to make it easy to read up on it with the need to go to your github repo.

Lualine disappears on `:Reload`

Hi. Good plugin, but i don't understand why when i run :Reload lualine deletes all of its content until restart. Using packer.nvim

nvim-reload's config:

local reload = require('nvim-reload')

reload.lua_reload_dirs = {
	vim.fn.stdpath('config')
}

Experimental branch - E5108: error executing lua

Setup with Packer:
use { '~/git/nvim-reload', branch = 'experimental' }

Steps to reproduce error:

  • run either :Reload or :Restart

Full error message:

CSV Syntax:Invalid column pattern, using default pattern %([^,]*,|$)
E5108: Error executing lua ...e/pack/packer/start/nvim-reload/lua/nvim-reload/in
it.lua:154: Vim(lua):E5108: Error executing lua /usr/share/nvim/runtime/lua/vim/
treesitter/query.lua:291: Overriding nth?

Probably the same error you getting with the branch... I haven't found the reason why this error is showing up, yet, gotta dive deeper in the code next week. With this error I am only able to use the experimental branch while working on the error, and that's why I will roll back to master for everyday use.

Error calling Reload/Reset with vim-polyglot

When I have vim-polyglot installed via packer:

use 'sheerun/vim-polyglot'

And I attempt to run either Restart or Reload, I get the following error:

Error detected while processing BufWritePost Autocommands for "init.lua":
E5108: Error executing lua ...e/pack/packer/start/nvim-reload/lua/nvim-reload/init.lua:130: Vim:E492: Not an editor command: HaxeHiLink haxeError2 haxeError

When I remove vim-polyglot from my configuration everything works fine. Is there a way to work around this? Maybe excluding vim-polyglot from reloading?

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.