unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#68060] [PATCH 0/5] gnu: Add neovim-coqtail.
@ 2023-12-27 15:28 Jean-Pierre De Jesus DIAZ via Guix-patches via
  2023-12-27 15:31 ` [bug#68060] [PATCH 1/5] gnu: vim-vader: Allow using neovim for tests Jean-Pierre De Jesus DIAZ via Guix-patches via
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Jean-Pierre De Jesus DIAZ via Guix-patches via @ 2023-12-27 15:28 UTC (permalink / raw)
  To: 68060; +Cc: Jean-Pierre De Jesus DIAZ

This adds the Neovim version of the vim-coqtail and vim-vader packages.

Both neovim-vader and neovim-coqtail are tested using neovim instead of
vim.

Also refactored a bit the vim-vader and vim-coqtail package definitions
to use the vim/neovim packages provided by the build system (or replace
vim with vim-full in vim-vader's case).

Jean-Pierre De Jesus DIAZ (5):
  gnu: vim-vader: Allow using neovim for tests.
  gnu: Add neovim-vader.
  gnu: vim-coqtail: Move vim-full to arguments.
  gnu: vim-coqtail: Allow using neovim for tests.
  gnu: Add neovim-coqtail.

 gnu/packages/vim.scm | 55 ++++++++++++++++++++++++++++++++------------
 1 file changed, 40 insertions(+), 15 deletions(-)


base-commit: 756ba0429e84ee0f8ce30484439b78c00c61d286
-- 
2.41.0





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

* [bug#68060] [PATCH 1/5] gnu: vim-vader: Allow using neovim for tests.
  2023-12-27 15:28 [bug#68060] [PATCH 0/5] gnu: Add neovim-coqtail Jean-Pierre De Jesus DIAZ via Guix-patches via
@ 2023-12-27 15:31 ` Jean-Pierre De Jesus DIAZ via Guix-patches via
  2023-12-27 15:31 ` [bug#68060] [PATCH 2/5] gnu: Add neovim-vader Jean-Pierre De Jesus DIAZ via Guix-patches via
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Jean-Pierre De Jesus DIAZ via Guix-patches via @ 2023-12-27 15:31 UTC (permalink / raw)
  To: 68060; +Cc: Jean-Pierre De Jesus DIAZ

* gnu/packages/vim.scm (vim-vader): Allow using neovim for tests

Change-Id: Id5b4423f24fdd42814b0a0e3fab801ec871611f7
---
 gnu/packages/vim.scm | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index 9debed0b86..03d1e5bed5 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -1509,7 +1509,7 @@ (define-public vim-vader
          #:phases
          (modify-phases %standard-phases
            (add-before 'install 'check
-             (lambda* (#:key tests? #:allow-other-keys)
+             (lambda* (#:key tests? vim? neovim? #:allow-other-keys)
                (when tests?
                  ;; FIXME: suite1.vader fails with an unknown reason,
                  ;; lang-if.vader requires Python and Ruby.
@@ -1519,9 +1519,11 @@ (define-public vim-vader
 
                  (display "Running Vim tests\n")
                  (with-directory-excursion "test"
-                   (setenv "VADER_TEST_VIM" "vim -E")
+                   (when vim?
+                     (setenv "VADER_TEST_VIM" "vim -E"))
+                   (when neovim?
+                     (setenv "VADER_TEST_VIM" "nvim --headless"))
                    (invoke "bash" "./run-tests.sh"))))))))
-      (native-inputs (list vim))
       (home-page "https://github.com/junegunn/vader.vim")
       (synopsis "Test framework for Vimscript")
       (description "Vader is a test framework for Vimscript designed to
-- 
2.41.0





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

* [bug#68060] [PATCH 2/5] gnu: Add neovim-vader.
  2023-12-27 15:28 [bug#68060] [PATCH 0/5] gnu: Add neovim-coqtail Jean-Pierre De Jesus DIAZ via Guix-patches via
  2023-12-27 15:31 ` [bug#68060] [PATCH 1/5] gnu: vim-vader: Allow using neovim for tests Jean-Pierre De Jesus DIAZ via Guix-patches via
@ 2023-12-27 15:31 ` Jean-Pierre De Jesus DIAZ via Guix-patches via
  2023-12-27 15:31 ` [bug#68060] [PATCH 3/5] gnu: vim-coqtail: Move vim-full to arguments Jean-Pierre De Jesus DIAZ via Guix-patches via
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Jean-Pierre De Jesus DIAZ via Guix-patches via @ 2023-12-27 15:31 UTC (permalink / raw)
  To: 68060; +Cc: Jean-Pierre De Jesus DIAZ

* gnu/packages/vim.scm (neovim-vader): New variable.

Change-Id: Ib507c2086c31a42088f3f433b57ac1e345e27113
---
 gnu/packages/vim.scm | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index 03d1e5bed5..7fc6cae6e9 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -1533,6 +1533,11 @@ (define-public vim-vader
 automate testing and is compatible with Vim and Neovim.")
       (license license:expat)))) ;; Specified in README.md.
 
+(define-public neovim-vader
+  (package
+    (inherit vim-vader)
+    (name "neovim-vader")))
+
 (define-public vim-jedi-vim
   (package
     (name "vim-jedi-vim")
-- 
2.41.0





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

* [bug#68060] [PATCH 3/5] gnu: vim-coqtail: Move vim-full to arguments.
  2023-12-27 15:28 [bug#68060] [PATCH 0/5] gnu: Add neovim-coqtail Jean-Pierre De Jesus DIAZ via Guix-patches via
  2023-12-27 15:31 ` [bug#68060] [PATCH 1/5] gnu: vim-vader: Allow using neovim for tests Jean-Pierre De Jesus DIAZ via Guix-patches via
  2023-12-27 15:31 ` [bug#68060] [PATCH 2/5] gnu: Add neovim-vader Jean-Pierre De Jesus DIAZ via Guix-patches via
@ 2023-12-27 15:31 ` Jean-Pierre De Jesus DIAZ via Guix-patches via
  2023-12-27 15:31 ` [bug#68060] [PATCH 4/5] gnu: vim-coqtail: Allow using neovim for tests Jean-Pierre De Jesus DIAZ via Guix-patches via
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Jean-Pierre De Jesus DIAZ via Guix-patches via @ 2023-12-27 15:31 UTC (permalink / raw)
  To: 68060; +Cc: Jean-Pierre De Jesus DIAZ

* gnu/packages/vim.scm (vim-coqtail): Move vim-full from native-inputs
  to arguments.

Change-Id: I20cc1e0772727f8fc7db70b42151432fb6349fc7
---
 gnu/packages/vim.scm | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index 7fc6cae6e9..e27feb13f7 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -470,7 +470,8 @@ (define-public vim-coqtail
                   "0av2m075n6z05ah9ndrgnp9s16yrz6n2lj0igd9fh3c5k41x5xks"))))
       (build-system vim-build-system)
       (arguments
-       '(#:plugin-name "coqtail"
+       `(#:plugin-name "coqtail"
+         #:vim ,vim-full ; Plugin needs Python 3.
          #:phases
          (modify-phases %standard-phases
            (add-before 'install 'check
@@ -491,9 +492,7 @@ (define-public vim-coqtail
                                       "/share/vim/vimfiles/pack/guix/start/vader")))
                    (with-directory-excursion "tests/vim"
                      (setenv "VADER_PATH" vader-path)
-                     (invoke (string-append
-                               (assoc-ref (or native-inputs inputs) "vim-full")
-                               "/bin/vim")
+                     (invoke "vim"
                              "-E" "-Nu" "vimrc"
                              "-c" "Vader! *.vader")))
 
@@ -501,10 +500,9 @@ (define-public vim-coqtail
                  ;; they don't get installed.
                  (delete-file-recursively "python/__pycache__")))))))
       (native-inputs
-       `(("coq-for-coqtail" ,coq-for-coqtail)
-         ("python-pytest" ,python-pytest)
-         ("vim-full" ,vim-full)         ; Plugin needs Python 3.
-         ("vim-vader" ,vim-vader)))
+       (list coq-for-coqtail
+             python-pytest
+             vim-vader))
       (propagated-inputs (list coq coq-ide-server))
       (synopsis "Interactive Coq proofs in Vim")
       (description "Coqtail enables interactive Coq proof development in Vim
-- 
2.41.0





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

* [bug#68060] [PATCH 4/5] gnu: vim-coqtail: Allow using neovim for tests.
  2023-12-27 15:28 [bug#68060] [PATCH 0/5] gnu: Add neovim-coqtail Jean-Pierre De Jesus DIAZ via Guix-patches via
                   ` (2 preceding siblings ...)
  2023-12-27 15:31 ` [bug#68060] [PATCH 3/5] gnu: vim-coqtail: Move vim-full to arguments Jean-Pierre De Jesus DIAZ via Guix-patches via
@ 2023-12-27 15:31 ` Jean-Pierre De Jesus DIAZ via Guix-patches via
  2023-12-27 15:31 ` [bug#68060] [PATCH 5/5] gnu: Add neovim-coqtail Jean-Pierre De Jesus DIAZ via Guix-patches via
  2024-01-01  9:00 ` bug#68060: [PATCH 0/5] " Efraim Flashner
  5 siblings, 0 replies; 7+ messages in thread
From: Jean-Pierre De Jesus DIAZ via Guix-patches via @ 2023-12-27 15:31 UTC (permalink / raw)
  To: 68060; +Cc: Jean-Pierre De Jesus DIAZ

* gnu/packages/vim.scm (vim-coqtail): Allow using neovim for tests.

Change-Id: I114b07dd9cf525a5571a37f51b2e6b2a57d5be46
---
 gnu/packages/vim.scm | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index e27feb13f7..5f211b120d 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -475,7 +475,8 @@ (define-public vim-coqtail
          #:phases
          (modify-phases %standard-phases
            (add-before 'install 'check
-             (lambda* (#:key inputs native-inputs tests? #:allow-other-keys)
+             (lambda* (#:key inputs native-inputs tests? vim? neovim?
+                       #:allow-other-keys)
                (when tests?
                  (display "Running Python unit tests.\n")
                  (setenv "PYTHONPATH" (string-append (getcwd) "/python"))
@@ -489,12 +490,19 @@ (define-public vim-coqtail
                                               "vim-vader"))
                         (vader-path (string-append
                                       vim-vader
-                                      "/share/vim/vimfiles/pack/guix/start/vader")))
+                                      (if vim?
+                                        "/share/vim/vimfiles"
+                                        "/share/nvim/site")
+                                      "/pack/guix/start/vader"))
+                        (command `(,@(if vim? '("vim" "-E") '())
+                                   ,@(if neovim? '("nvim" "--headless") '())
+                                   "-Nu" "vimrc"
+                                   "-c" "Vader! *.vader")))
                    (with-directory-excursion "tests/vim"
+                     (when neovim?
+                       (setenv "HOME" (getcwd)))
                      (setenv "VADER_PATH" vader-path)
-                     (invoke "vim"
-                             "-E" "-Nu" "vimrc"
-                             "-c" "Vader! *.vader")))
+                     (apply invoke command)))
 
                  ;; Remove __pycache__ files generated during testing so that
                  ;; they don't get installed.
-- 
2.41.0





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

* [bug#68060] [PATCH 5/5] gnu: Add neovim-coqtail.
  2023-12-27 15:28 [bug#68060] [PATCH 0/5] gnu: Add neovim-coqtail Jean-Pierre De Jesus DIAZ via Guix-patches via
                   ` (3 preceding siblings ...)
  2023-12-27 15:31 ` [bug#68060] [PATCH 4/5] gnu: vim-coqtail: Allow using neovim for tests Jean-Pierre De Jesus DIAZ via Guix-patches via
@ 2023-12-27 15:31 ` Jean-Pierre De Jesus DIAZ via Guix-patches via
  2024-01-01  9:00 ` bug#68060: [PATCH 0/5] " Efraim Flashner
  5 siblings, 0 replies; 7+ messages in thread
From: Jean-Pierre De Jesus DIAZ via Guix-patches via @ 2023-12-27 15:31 UTC (permalink / raw)
  To: 68060; +Cc: Jean-Pierre De Jesus DIAZ

* gnu/packages/vim.scm (neovim-coqtail): New variable.

Change-Id: I431571925da02788410fc8bf3b1e1aea93bcb1bb
---
 gnu/packages/vim.scm | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index 5f211b120d..1f7a005cb1 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -518,6 +518,18 @@ (define-public vim-coqtail
       (home-page "https://github.com/whonore/Coqtail")
       (license license:expat))))
 
+(define-public neovim-coqtail
+  (package
+    (inherit vim-coqtail)
+    (name "neovim-coqtail")
+    (synopsis "Interactive Coq proofs in Neovim")
+    (description "Coqtail enables interactive Coq proof development in Neovim
+similar to CoqIDE or ProofGeneral.")
+    (native-inputs
+     (modify-inputs (package-native-inputs vim-coqtail)
+       (replace "vim-vader" neovim-vader)
+       (append python-minimal python-pynvim)))))
+
 (define-public vim-fugitive
   (package
     (name "vim-fugitive")
-- 
2.41.0





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

* bug#68060: [PATCH 0/5] gnu: Add neovim-coqtail.
  2023-12-27 15:28 [bug#68060] [PATCH 0/5] gnu: Add neovim-coqtail Jean-Pierre De Jesus DIAZ via Guix-patches via
                   ` (4 preceding siblings ...)
  2023-12-27 15:31 ` [bug#68060] [PATCH 5/5] gnu: Add neovim-coqtail Jean-Pierre De Jesus DIAZ via Guix-patches via
@ 2024-01-01  9:00 ` Efraim Flashner
  5 siblings, 0 replies; 7+ messages in thread
From: Efraim Flashner @ 2024-01-01  9:00 UTC (permalink / raw)
  To: Jean-Pierre De Jesus DIAZ; +Cc: 68060-done

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

Patches look good. Thanks!

-- 
Efraim Flashner   <efraim@flashner.co.il>   רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2024-01-01  9:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-27 15:28 [bug#68060] [PATCH 0/5] gnu: Add neovim-coqtail Jean-Pierre De Jesus DIAZ via Guix-patches via
2023-12-27 15:31 ` [bug#68060] [PATCH 1/5] gnu: vim-vader: Allow using neovim for tests Jean-Pierre De Jesus DIAZ via Guix-patches via
2023-12-27 15:31 ` [bug#68060] [PATCH 2/5] gnu: Add neovim-vader Jean-Pierre De Jesus DIAZ via Guix-patches via
2023-12-27 15:31 ` [bug#68060] [PATCH 3/5] gnu: vim-coqtail: Move vim-full to arguments Jean-Pierre De Jesus DIAZ via Guix-patches via
2023-12-27 15:31 ` [bug#68060] [PATCH 4/5] gnu: vim-coqtail: Allow using neovim for tests Jean-Pierre De Jesus DIAZ via Guix-patches via
2023-12-27 15:31 ` [bug#68060] [PATCH 5/5] gnu: Add neovim-coqtail Jean-Pierre De Jesus DIAZ via Guix-patches via
2024-01-01  9:00 ` bug#68060: [PATCH 0/5] " Efraim Flashner

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).