Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

runtimepath is not added automatically for all plugins #17

Closed
zachliu opened this issue Feb 20, 2020 · 11 comments
Closed

runtimepath is not added automatically for all plugins #17

zachliu opened this issue Feb 20, 2020 · 11 comments

Comments

@zachliu
Copy link

zachliu commented Feb 20, 2020

through reasons i have yet known, certain plugins like lambdalisue/gina.vim still requires the following to be done manually 🤔

set runtimepath+=~/.config/nvim/pack/packager/start/gina.vim

otherwise it's not recognized

@kristijanhusak
Copy link
Owner

I'll check. Did you try packadd gina.vim?

@zachliu
Copy link
Author

zachliu commented Feb 21, 2020

yeah, no luck

@kristijanhusak
Copy link
Owner

@zachliu I see in the related issue that you are trying to call gina function from your vimrc. Problem is that at that moment when you call the function gina is not loaded, because native vim packages load them asynchronously (vimrc first, and then plugins).

This should work for you:

autocmd VimEnter * call s:setup_gina()

function! s:setup_gina() abort
  for gina_cmd in ['branch', 'changes', 'log', 'commit', 'status']
    call gina#custom#command#option(gina_cmd, '--opener', 'tabedit')
  endfor

  for gina_cmd in ['diff']
    call gina#custom#command#option(gina_cmd, '--opener', 'vsplit')
  endfor

  call gina#custom#command#option('commit', '--verbose')
  call gina#custom#command#option('branch', '--verbose|--all')
endfunction

@zachliu
Copy link
Author

zachliu commented Feb 21, 2020

oooohhh, right, how did i forget the async 🤦‍♂️
thank you so much!

@zachliu
Copy link
Author

zachliu commented Feb 21, 2020

this may or may not be related, but i found that i also had to put

  autocmd FileType python syntax keyword pythonBuiltinObj self

in that function otherwise the autocmd does nothing, which makes little sense here 🤔

@kristijanhusak
Copy link
Owner

where did you find this information?

@zachliu
Copy link
Author

zachliu commented Feb 23, 2020

it's part of my customized syntax highlighting

@kristijanhusak
Copy link
Owner

kristijanhusak commented Feb 24, 2020

I don't know what syntax highligthing has to do with gina plugin. What is self in this? Never saw something like that.
Are you using vim or neovim? Do you have filetype plugin indent on in your vimrc?

All of this is not related to packager because it doesn't do anything besides installing / updating packages to folder that is auto loaded by vim.

@zachliu
Copy link
Author

zachliu commented Feb 24, 2020

i'm using neovim and i have filetype plugin indent on
my guess is a rogue plugin is overwriting my autocmd FileType ....

@zachliu
Copy link
Author

zachliu commented Feb 24, 2020

btw,

autocmd FileType python syntax keyword pythonBuiltinObj self

means when the set ft=python event happens, the python key word self shall be colored (highlighted) as one of the pythonBuiltinObj which is a category of keyword 😁

@kristijanhusak
Copy link
Owner

ah, self is a keyword :D I thought it is a reference to the vim function or something :D
I'm not sure why that happens, but it's not related to vim packager.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants