Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Semshi stop working after source vimrc file. #70

Open
lkhphuc opened this issue Mar 6, 2020 · 6 comments · Fixed by wookayin/semshi#4 · May be fixed by #111
Open

Semshi stop working after source vimrc file. #70

lkhphuc opened this issue Mar 6, 2020 · 6 comments · Fixed by wookayin/semshi#4 · May be fixed by #111

Comments

@lkhphuc
Copy link

lkhphuc commented Mar 6, 2020

When I am having vim running with Semshi and source the vimrc file with :so ~/.config/nvim/nvim.init, Semshi stop running.
No other commands, eg :Semshi can reenable Semshi. I have to restart vim for Semshi to work again.

This is a little annoying if I have long working session open, or task running in neovim's terminal.

@wookayin
Copy link
Contributor

This has been bothering me as well. A workaround I'm using is (using vim-plug as plugin manager):

:call plug#load('semshi')

This reloads the semshi plugin and it just works after re-sourcing vimrc.

@wookayin
Copy link
Contributor

wookayin commented Mar 10, 2020

I did a bit more of study and found that any syntax or appearance-related commands would make Semshi broken. Specifically, the list is:

  • syntax on
  • set background=XXX
  • set termguicolors
  • colorscheme XXX

After having all of them not re-executed upon re-sourcing vimrc, the problem is gone. However I think we need more principled way of fixing this issue from semshi's end.

If you're interested in how I patched my vimrc, please see the following commit: 82e17b4

wookayin added a commit to wookayin/dotfiles that referenced this issue Mar 10, 2020
When re-sourcing ~/.vimrc, Semshi stops working. To work around this
bug, we avoid executing all syntax- or colorscheme-related vim configs
for the second time (i.e., when re-sourced).

See: numirias/semshi#70
@lkhphuc
Copy link
Author

lkhphuc commented Mar 10, 2020

Thanks a lot.

@aasutossh
Copy link

aasutossh commented May 13, 2020

Semshi stops too if I change colorscheme when already inside vim. Any way to solve this?

Edit: I did try the given workaround, but since I am trying to change colorscheme, it didn't work.

blueyed added a commit to blueyed/semshi that referenced this issue Sep 28, 2021
When using `:colorscheme` highlights are deleted, and need to be
re-defined.

This wraps/moves this into `semshi#init()`, and triggers it on the
`ColorScheme` autocommand.

It also wraps this and the conditional definition of the other
autocommands in a new `SemshiInit` augroup, to not define the
autocommands multiple times.

Fixes numirias#70.
@blueyed blueyed linked a pull request Sep 28, 2021 that will close this issue
@blueyed
Copy link
Contributor

blueyed commented Sep 28, 2021

This is triggered by using :colorscheme.
#111 fixes it for me.

Stealthii pushed a commit to Stealthii/semshi that referenced this issue Nov 22, 2022
When using `:colorscheme` highlights are deleted, and need to be
re-defined.

This wraps/moves this into `semshi#init()`, and triggers it on the
`ColorScheme` autocommand.

It also wraps this and the conditional definition of the other
autocommands in a new `SemshiInit` augroup, to not define the
autocommands multiple times.

Fixes numirias#70.
wookayin pushed a commit to wookayin/semshi that referenced this issue Dec 3, 2022
When using :colorscheme highlights are deleted, and need to be re-defined.

This wraps/moves this into semshi#init(), and triggers it on the ColorScheme autocommand.

It also wraps this and the conditional definition of the other autocommands in a new SemshiInit augroup, to not define the autocommands multiple times.

Fixes numirias#70

Co-authored-by: Daniel Hahler <git@thequod.de>
@wookayin
Copy link
Contributor

Fixed in my fork: wookayin#4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants