gpakosz / .tmux

šŸ‡«šŸ‡· Oh my tmux! My self-contained, pretty & versatile tmux configuration made with ā¤ļø
MIT License
21.54k stars 3.33k forks source link

TPM does not recognize plugins defined using @tpm_plugins #706

Closed awerebea closed 6 months ago

awerebea commented 6 months ago

TPM doesn't recognize plugins when they are defined in tmux.conf.local as set -g @tpm_plugins variable.

Commands to run

$ cd
$ rm -rf .tmux
$ git clone https://github.com/gpakosz/.tmux.git
$ ln -s -f .tmux/.tmux.conf
$ cp .tmux/.tmux.conf.local .

~/.tmux.conf.local contents:

...
# # /!\ do not remove the previous line

set -g @tpm_plugins '         \
  tmux-plugins/tmux-sensible  \
  tmux-plugins/tmux-resurrect \
  tmux-plugins/tmux-continuum \
'
...

Commands to run

$ tmux
$ tmux show -gvq '@tpm_plugins'

$ tmux kill-server

~/.tmux.conf.local contents:

...
# # /!\ do not remove the previous line

set -g @plugin "tmux-plugins/tmux-sensible"
set -g @plugin "tmux-plugins/tmux-resurrect"
set -g @plugin "tmux-plugins/tmux-continuum"
'
...

Commands to run

$ tmux
$ tmux show -gvq '@tpm_plugins'
tmux-plugins/tmux-sensible
tmux-plugins/tmux-resurrect
tmux-plugins/tmux-continuum
$ tmux kill-server

Thus, it is possible to specify each plugin separately using the set -g @plugin syntax, but it is not possible to specify them all at once using set -g @tpm_plugins.

gpakosz commented 6 months ago

Hello @awerebea šŸ‘‹

I initially didn't want to support configuring plugins with @tpm_plugins as it's rather documented by TPM as "plan B" and Oh my tmux! doesn't rely on TPM to discover the lists of plugins.

That being said, I just added support for it in branch gh-706. Can you please give it a try?

awerebea commented 6 months ago

Hi @gpakosz!

Well, if this is no longer intended to work in the main (master) branch, no problem, I can switch to specifying plugins using @plugin instead of @tpm_plugins (as I already did in my current configuration as a workaround).

I just didn't find such a problem either in open or closed issues (I probably just missed it) and decided to highlight it in case it was an unknown bug.

BTW, thank you for your excellent work on this project!

gpakosz commented 6 months ago

Well I'll support both from now on. But I won't mention that one can set @tpm_plugins in the .local file template

awerebea commented 6 months ago

https://github.com/gpakosz/.tmux/issues/706#issuecomment-1889134711

I just added support for it in branch gh-706. Can you please give it a try?

Just tried the gh-706 branch and it works flawlessly. Thank you!