Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] fix(fzf): make neovim plugin optional
@ 2022-07-01 20:13 mitinarseny
  2022-07-02  0:51 ` sgn
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: mitinarseny @ 2022-07-01 20:13 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 704 bytes --]

There is a new pull request by mitinarseny against master on the void-packages repository

https://github.com/mitinarseny/void-packages patch-2
https://github.com/void-linux/void-packages/pull/37795

fix(fzf): make neovim plugin optional
#### Testing the changes
- I tested the changes in this PR: **NO**

Motivation: `fzf` package installs `fzf.vim` in `/usr/share/nvim/runtime/plugin/`, but not all people who use fzf, want to use it inside nvim, so it should be placed in `/usr/share/nvim/runtime/pack/fzf/opt/` to make it optional. Users can load this plugin in their `init.vim`:
```vim
packadd fzf
```

A patch file from https://github.com/void-linux/void-packages/pull/37795.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-patch-2-37795.patch --]
[-- Type: text/x-diff, Size: 837 bytes --]

From d183a8c42da2a975292ee5754675bf60d19c2b1e Mon Sep 17 00:00:00 2001
From: Arseny Mitin <mitinarseny@gmail.com>
Date: Fri, 1 Jul 2022 23:08:54 +0300
Subject: [PATCH] fix(fzf): make neovim plugin optional

---
 srcpkgs/fzf/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/fzf/template b/srcpkgs/fzf/template
index 86789e858d66..e4a9ea96189e 100644
--- a/srcpkgs/fzf/template
+++ b/srcpkgs/fzf/template
@@ -21,7 +21,7 @@ post_install() {
 
 	sed -i -e 's#source ~/\.fzf\.bash; ##' shell/key-bindings.bash
 	vinstall plugin/fzf.vim 644 usr/share/vim/vimfiles/plugin
-	vinstall plugin/fzf.vim 644 usr/share/nvim/runtime/plugin
+	vinstall plugin/fzf.vim 644 usr/share/nvim/runtime/pack/fzf/opt/plugin
 
 	vinstall shell/completion.bash 644 usr/share/fzf
 	vinstall shell/completion.zsh 644 usr/share/fzf

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: fix(fzf): make neovim plugin optional
  2022-07-01 20:13 [PR PATCH] fix(fzf): make neovim plugin optional mitinarseny
@ 2022-07-02  0:51 ` sgn
  2022-07-02  0:53 ` sgn
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: sgn @ 2022-07-02  0:51 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 324 bytes --]

New comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/37795#issuecomment-1172801125

Comment:
1. Please change commit message to (follow existing convention, don't bring your):
```
fzf: make neovim plugin optional
```
2. I don't know about neovim, so maybe @ericonr  can help.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: fix(fzf): make neovim plugin optional
  2022-07-01 20:13 [PR PATCH] fix(fzf): make neovim plugin optional mitinarseny
  2022-07-02  0:51 ` sgn
@ 2022-07-02  0:53 ` sgn
  2022-07-05 14:15 ` ericonr
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: sgn @ 2022-07-02  0:53 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 505 bytes --]

New comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/37795#issuecomment-1172801125

Comment:
1. Please change commit message to (follow existing convention, don't bring your) (anyway, this is not a bug, so this is not a fix anyway ;) ):
```
fzf: make neovim plugin optional
```
2. I don't know about neovim, so maybe @ericonr  can help.
3. You said you did NOT test this package? Why do you think it's better this way? And how can you sure if this works?

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: fix(fzf): make neovim plugin optional
  2022-07-01 20:13 [PR PATCH] fix(fzf): make neovim plugin optional mitinarseny
  2022-07-02  0:51 ` sgn
  2022-07-02  0:53 ` sgn
@ 2022-07-05 14:15 ` ericonr
  2022-07-06  0:00 ` sgn
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: ericonr @ 2022-07-05 14:15 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 409 bytes --]

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/37795#issuecomment-1175113462

Comment:
I have never looked into optional plugins, unfortunately. But it'd be a breaking change for some users and probably confusing if no other distro does this.

Does anything bad happen when the plugin is loaded by default? Iirc it doesn't set any keyboard shortcuts...

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: fix(fzf): make neovim plugin optional
  2022-07-01 20:13 [PR PATCH] fix(fzf): make neovim plugin optional mitinarseny
                   ` (2 preceding siblings ...)
  2022-07-05 14:15 ` ericonr
@ 2022-07-06  0:00 ` sgn
  2022-07-06 22:39 ` atweiden
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: sgn @ 2022-07-06  0:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 473 bytes --]

New comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/37795#issuecomment-1175614334

Comment:

> Does anything bad happen when the plugin is loaded by default? Iirc it doesn't set any keyboard shortcuts...

One more question for OP, does anything bad happen if plugin is loaded by default and we have `packadd fzf` in `init.nvim`? Because no other distros does that, and some users share configuration across multiple machines.



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: fix(fzf): make neovim plugin optional
  2022-07-01 20:13 [PR PATCH] fix(fzf): make neovim plugin optional mitinarseny
                   ` (3 preceding siblings ...)
  2022-07-06  0:00 ` sgn
@ 2022-07-06 22:39 ` atweiden
  2022-07-07  9:36 ` mitinarseny
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: atweiden @ 2022-07-06 22:39 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 200 bytes --]

New comment by atweiden on void-packages repository

https://github.com/void-linux/void-packages/pull/37795#issuecomment-1176823999

Comment:
Might it be better to create a subpackage e.g. `fzf-vim`?

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: fix(fzf): make neovim plugin optional
  2022-07-01 20:13 [PR PATCH] fix(fzf): make neovim plugin optional mitinarseny
                   ` (4 preceding siblings ...)
  2022-07-06 22:39 ` atweiden
@ 2022-07-07  9:36 ` mitinarseny
  2022-07-09 22:55 ` atweiden
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: mitinarseny @ 2022-07-07  9:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1207 bytes --]

New comment by mitinarseny on void-packages repository

https://github.com/void-linux/void-packages/pull/37795#issuecomment-1177317189

Comment:
> Does anything bad happen when the plugin is loaded by default? 

It just should not be loaded unless the user explicitly say that... Imagine installing a bunch of other command-line utilities which has [neo]vim plugin support. But I just want to use them as command-line utilities and not inside neovim. Even if this plugin does not create any mappings, I don't want it to be sourced by default becasue:
* it increases startup time of neovim
* it can contain deprecated or even removed functionality which would cause an error while loading neovim

You can think of it as the same as if packages with `sv` services would be shipped with already symlinked service directories to `/var/service` with `down` file present. I don't want this functionality to be enabled by default

> But it'd be a breaking change for some users and probably confusing if no other distro does this

With this approach we can end up using systemd and other ugly things from distos where end users do not have an opportunity to decide what they want and what they do not.  

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: fix(fzf): make neovim plugin optional
  2022-07-01 20:13 [PR PATCH] fix(fzf): make neovim plugin optional mitinarseny
                   ` (5 preceding siblings ...)
  2022-07-07  9:36 ` mitinarseny
@ 2022-07-09 22:55 ` atweiden
  2022-07-17 20:20 ` ericonr
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: atweiden @ 2022-07-09 22:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 906 bytes --]

New comment by atweiden on void-packages repository

https://github.com/void-linux/void-packages/pull/37795#issuecomment-1179618009

Comment:
Many people prefer using a plugin manager to load plugins like FZF’s.

For these users, it may feel a bit heavy-handed for the distro to install a {,n}vim plugin alongside any main binary (`fzf` in this case), when in most cases they just want the binary, and would prefer using their plugin manager to install the plugin.

A subpackage would be a cleaner way to handle this, e.g.:

```bash
vim-fzf_package() {
	short_desc+=" - Vim plugin"
	depends="fzf-${version}_${revision}"
	pkg_install() {
		vinstall plugin/fzf.vim 644 usr/share/vim/vimfiles/plugin
	}
}

neovim-fzf_package() {
	short_desc+=" - Neovim plugin"
	depends="fzf-${version}_${revision}"
	pkg_install() {
		vinstall plugin/fzf.vim 644 usr/share/nvim/runtime/plugin
	}
}
```

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: fix(fzf): make neovim plugin optional
  2022-07-01 20:13 [PR PATCH] fix(fzf): make neovim plugin optional mitinarseny
                   ` (6 preceding siblings ...)
  2022-07-09 22:55 ` atweiden
@ 2022-07-17 20:20 ` ericonr
  2022-08-02 21:47 ` atweiden
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: ericonr @ 2022-07-17 20:20 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 793 bytes --]

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/37795#issuecomment-1186600973

Comment:
> it can contain deprecated or even removed functionality which would cause an error while loading neovim

That one is our job as a distro to catch; and since it's using vim functionality, I find it unlikely to break either.

> For these users, it may feel a bit heavy-handed for the distro to install a {,n}vim plugin alongside any main binary (fzf in this case), when in most cases they just want the binary, and would prefer using their plugin manager to install the plugin.

Isn't there a chance of incompatibilities between the fzf executable and the vim plugin if one uses newer command line options than are available from the executable?

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: fix(fzf): make neovim plugin optional
  2022-07-01 20:13 [PR PATCH] fix(fzf): make neovim plugin optional mitinarseny
                   ` (7 preceding siblings ...)
  2022-07-17 20:20 ` ericonr
@ 2022-08-02 21:47 ` atweiden
  2022-11-01  2:14 ` github-actions
  2022-11-16  2:11 ` [PR PATCH] [Closed]: " github-actions
  10 siblings, 0 replies; 12+ messages in thread
From: atweiden @ 2022-08-02 21:47 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1026 bytes --]

New comment by atweiden on void-packages repository

https://github.com/void-linux/void-packages/pull/37795#issuecomment-1203246207

Comment:
> Isn't there a chance of incompatibilities between the fzf executable and the vim plugin if one uses newer command line options than are available from the executable?

Technically speaking, “yes”. But I doubt fzf’s author would release breaking changes to the fzf CLI outside of major version updates. Any devenv issues arising from this could be addressed by updating the fzf template in this repo to the newer version (or updating the devenv in question as appropriate).

As for whether a hypothetical silent majority of Vim users exist who rely on installing the fzf binary and plugin via a distro package manager for practical usage within Vim? They could continue to do so with `xbps-install vim-fzf`. I doubt if most people who barely customize Vim even use fzf within Vim, though. fzf is quite useful outside of Vim, and for that you don’t ever need the plugins.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: fix(fzf): make neovim plugin optional
  2022-07-01 20:13 [PR PATCH] fix(fzf): make neovim plugin optional mitinarseny
                   ` (8 preceding siblings ...)
  2022-08-02 21:47 ` atweiden
@ 2022-11-01  2:14 ` github-actions
  2022-11-16  2:11 ` [PR PATCH] [Closed]: " github-actions
  10 siblings, 0 replies; 12+ messages in thread
From: github-actions @ 2022-11-01  2:14 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

New comment by github-actions[bot] on void-packages repository

https://github.com/void-linux/void-packages/pull/37795#issuecomment-1297926708

Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that.  If this pull request is still relevant bump it or assign it.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PR PATCH] [Closed]: fix(fzf): make neovim plugin optional
  2022-07-01 20:13 [PR PATCH] fix(fzf): make neovim plugin optional mitinarseny
                   ` (9 preceding siblings ...)
  2022-11-01  2:14 ` github-actions
@ 2022-11-16  2:11 ` github-actions
  10 siblings, 0 replies; 12+ messages in thread
From: github-actions @ 2022-11-16  2:11 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 545 bytes --]

There's a closed pull request on the void-packages repository

fix(fzf): make neovim plugin optional
https://github.com/void-linux/void-packages/pull/37795

Description:
#### Testing the changes
- I tested the changes in this PR: **NO**

Motivation: `fzf` package installs `fzf.vim` in `/usr/share/nvim/runtime/plugin/`, but not all people who use fzf, want to use it inside nvim, so it should be placed in `/usr/share/nvim/runtime/pack/fzf/opt/` to make it optional. Users can load this plugin in their `init.vim`:
```vim
packadd fzf
```

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-11-16  2:11 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-01 20:13 [PR PATCH] fix(fzf): make neovim plugin optional mitinarseny
2022-07-02  0:51 ` sgn
2022-07-02  0:53 ` sgn
2022-07-05 14:15 ` ericonr
2022-07-06  0:00 ` sgn
2022-07-06 22:39 ` atweiden
2022-07-07  9:36 ` mitinarseny
2022-07-09 22:55 ` atweiden
2022-07-17 20:20 ` ericonr
2022-08-02 21:47 ` atweiden
2022-11-01  2:14 ` github-actions
2022-11-16  2:11 ` [PR PATCH] [Closed]: " github-actions

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).