1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
3 ;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
4 ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
5 ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
6 ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
7 ;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr>
8 ;;; Copyright © 2019 HiPhish <hiphish@posteo.de>
9 ;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu>
10 ;;; Copyright © 2019, 2020 Jakub Kądziołka <kuba@kadziolka.net>
11 ;;; Copyright © 2020, 2021 Jack Hill <jackhill@jackhill.us>
12 ;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
13 ;;; Copyright © 2021 Tissevert <tissevert+guix@marvid.fr>
14 ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com>
16 ;;; This file is part of GNU Guix.
18 ;;; GNU Guix is free software; you can redistribute it and/or modify it
19 ;;; under the terms of the GNU General Public License as published by
20 ;;; the Free Software Foundation; either version 3 of the License, or (at
21 ;;; your option) any later version.
23 ;;; GNU Guix is distributed in the hope that it will be useful, but
24 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
25 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 ;;; GNU General Public License for more details.
28 ;;; You should have received a copy of the GNU General Public License
29 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
31 (define-module (gnu packages vim)
32 #:use-module ((guix licenses) #:prefix license:)
33 #:use-module (guix packages)
34 #:use-module (guix utils)
35 #:use-module (guix download)
36 #:use-module (guix git-download)
37 #:use-module (guix build-system cmake)
38 #:use-module (guix build-system copy)
39 #:use-module (guix build-system gnu)
40 #:use-module (guix build-system python)
41 #:use-module (gnu packages)
42 #:use-module (gnu packages acl)
43 #:use-module (gnu packages admin) ; For GNU hostname
44 #:use-module (gnu packages attr)
45 #:use-module (gnu packages autotools)
46 #:use-module (gnu packages base)
47 #:use-module (gnu packages code)
48 #:use-module (gnu packages enlightenment)
49 #:use-module (gnu packages fontutils)
50 #:use-module (gnu packages gawk)
51 #:use-module (gnu packages gettext)
52 #:use-module (gnu packages glib)
53 #:use-module (gnu packages gperf)
54 #:use-module (gnu packages groff)
55 #:use-module (gnu packages gtk)
56 #:use-module (gnu packages image)
57 #:use-module (gnu packages jemalloc)
58 #:use-module (gnu packages libevent)
59 #:use-module (gnu packages linux)
60 #:use-module (gnu packages lua)
61 #:use-module (gnu packages ncurses)
62 #:use-module (gnu packages perl)
63 #:use-module (gnu packages pkg-config)
64 #:use-module (gnu packages python)
65 #:use-module (gnu packages python-xyz)
66 #:use-module (gnu packages ruby)
67 #:use-module (gnu packages serialization)
68 #:use-module (gnu packages shells)
69 #:use-module (gnu packages tcl)
70 #:use-module (gnu packages text-editors)
71 #:use-module (gnu packages terminals)
72 #:use-module (gnu packages xdisorg)
73 #:use-module (gnu packages xorg))
82 (url "https://github.com/vim/vim")
83 (commit (string-append "v" version))))
84 (file-name (git-file-name name version))
87 "1s09jvr1vv9zjk352vbfidfy5fidbf83kz2vk0kk6zv24j1yck24"))))
88 (build-system gnu-build-system)
90 `(#:test-target "test"
92 ;; Fix test_signals.vim. https://github.com/vim/vim/issues/7402
93 #:make-flags (list "CFLAGS=-D_REENTRANT")
95 (modify-phases %standard-phases
96 (add-after 'configure 'patch-absolute-paths
98 (substitute* "runtime/tools/mve.awk"
99 (("/usr/bin/nawk") (which "gawk")))
100 (substitute* '("src/testdir/Makefile"
101 "src/testdir/test_normal.vim"
102 "src/testdir/test_popupwin.vim"
103 "src/testdir/test_shell.vim"
104 "src/testdir/test_system.vim"
105 "src/testdir/test_terminal.vim"
106 "src/testdir/test_terminal2.vim")
107 (("/bin/sh") (which "sh")))
108 (substitute* "src/testdir/test_autocmd.vim"
109 (("/bin/kill") (which "kill")))
111 (add-before 'check 'set-environment-variables
112 (lambda* (#:key inputs #:allow-other-keys)
113 ;; One of the tests tests timezone-dependent functions.
115 (search-input-directory inputs "share/zoneinfo"))
117 ;; Make sure the TERM environment variable is set for the tests
118 (setenv "TERM" "xterm")
120 (add-before 'check 'skip-or-fix-failing-tests
122 ;; This test assumes that PID 1 is run as root and that the user
123 ;; running the test suite does not have permission to kill(1, 0)
124 ;; it. This is not true in the build container, where both PID 1
125 ;; and the test suite are run as the same user. Skip the test.
126 ;; An alternative fix would be to patch the PID used to a random
127 ;; 32-bit value and hope it never shows up in the test environment.
128 (substitute* "src/testdir/test_swap.vim"
129 (("if !IsRoot\\(\\)") "if 0"))
131 ;; These tests check how the terminal looks after executing some
132 ;; actions. The path of the bash binary is shown, which results in
133 ;; a difference being detected. Patching the expected result is
134 ;; non-trivial due to the special format used, so skip the test.
135 (substitute* "src/testdir/test_terminal.vim"
136 ((".*Test_open_term_from_cmd.*" line)
137 (string-append line "return\n"))
138 ((".*Test_terminal_postponed_scrollback.*" line)
139 (string-append line "return\n"))
140 ((".*Test_combining_double_width.*" line)
141 (string-append line "return\n")))
142 (substitute* "src/testdir/test_popupwin.vim"
143 ((".*Test_popup_drag_termwin.*" line)
144 (string-append line "return\n")))
146 (add-before 'install 'fix-installman.sh
148 (substitute* "src/installman.sh"
151 (add-after 'install 'install-guix.vim
152 (lambda* (#:key inputs outputs #:allow-other-keys)
153 (let ((vimdir (string-append (assoc-ref outputs "out") "/share/vim")))
155 (copy-file (assoc-ref inputs "guix.vim")
156 (string-append vimdir "/vimrc"))
162 ("tcsh" ,tcsh))) ; For runtime/tools/vim32
164 `(("libtool" ,libtool)
165 ("guix.vim" ,(search-auxiliary-file "guix.vim"))
168 ("tzdata" ,tzdata-for-tests)))
169 (home-page "https://www.vim.org/")
170 (synopsis "Text editor based on vi")
171 ;; The description shares language with the vim-full package. When making
172 ;; changes, check if the other description also needs to be updated.
174 "Vim is a highly configurable text editor built to enable efficient text
175 editing. It is an improved version of the vi editor distributed with most UNIX
178 Vim is often called a \"programmer's editor,\" and so useful for programming
179 that many consider it an entire IDE. It's not just for programmers, though.
180 Vim is perfect for all kinds of text editing, from composing email to editing
181 configuration files.")
182 (license license:vim)))
185 (package (inherit vim)
188 `(#:make-flags (list ,(string-append "CC=" (cc-for-target)))
189 #:tests? #f ; there are none
191 (modify-phases %standard-phases
193 (add-after 'unpack 'chdir
198 (lambda* (#:key outputs #:allow-other-keys)
199 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
200 (install-file "xxd" bin)
204 (synopsis "Hexdump utility from vim")
205 (description "This package provides the Hexdump utility xxd that comes
206 with the editor vim.")))
208 (define-public vim-full
210 ;; This package should share its source with Vim, but it doesn't
211 ;; build reliably, and we want to keep Vim up to date due to the
212 ;; frequency of important bug fixes.
217 (list (string-append "--with-lua-prefix="
218 (assoc-ref %build-inputs "lua"))
219 "--with-features=huge"
220 "--enable-python3interp=yes"
221 "--enable-perlinterp=yes"
222 "--enable-rubyinterp=yes"
223 "--enable-tclinterp=yes"
224 "--enable-luainterp=yes"
231 ,@(substitute-keyword-arguments (package-arguments vim)
232 ;; This flag fixes the following error:
233 ;; .../libpython3.7m.a(pyexpat.o): undefined reference to symbol 'XML_FreeContentModel'
234 ;; .../libexpat.so.1: error adding symbols: DSO missing from command line
235 ((#:make-flags flags)
237 (list "LDFLAGS=-lexpat")
238 (delete "CFLAGS=-D_REENTRANT" ,flags)))
240 `(modify-phases ,phases
241 (add-before 'check 'start-xserver
242 (lambda* (#:key inputs #:allow-other-keys)
243 ;; Some tests require an X server, but does not start one.
244 (let ((xorg-server (assoc-ref inputs "xorg-server"))
246 (setenv "DISPLAY" display)
247 (zero? (system (string-append xorg-server "/bin/Xvfb "
248 display " &")))))))))))
250 `(("pkg-config" ,pkg-config)
251 ("xorg-server" ,xorg-server-for-tests)
252 ,@(package-native-inputs vim)))
258 ("fontconfig" ,fontconfig)
259 ("freetype" ,freetype)
260 ("gdk-pixbuf" ,gdk-pixbuf)
261 ("gettext" ,gettext-minimal)
265 ("harfbuzz" ,harfbuzz)
270 ("libxdmcp" ,libxdmcp)
279 ,@(package-inputs vim)))
280 ;; The description shares language with the vim package. When making
281 ;; changes, check if the other description also needs to be updated.
282 (description "Vim is a highly configurable text editor built to enable efficient text
283 editing. It is an improved version of the vi editor distributed with most UNIX
286 Vim is often called a \"programmer's editor,\" and so useful for programming
287 that many consider it an entire IDE. It's not just for programmers, though.
288 Vim is perfect for all kinds of text editing, from composing email to editing
291 This package provides a version of Vim with many optional features enabled.
292 It includes a graphical interface, @command{gvim}, and support for plugins
293 written in the Python 3, Perl, Ruby, Tcl, and Lua programming languages.")))
295 (define-public vim-neocomplete
297 (name "vim-neocomplete")
303 (url "https://github.com/Shougo/neocomplete.vim")
304 (commit (string-append "ver." version))))
305 (file-name (git-file-name name version))
308 "1h6sci5mhdfg6sjsjpi8l5li02hg858zcayiwl60y9j2gqnd18lv"))))
309 (build-system copy-build-system)
312 '(("autoload" "share/vim/vimfiles/")
313 ("doc" "share/vim/vimfiles/")
314 ("plugin" "share/vim/vimfiles/"))))
315 (synopsis "Next generation completion framework for Vim")
317 "@code{neocomplete}, an abbreviation of 'neo-completion with cache',
319 It provides keyword completion system by maintaining a cache of keywords in
320 the current buffer. Neocomplete can be customized easily and has many more
321 features than Vim's built-in completion.")
322 (home-page "https://github.com/Shougo/neocomplete.vim/")
323 (license license:expat)))
325 ;; There are no release tarballs.
326 (define-public vim-neosnippet-snippets
327 (let ((commit "8e2b1c0cab9ed9a832b3743dbb65e9966a64331a")
330 (name "vim-neosnippet-snippets")
331 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
336 (url "https://github.com/Shougo/neosnippet-snippets")
338 (file-name (string-append name "-" version "-checkout"))
341 "151wpvbj6jb9jdkbhj3b77f5sq7y328spvwfbqyj1y32rg4ifmc6"))))
342 (build-system copy-build-system)
345 '(("neosnippets" "share/vim/vimfiles/"))))
346 (synopsis "Snippets for neosnippet")
348 "@code{neosnippet-snippets} provides standard snippets for the Vim plugin
349 @code{neosnippet}. Snippets are small templates for commonly used code that
350 you can fill in on the fly.")
351 (home-page "https://github.com/Shougo/neosnippet-snippets")
352 (license license:expat))))
354 ;; The released tarball is too old for our Vim.
355 (define-public vim-neosnippet
356 (let ((commit "1bd7e23c79b73da16eb0c9469b25c376d3594583")
359 (name "vim-neosnippet")
360 (version (string-append "4.2-" revision "." (string-take commit 7)))
365 (url "https://github.com/Shougo/neosnippet.vim/")
367 (file-name (string-append name "-" version "-checkout"))
370 "0k80syscmpnj38ks1fq02ds59g0r4jlg9ll7z4qc048mgi35alw5"))))
371 (build-system copy-build-system)
374 '(("autoload" "share/vim/vimfiles/")
375 ("doc" "share/vim/vimfiles/")
376 ("ftdetect" "share/vim/vimfiles/")
377 ("ftplugin" "share/vim/vimfiles/")
378 ("indent" "share/vim/vimfiles/")
379 ("plugin" "share/vim/vimfiles/")
380 ("rplugin" "share/vim/vimfiles/")
381 ("syntax" "share/vim/vimfiles/"))))
382 (synopsis "Snippet support for Vim")
384 "@code{neosnippet}, is a plugin for Vim which adds snippet support to Vim.
385 Snippets are small templates for commonly used code that you can fill in on
386 the fly. To use snippets can increase your productivity in Vim a lot.
387 The functionality of this plug-in is quite similar to plug-ins like
388 @code{snipMate.vim} or @code{snippetsEmu.vim}. But since you can choose
389 snippets with the neocomplcache / neocomplete interface, you might have less
390 trouble using them, because you do not have to remember each snippet name.")
391 (home-page "https://github.com/Shougo/neosnippet.vim/")
392 (license license:expat))))
394 (define-public vim-scheme
395 (let ((commit "e22fc8e199ef52f2efacd08e71c3add90d83b375")
399 (version (git-version "0.0.0" revision commit))
404 (url "https://git.foldling.org/vim-scheme.git")
406 (file-name (git-file-name name version))
409 "04h946vr4f8wxap3wzqs69y2v8n50g2zbk22jsg2kxr4c01z5cbw"))))
410 (build-system copy-build-system)
413 '(("ftplugin" "share/vim/vimfiles/")
414 ("indent" "share/vim/vimfiles/")
415 ("syntax" "share/vim/vimfiles/"))))
416 (synopsis "Scheme syntax for Vim")
418 "@code{vim-scheme} provides Scheme support for Vim (R7RS and CHICKEN).")
419 (home-page "https://foldling.org/git/vim-scheme.git/")
420 (license license:unlicense))))
422 (define-public vim-luna
423 (let ((commit "633619953dcf8577168e255230f96b05f28d6371")
427 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
432 (url "https://github.com/notpratheek/vim-luna")
434 (file-name (string-append name "-" version "-checkout"))
437 "0ka3qbhsh8lix1vyj4678j7dnchkd8khhirrnn3aylxxf8fpqyg8"))))
438 (build-system copy-build-system)
441 '(("colors" "share/vim/vimfiles/"))))
442 (synopsis "Dark color theme for Vim")
444 "@code{vim-luna} is a dark color theme for Vim.")
445 (home-page "https://github.com/notpratheek/vim-luna")
446 (license license:expat))))
448 ;; There are no tarball releases.
449 (define-public vim-context-filetype
450 (let ((commit "5e85f8cae26806f391aefe2661791a6de53bcea2")
453 (name "vim-context-filetype")
454 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
459 (url "https://github.com/Shougo/context_filetype.vim")
461 (file-name (string-append name "-" version "-checkout"))
464 "0alvrfhmd91zkd9h83s8wvgyq4iakcf6rybsyjd369qbgpcqky89"))))
465 (build-system copy-build-system)
468 '(("doc" "share/vim/vimfiles/")
469 ("autoload" "share/vim/vimfiles/"))))
470 (synopsis "Context filetype library for Vim")
472 "@code{vim-context-filetype} is context filetype library for Vim script.")
473 (home-page "https://github.com/Shougo/context_filetype.vim")
474 (license license:expat)))) ; ??? check again
476 (define-public vim-fugitive
478 (name "vim-fugitive")
484 (url "https://github.com/tpope/vim-fugitive")
485 (commit (string-append "v" version))))
486 (file-name (git-file-name name version))
489 "0vgyp0rabrxjy9mpdnf221vjk3q38pls7az884gvnjjzdly18xmp"))))
490 (build-system copy-build-system)
493 '(("autoload" "share/vim/vimfiles/")
494 ("doc" "share/vim/vimfiles/")
495 ("ftdetect" "share/vim/vimfiles/")
496 ("ftplugin" "share/vim/vimfiles/")
497 ("plugin" "share/vim/vimfiles/")
498 ("syntax" "share/vim/vimfiles/"))))
499 (home-page "https://github.com/tpope/vim-fugitive")
500 (synopsis "Vim plugin to work with Git")
501 (description "Vim-fugitive is a wrapper for Vim that complements the
502 command window, where you can stage and review your changes before the next
503 commit or run any Git arbitrary command.")
504 (license license:vim))) ; distributed under the same license as vim
506 (define-public vim-airline
514 (url "https://github.com/vim-airline/vim-airline")
515 (commit (string-append "v" version))))
516 (file-name (git-file-name name version))
519 "1aksmr73648pvyc75pfdz28k2d4ky52rn7xiwcv7lz87q3vqld7k"))))
520 (build-system copy-build-system)
523 '(("autoload" "share/vim/vimfiles/")
524 ("doc" "share/vim/vimfiles/")
525 ("plugin" "share/vim/vimfiles/"))))
526 (synopsis "Statusline for Vim")
528 "@code{vim-airline} is an extensible statusline for Vim.
529 It can be extended and costumized with themes, works with unicode fonts
530 and powerline symbols, etc.")
531 (home-page "https://github.com/vim-airline/vim-airline")
532 (license license:expat)))
534 ;; There are no tarball releases.
535 (define-public vim-airline-themes
536 (let ((commit "e6f233231b232b6027cde6aebeeb18d9138e5324")
539 (name "vim-airline-themes")
540 (version (git-version "0.0.0" revision commit))
545 (url "https://github.com/vim-airline/vim-airline-themes")
547 (file-name (git-file-name name version))
550 "1sb7nb7j7bz0pv1c9bgdy0smhr0jk2b1vbdv9yzghg5lrknpsbr6"))))
551 (build-system copy-build-system)
554 '(("autoload" "share/vim/vimfiles/")
555 ("doc" "share/vim/vimfiles/")
556 ("plugin" "share/vim/vimfiles/"))))
557 (synopsis "Collection of themes for Vim-airline")
559 "@code{vim-airline-themes} is a collection of themes for @code{vim-airline}.")
560 (home-page "https://github.com/vim-airline/vim-airline-themes")
561 (license license:expat))))
563 (define-public vim-syntastic
565 (name "vim-syntastic")
571 (url "https://github.com/vim-syntastic/syntastic")
573 (file-name (git-file-name name version))
575 (base32 "0j91f72jaz1s6aw1hpjiz30vk2ds2aqd9gisk91grsldy6nz6hhz"))))
576 (build-system copy-build-system)
579 '(("autoload" "share/vim/vimfiles/")
580 ("doc" "share/vim/vimfiles/")
581 ("plugin" "share/vim/vimfiles/")
582 ("syntax_checkers" "share/vim/vimfiles/"))))
583 (synopsis "Syntax checking plugin for Vim")
585 "Vim-syntastic is a syntax checking plugin for Vim. It runs files through
586 external syntax checkers and displays any resulting errors to the user. This
587 can be done on demand, or automatically as files are saved. If syntax errors
588 are detected, the user is notified.")
589 (home-page "https://github.com/vim-syntastic/syntastic")
590 (license license:wtfpl2)))
592 (define-public vim-solarized
593 (let ((commit "62f656a02f93c5190a8753159e34b385588d5ff3")
596 (name "vim-solarized")
597 (version (git-version "1.0.0beta1" revision commit))
602 (url "https://github.com/altercation/solarized")
604 (file-name (git-file-name name version))
606 (base32 "0001mz5v3a8zvi3gzmxhi3yrsb6hs7qf6i497arsngnvj2cwn61d"))))
607 (build-system copy-build-system)
610 '(("vim-colors-solarized/colors" "share/vim/vimfiles/")
611 ("vim-colors-solarized/doc" "share/vim/vimfiles/"))))
612 (home-page "https://github.com/altercation/vim-colors-solarized")
613 (synopsis "Solarized color scheme for Vim")
615 "This package provides the Solarized theme as a Vim color scheme.
617 Solarized is a 16-color palette comprising 8 monotones and 8 accent
618 colors. It was designed for use with both terminal and GUI applications, and
619 has a dark and a light mode.
621 Based on CIELAB lightness relationships between colors, this theme reduces
622 brightness contrast but retains contrasting hues based on colorwheel relations
623 for syntax highlighting readability.
625 It keeps the same selective contrast relationships and overall feel when
626 switching between the light and dark background modes.")
627 (license license:expat))))
629 (define-public editorconfig-vim
631 (name "editorconfig-vim")
637 (url "https://github.com/editorconfig/editorconfig-vim")
638 (commit (string-append "v" version))))
639 (file-name (git-file-name name version))
642 "0mp80bi2m56bb93szw87vy6q5s85yk9g91sl4pr51316rgdv5kkv"))))
643 (build-system copy-build-system)
646 '(("autoload" "share/vim/vimfiles/")
647 ("doc" "share/vim/vimfiles/")
648 ("plugin" "share/vim/vimfiles/"))))
649 (home-page "https://editorconfig.org/")
650 (synopsis "EditorConfig plugin for Vim")
651 (description "EditorConfig makes it easy to maintain the correct coding
652 style when switching between different text editors and between different
653 projects. The EditorConfig project maintains a file format and plugins for
654 various text editors which allow this file format to be read and used by those
656 (license license:bsd-2)))
658 (define-public neovim-syntastic
660 (inherit vim-syntastic)
661 (name "neovim-syntastic")
664 '(("autoload" "share/nvim/site/")
665 ("doc" "share/nvim/site/")
666 ("plugin" "share/nvim/site/")
667 ("syntax_checkers" "share/nvim/site/"))))
668 (synopsis "Syntax checking plugin for Neovim")
670 "Vim-syntastic is a syntax checking plugin for Neovim. It runs files through
671 external syntax checkers and displays any resulting errors to the user. This
672 can be done on demand, or automatically as files are saved. If syntax errors
673 are detected, the user is notified.")))
675 (define-public neovim
683 (url "https://github.com/neovim/neovim")
684 (commit (string-append "v" version))))
685 (file-name (git-file-name name version))
687 (base32 "11zyj6jvkwas3n6w1ckj3pk6jf81z1g7ngg4smmwm7c27y2a6f2m"))))
688 (build-system cmake-build-system)
690 `(#:modules ((srfi srfi-26)
691 (guix build cmake-build-system)
693 #:configure-flags '("-DPREFER_LUA:BOOL=YES")
695 (modify-phases %standard-phases
696 (add-after 'unpack 'set-lua-paths
697 (lambda* (#:key inputs #:allow-other-keys)
698 (let* ((lua-version "5.1")
701 (let ((path (string-append prefix "/lib/lua/" lua-version)))
702 (string-append path "/?.so;" path "/?/?.so"))))
705 (let ((path (string-append prefix "/share/lua/" lua-version)))
706 (string-append path "/?.lua;" path "/?/?.lua"))))
707 (lua-inputs (map (cute assoc-ref inputs <>)
714 (string-join (map lua-path-spec lua-inputs) ";"))
716 (string-join (map lua-cpath-spec lua-inputs) ";"))
718 (add-after 'unpack 'prevent-embedding-gcc-store-path
720 ;; nvim remembers its build options, including the compiler with
721 ;; its complete path. This adds gcc to the closure of nvim, which
722 ;; doubles its size. We remove the refirence here.
723 (substitute* "cmake/GetCompileFlags.cmake"
724 (("\\$\\{CMAKE_C_COMPILER\\}") "/gnu/store/.../bin/gcc"))
729 ("libtermkey" ,libtermkey)
730 ("libvterm" ,libvterm)
731 ("unibilium" ,unibilium)
732 ("jemalloc" ,jemalloc)
733 ("libiconv" ,libiconv)
735 ("lua-luv" ,lua5.1-luv)
736 ("lua-lpeg" ,lua5.1-lpeg)
737 ("lua-bitop" ,lua5.1-bitop)
738 ("lua-libmpack" ,lua5.1-libmpack)))
740 `(("pkg-config" ,pkg-config)
741 ("gettext" ,gettext-minimal)
743 (home-page "https://neovim.io")
744 (synopsis "Fork of vim focused on extensibility and agility")
745 (description "Neovim is a project that seeks to aggressively
746 refactor Vim in order to:
749 @item Simplify maintenance and encourage contributions
750 @item Split the work between multiple developers
751 @item Enable advanced external UIs without modifications to the core
752 @item Improve extensibility with a new plugin architecture
754 ;; Neovim is licensed under the terms of the Apache 2.0 license,
755 ;; except for parts that were contributed under the Vim license.
756 (license (list license:asl2.0 license:vim))))
766 (url "https://github.com/jeanguyomarch/eovim/")
767 (commit (string-append "v" version))))
768 (file-name (git-file-name name version))
770 (base32 "06b7crmz3wvvq15ncl0jk20s8j1pmna2jin0k5y5n5qxpafbgp3k"))))
771 (build-system cmake-build-system)
773 '(#:tests? #false ;no tests
775 (modify-phases %standard-phases
776 (add-after 'configure 'reference-nvim
777 (lambda* (#:key inputs #:allow-other-keys)
778 (let ((nvim (search-input-file inputs "/bin/nvim")))
779 ;; This substitution should change one line, and replaces the default
780 ;; value in the struct of options with an absolute store reference.
781 (substitute* "../source/src/main.c"
782 (("(^[[:blank:]]+\\.nvim = \")nvim" _ start)
783 (string-append start nvim))))))
784 (add-before 'build 'set-home
785 (lambda _ (setenv "HOME" "/tmp"))))))
787 `(("pkg-config" ,pkg-config)))
792 (home-page "https://github.com/jeanguyomarch/eovim/")
793 (synopsis "EFL GUI for Neovim")
794 (description "Graphical Neovim interface based on the @acronym{EFL, Enlightenment
795 Foundation Libraries} toolkit. Its features include customizable appearance
796 and support for fonts with ligatures.")
797 (license license:expat)))
807 (string-append "https://github.com/vifm/vifm/releases/download/v"
808 version "/vifm-" version ".tar.bz2")
809 (string-append "https://sourceforge.net/projects/vifm/files/vifm/"
810 "vifm-" version ".tar.bz2")))
813 "1h5j4y704nciyzg3aaav8sl3r5h9mpwq8f28cj65nnxk6a7n3a9k"))))
814 (build-system gnu-build-system)
816 '(#:configure-flags '("--disable-build-timestamp")
818 (modify-phases %standard-phases
819 (add-after 'patch-source-shebangs 'patch-test-shebangs
821 (substitute* (cons* "src/background.c"
823 (find-files "tests" "\\.c$"))
824 (("/bin/sh") (which "sh"))
825 (("/bin/bash") (which "bash")))
826 ;; This test segfaults
827 (substitute* "tests/Makefile"
830 (add-after 'install 'install-vim-plugin-files
831 (lambda* (#:key outputs #:allow-other-keys)
832 (let* ((out (assoc-ref outputs "out"))
833 (vifm (string-append out "/share/vifm"))
834 (vimfiles (string-append out "/share/vim/vimfiles")))
835 (copy-recursively (string-append vifm "/colors")
836 (string-append vimfiles "/colors"))
837 (copy-recursively (string-append vifm "/vim")
839 (delete-file-recursively (string-append vifm "/colors"))
840 (delete-file-recursively (string-append vifm "/vim")))
843 `(("groff" ,groff))) ; for the documentation
848 (home-page "https://vifm.info/")
849 (synopsis "Flexible vi-like file manager using ncurses")
850 (description "Vifm is a file manager providing a @command{vi}-like usage
851 experience. It has similar keybindings and modes (e.g. normal, command line,
852 visual). The interface uses ncurses, thus vifm can be used in text-only
853 environments. It supports a wide range of features, some of which are known
854 from the @command{vi}-editor:
857 @item user mappings (almost like in @code{vi})
858 @item ranges in command
860 @item user defined commands (with support for ranges)
862 @item operation undoing/redoing
863 @item fuse file systems support
865 @item multiple files renaming
866 @item support of filename modifiers
867 @item colorschemes support
868 @item file name color according to file type
869 @item path specific colorscheme customization
871 @item operation backgrounding
872 @item customizable file viewers
873 @item handy @code{less}-like preview mode
874 @item filtering out and searching for files using regular expressions
875 @item one or two panes view
877 With the package comes a plugin to use vifm as a vim file selector.")
878 (license license:gpl2+)))
880 (define-public python-pynvim
882 (name "python-pynvim")
886 (uri (pypi-uri "pynvim" version))
889 "13qgwkqbx012j5spis1aw8rb120rw0zphgjy1j58irax8r6j1ikb"))))
890 (build-system python-build-system)
892 `(("python-greenlet" ,python-greenlet)
893 ("python-msgpack" ,python-msgpack)))
896 (home-page "https://github.com/neovim/pynvim")
897 (synopsis "Python client and plugin host for neovim")
898 (description "Pynvim implements support for python plugins in neovim. It
899 also works as a library for connecting to and scripting neovim processes
900 through its msgpack-rpc API.")
901 (license license:asl2.0)))
903 (define-public vim-guix-vim
905 (name "vim-guix-vim")
910 (url "https://gitlab.com/Efraim/guix.vim.git/")
912 (file-name (git-file-name name version))
915 "0bk2mnvbv1rfr0zzx4m8jjdw98wbbmdffx1h9svrjpg25lcvqv1b"))))
916 (build-system copy-build-system)
919 '(("autoload" "share/vim/vimfiles/")
920 ("compiler" "share/vim/vimfiles/")
921 ("doc" "share/vim/vimfiles/")
922 ("indent" "share/vim/vimfiles/")
923 ("ftdetect" "share/vim/vimfiles/")
924 ("ftplugin" "share/vim/vimfiles/")
925 ("plugin" "share/vim/vimfiles/")
926 ("syntax" "share/vim/vimfiles/"))))
927 (home-page "https://gitlab.com/Efraim/guix.vim")
928 (synopsis "Guix integration in Vim")
929 (description "This package provides support for GNU Guix in Vim.")
930 (license license:vim)))
932 (define-public vim-asyncrun
934 (name "vim-asyncrun")
939 (url "https://github.com/skywind3000/asyncrun.vim")
941 (file-name (git-file-name name version))
944 "11zcw0sll6qg6ha0rr6n1cw5v73azvf7ycwn9lgiwa5cj7rrqjf4"))))
945 (build-system copy-build-system)
948 '(("plugin" "share/vim/vimfiles/")
949 ("doc/" "share/vim/vimfiles/doc" #:include ("asyncrun.txt")))))
950 (home-page "https://github.com/skywind3000/asyncrun.vim")
951 (synopsis "Run Async Shell Commands in Vim")
952 (description "This plugin takes the advantage of new APIs in Vim 8 (and
953 NeoVim) to enable you to run shell commands in background and read output in the
954 quickfix window in realtime.")
955 (license license:expat)))
957 (define-public vim-dispatch
959 (name "vim-dispatch")
965 (url "https://github.com/tpope/vim-dispatch")
966 (commit (string-append "v" version))))
967 (file-name (git-file-name name version))
970 "1m8b5mn2zqlphzs6xfwykwmghf6p0wabrhpjmh7vav35jgcxc4wl"))))
971 (build-system copy-build-system)
974 '(("autoload" "share/vim/vimfiles/")
975 ("doc" "share/vim/vimfiles/")
976 ("plugin" "share/vim/vimfiles/"))))
977 (home-page "https://github.com/tpope/vim-dispatch")
978 (synopsis "Asynchronous build and test dispatcher")
979 (description "Leverage the power of Vim's compiler plugins without being
980 bound by synchronicity. Kick off builds and test suites using one of several
981 asynchronous adapters (including tmux, screen, and a headless mode), and when
982 the job completes, errors will be loaded and parsed automatically.")
983 (license license:vim)))
985 (define-public vim-gemini-vim
986 ;; No releases have been tagged.
987 (let ((commit "f300c54174fc0db8fb68f1bc04307b58612e9630")
990 (name "vim-gemini-vim")
991 (version (git-version "0.0.0" revision commit))
996 (url "https://git.sr.ht/~torresjrjr/gemini.vim")
998 (file-name (git-file-name name version))
1000 (base32 "05ffhhfahjqwxyrqmsinsahrs15wknzl2qbj8mznyv319mn2civ2"))))
1001 (build-system copy-build-system)
1004 '(("ftdetect" "share/vim/vimfiles/")
1005 ("syntax" "share/vim/vimfiles/"))))
1006 (home-page "https://git.sr.ht/~torresjrjr/gemini.vim")
1007 (synopsis "Vim syntax highlighting plugin for Gemini")
1008 (description "This Vim plugin provides a Vim syntax highlighting plugin
1009 for Gemini Text, the text/gemini media type, as defined in the Gemini protocol
1011 (license license:gpl3))))
1013 (define-public vim-eunuch
1014 (let ((commit "33e875b31c8b811a0a47908884a5e2339106bbe8")
1018 (version (git-version "1.2" revision commit))
1023 (url "https://github.com/tpope/vim-eunuch")
1025 (file-name (git-file-name name version))
1028 "1xadb22kd40swmww0qxmmkcpcq6viy8l167pjck5q32hfngll5d3"))))
1029 (build-system copy-build-system)
1032 '(("doc" "share/vim/vimfiles/")
1033 ("plugin" "share/vim/vimfiles/"))))
1034 (home-page "https://github.com/tpope/vim-eunuch")
1035 (synopsis "Vim sugar for the UNIX shell commands")
1036 (description "Vim sugar for the UNIX shell commands that need it the most.
1037 This package includes commands such as @code{SudoWrite} and @code{SudoEdit} and
1038 help working on Vim buffers and the files they reference with one command.")
1039 (license license:vim))))
1041 (define-public vim-slime
1042 ;; No tagged releases.
1043 (let ((commit "a522fed677e50175f52efc5848cc35209af33216")
1047 (version (git-version "0.0.0" revision commit))
1052 (url "https://github.com/jpalardy/vim-slime")
1054 (file-name (git-file-name name version))
1056 (base32 "0k4b629jn6xlxyjxdl3cgm06v9dmx967rqnslv5m82c9kscwpyh4"))))
1057 (build-system copy-build-system)
1060 '(("autoload" "share/vim/vimfiles/")
1061 ("doc" "share/vim/vimfiles/")
1062 ("ftplugin" "share/vim/vimfiles/")
1063 ("plugin" "share/vim/vimfiles/"))))
1064 (home-page "https://technotales.wordpress.com/2007/10/03/like-slime-for-vim/")
1065 (synopsis "Vim plugin to give you some slime")
1066 (description "SLIME is an Emacs plugin to turn Emacs into a Lisp IDE. You
1067 can type text in a file, send it to a live REPL, and avoid having to reload all
1068 your code every time you make a change. @code{Vim-slime} is an attempt at
1069 getting some of these features into Vim. It works with any REPL and isn't tied
1071 (license license:expat))))
1073 (define-public vim-paredit
1074 ;; The last tagged version is from August 2013.
1075 (let ((commit "97d51d099523b37bb35cbcf3564cbfb46e66e4ec")
1078 (name "vim-paredit")
1079 (version (git-version "0.9.11" revision commit))
1084 (url "https://github.com/kovisoft/paredit")
1086 (file-name (git-file-name name version))
1088 (base32 "07d5s20r0ssd7rir45vy0fqlci44gha1a81rcilgar227f3nw328"))))
1089 (build-system copy-build-system)
1092 '(("doc" "share/vim/vimfiles/")
1093 ("plugin" "share/vim/vimfiles/"))))
1094 (home-page "https://github.com/kovisoft/paredit")
1095 (synopsis "Vim plugin for structured editing of Lisp S-expressions")
1097 "Paredit performs structured editing of Lisp S-expressions in Vim.
1098 @code{Paredit.vim} is similar to @code{paredit.el} for Emacs.")
1099 ;; License listed in plugin/paredit.vim.
1100 (license license:public-domain))))
1102 (define-public vim-surround
1104 (name "vim-surround")
1110 (url "https://github.com/tpope/vim-surround")
1111 (commit (string-append "v" version))))
1112 (file-name (git-file-name name version))
1114 (base32 "1b0bd5m5lv1p4d299mrwjfs2gk0zqwyaqdaid9hs9yqlxnr8s5nf"))))
1115 (build-system copy-build-system)
1118 '(("doc" "share/vim/vimfiles/")
1119 ("plugin" "share/vim/vimfiles/"))))
1120 (home-page "https://github.com/tpope/vim-surround")
1121 (synopsis "Vim plugin for easy quoting and parenthesizing")
1123 "Surround.vim is all about \"surroundings\": parentheses, brackets,
1124 quotes, XML tags, and more. The plugin provides mappings to easily delete,
1125 change and add such surroundings in pairs.")
1126 (license license:vim)))
1128 (define-public vim-ctrlp
1136 (url "https://github.com/ctrlpvim/ctrlp.vim")
1138 (file-name (git-file-name name version))
1140 (base32 "0n68hg59h4rjn0ziqbsh5pr03l3kr98zk54659ny6vq107af1w96"))))
1141 (build-system copy-build-system)
1144 '(("autoload" "share/vim/vimfiles/")
1145 ("doc" "share/vim/vimfiles/")
1146 ("plugin" "share/vim/vimfiles/"))))
1147 (home-page "https://ctrlpvim.github.io/ctrlp.vim/")
1148 (synopsis "Fuzzy file, buffer, mru, tag, etc. finder for Vim")
1152 @item Written in pure Vimscript for MacVim, gVim and Vim 7.0+.
1153 @item Full support for Vim's regexp as search patterns.
1154 @item Built-in @acronym{Most Recently Used, MRU} files monitoring and search.
1155 @item Built-in project's root finder.
1156 @item Open multiple files at once.
1157 @item Create new files and directories.
1158 @item Execute Ex commands on an opening file (jump to a line, to a string or do
1160 @item Optional cross-session caching and history allow for fast initialization.
1161 @item Mappings and usage conform to Vim's conventions.
1163 (license license:vim)))
1165 (define-public vim-mucomplete
1167 (name "vim-mucomplete")
1173 (url "https://github.com/lifepillar/vim-mucomplete")
1174 (commit (string-append "v" version))))
1175 (file-name (git-file-name name version))
1177 (base32 "054g80n09mmxxlh8xaic29bn8bgn3clvv732rymljdyvbj1mlhwd"))))
1178 (build-system copy-build-system)
1181 '(("autoload" "share/vim/vimfiles/")
1182 ("doc" "share/vim/vimfiles/")
1183 ("plugin" "share/vim/vimfiles/"))))
1184 (home-page "https://github.com/lifepillar/vim-mucomplete")
1185 (synopsis "MUcomplete is a minimalist autocompletion plugin for Vim")
1187 "MUcomplete is an implementation of chained (fallback) completion,
1188 whereby several completion methods are attempted one after another until a
1189 result is returned.")
1190 (license license:expat)))
1192 (define-public vim-gitgutter
1193 (let ((commit "256702dd1432894b3607d3de6cd660863b331818")
1196 (name "vim-gitgutter")
1197 (version (git-version "0.0.0" revision commit))
1202 (url "https://github.com/airblade/vim-gitgutter")
1204 (file-name (git-file-name name version))
1206 (base32 "0zpa7cs59a8sq0k3frlf9flpf30jcn239yrpmv40r7nqvxzglbpl"))))
1207 (build-system copy-build-system)
1210 '(("autoload" "share/vim/vimfiles/")
1211 ("doc" "share/vim/vimfiles/")
1212 ("plugin" "share/vim/vimfiles/"))))
1213 (synopsis "Vim plugin which shows a git diff in the sign column")
1215 "A Vim plugin which shows a git diff in the sign column. It shows which
1216 lines have been added, modified, or removed. You can also preview, stage, and
1217 undo individual hunks; and stage partial hunks. The plugin also provides a hunk
1218 text object. The signs are always up to date and the plugin never saves your
1220 (home-page "https://github.com/airblade/vim-gitgutter")
1221 (license license:expat))))
1223 (define-public vim-characterize
1225 (name "vim-characterize")
1231 (url "https://github.com/tpope/vim-characterize")
1232 (commit (string-append "v" version))))
1233 (file-name (git-file-name name version))
1235 (base32 "0ppsbsd696ih40d9f76mdl9sd9y7p2pvm65qmvq4b2zhkv4xbpxz"))))
1236 (build-system copy-build-system)
1239 '(("autoload" "share/vim/vimfiles/")
1240 ("doc" "share/vim/vimfiles/")
1241 ("plugin" "share/vim/vimfiles/"))))
1242 (home-page "https://github.com/tpope/vim-characterize")
1243 (synopsis "Vim plugin for showing Unicode character metadata")
1245 "In Vim, pressing @code{ga} on a character reveals its representation in
1246 decimal, octal, and hex. Characterize.vim modernizes this with the following
1249 @item Unicode character names: @code{U+00A9 COPYRIGHT SYMBOL}
1250 @item Vim digraphs (type after @code{<C-K>} to insert the character):
1251 @code{Co}, @code{cO}
1252 @item Emoji codes: @code{:copyright:}
1253 @item HTML entities: @code{©}
1255 (license license:vim)))
1257 (define-public vim-tagbar
1265 (url "https://github.com/preservim/tagbar")
1266 (commit (string-append "v" version))))
1267 (file-name (git-file-name name version))
1269 (base32 "1fqfs8msmr6d4kpvxqp14sdjvp5fj52q5w5kz71myzcd4kqzmirp"))))
1270 (build-system copy-build-system)
1273 '(("autoload" "share/vim/vimfiles/")
1274 ("doc" "share/vim/vimfiles/")
1275 ("plugin" "share/vim/vimfiles/")
1276 ("syntax" "share/vim/vimfiles/"))
1278 (modify-phases %standard-phases
1279 (add-after 'unpack 'link-univerisal-ctags
1280 (lambda* (#:key inputs #:allow-other-keys)
1281 (let ((ctags (assoc-ref inputs "universal-ctags")))
1282 (substitute* "autoload/tagbar.vim"
1283 (("(.*)universal-ctags']" all leader)
1284 (string-append all "\n"
1285 leader ctags "/bin/ctags']")))))))))
1287 `(("universal-ctags" ,universal-ctags)))
1288 (home-page "https://github.com/preservim/tagbar")
1289 (synopsis "Vim plugin that displays tags in a window, ordered by scope")
1291 "Tagbar is a Vim plugin that provides an easy way to browse the tags of
1292 the current file and get an overview of its structure. It does this by creating
1293 a sidebar that displays the ctags-generated tags of the current file, ordered
1294 by their scope. This means that for example methods in C++ are displayed under
1295 the class they are defined in.")
1296 (license license:vim)))
1298 (define-public vim-nerdcommenter
1299 (let ((commit "a65465d321f2f8a74b2ffa540b9b87563f7e12e8")
1302 (name "vim-nerdcommenter")
1303 (version (git-version "2.5.2" revision commit))
1308 (url "https://github.com/preservim/nerdcommenter")
1310 (file-name (git-file-name name version))
1312 (base32 "00ir65iv8jfbgzjmj7332fmydh0qhabbhx8zbvd3j6pgfxqpaafw"))))
1313 (build-system copy-build-system)
1316 '(("autoload" "share/vim/vimfiles/")
1317 ("doc" "share/vim/vimfiles/")
1318 ("plugin" "share/vim/vimfiles/"))))
1319 (home-page "https://github.com/preservim/nerdcommenter")
1320 (synopsis "Vim plugin for easy commenting of code")
1322 "NERD commenter is a Vim plugin that provides many different commenting
1323 operations and styles which are invoked via key mappings and a menu. These
1324 operations are available for most filetypes.")
1325 (license license:cc0))))