1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
3 ;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021, 2022 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>
15 ;;; Copyright © 2022 Luis Henrique Gomes Higino <luishenriquegh2701@gmail.com>
17 ;;; This file is part of GNU Guix.
19 ;;; GNU Guix is free software; you can redistribute it and/or modify it
20 ;;; under the terms of the GNU General Public License as published by
21 ;;; the Free Software Foundation; either version 3 of the License, or (at
22 ;;; your option) any later version.
24 ;;; GNU Guix is distributed in the hope that it will be useful, but
25 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
26 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 ;;; GNU General Public License for more details.
29 ;;; You should have received a copy of the GNU General Public License
30 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
32 (define-module (gnu packages vim)
33 #:use-module ((guix licenses) #:prefix license:)
34 #:use-module (guix packages)
35 #:use-module (guix gexp)
36 #:use-module (guix utils)
37 #:use-module (guix download)
38 #:use-module (guix git-download)
39 #:use-module (guix build-system cmake)
40 #:use-module (guix build-system copy)
41 #:use-module (guix build-system gnu)
42 #:use-module (guix build-system python)
43 #:use-module (gnu packages)
44 #:use-module (gnu packages acl)
45 #:use-module (gnu packages admin) ; For GNU hostname
46 #:use-module (gnu packages attr)
47 #:use-module (gnu packages autotools)
48 #:use-module (gnu packages base)
49 #:use-module (gnu packages code)
50 #:use-module (gnu packages enlightenment)
51 #:use-module (gnu packages fontutils)
52 #:use-module (gnu packages gawk)
53 #:use-module (gnu packages gettext)
54 #:use-module (gnu packages glib)
55 #:use-module (gnu packages gperf)
56 #:use-module (gnu packages groff)
57 #:use-module (gnu packages gtk)
58 #:use-module (gnu packages image)
59 #:use-module (gnu packages jemalloc)
60 #:use-module (gnu packages libevent)
61 #:use-module (gnu packages linux)
62 #:use-module (gnu packages lua)
63 #:use-module (gnu packages ncurses)
64 #:use-module (gnu packages perl)
65 #:use-module (gnu packages pkg-config)
66 #:use-module (gnu packages python)
67 #:use-module (gnu packages python-xyz)
68 #:use-module (gnu packages ruby)
69 #:use-module (gnu packages serialization)
70 #:use-module (gnu packages shells)
71 #:use-module (gnu packages tcl)
72 #:use-module (gnu packages text-editors)
73 #:use-module (gnu packages terminals)
74 #:use-module (gnu packages xdisorg)
75 #:use-module (gnu packages xorg))
84 (url "https://github.com/vim/vim")
85 (commit (string-append "v" version))))
86 (file-name (git-file-name name version))
89 "0affh0q6r5cvf01f4m5nr94bq1k23bzhiwa4xlpqim21yipafamm"))))
90 (build-system gnu-build-system)
92 `(#:test-target "test"
95 (modify-phases %standard-phases
96 (add-after 'configure 'patch-absolute-paths
98 (substitute* '("src/testdir/Makefile"
99 "src/testdir/test_filetype.vim"
100 "src/testdir/test_normal.vim"
101 "src/testdir/test_popupwin.vim"
102 "src/testdir/test_shell.vim"
103 "src/testdir/test_terminal.vim"
104 "src/testdir/test_terminal2.vim")
105 (("/bin/sh") (which "sh")))
106 (substitute* "src/testdir/test_autocmd.vim"
107 (("/bin/kill") (which "kill")))))
108 (add-before 'check 'set-environment-variables
109 (lambda* (#:key inputs #:allow-other-keys)
110 ;; One of the tests tests timezone-dependent functions.
112 (search-input-directory inputs "share/zoneinfo"))
114 ;; Make sure the TERM environment variable is set for the tests
115 (setenv "TERM" "xterm")))
116 (add-before 'check 'skip-or-fix-failing-tests
118 ;; This test failure is shared between BSD and Guix.
119 (with-fluids ((%default-port-encoding #f))
120 (substitute* "src/testdir/test_writefile.vim"
121 (("!has\\('bsd'\\)") "0")))
123 ;; These tests check how the terminal looks after executing some
124 ;; actions. The path of the bash binary is shown, which results in
125 ;; a difference being detected. Patching the expected result is
126 ;; non-trivial due to the special format used, so skip the test.
127 (substitute* "src/testdir/test_terminal.vim"
128 ((".*Test_open_term_from_cmd.*" line)
129 (string-append line "return\n"))
130 ((".*Test_terminal_postponed_scrollback.*" line)
131 (string-append line "return\n"))
132 ((".*Test_combining_double_width.*" line)
133 (string-append line "return\n")))
134 (substitute* "src/testdir/test_popupwin.vim"
135 ((".*Test_popup_drag_termwin.*" line)
136 (string-append line "return\n")))))
137 (add-before 'install 'fix-installman.sh
139 (substitute* "src/installman.sh"
142 (add-after 'install 'install-guix.vim
143 (lambda* (#:key inputs outputs #:allow-other-keys)
144 (let ((vimdir (string-append (assoc-ref outputs "out") "/share/vim")))
146 (copy-file (assoc-ref inputs "guix.vim")
147 (string-append vimdir "/vimrc"))))))))
149 (list gawk ncurses perl tcsh)) ; For runtime/tools/vim32
151 `(("libtool" ,libtool)
152 ("guix.vim" ,(search-auxiliary-file "guix.vim"))
155 ("tzdata" ,tzdata-for-tests)))
156 (home-page "https://www.vim.org/")
157 (synopsis "Text editor based on vi")
158 ;; The description shares language with the vim-full package. When making
159 ;; changes, check if the other description also needs to be updated.
161 "Vim is a highly configurable text editor built to enable efficient text
162 editing. It is an improved version of the vi editor distributed with most UNIX
165 Vim is often called a \"programmer's editor,\" and so useful for programming
166 that many consider it an entire IDE. It's not just for programmers, though.
167 Vim is perfect for all kinds of text editing, from composing email to editing
168 configuration files.")
169 (license license:vim)))
172 (package (inherit vim)
176 #:make-flags #~(list (string-append "CC=" #$(cc-for-target)))
177 #:tests? #f ; there are none
179 #~(modify-phases %standard-phases
181 (add-after 'unpack 'chdir
185 (lambda* (#:key outputs #:allow-other-keys)
186 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
187 (install-file "xxd" bin)))))))
190 (synopsis "Hexdump utility from vim")
191 (description "This package provides the Hexdump utility xxd that comes
192 with the editor vim.")))
194 (define-public vim-full
200 (list (string-append "--with-lua-prefix="
201 (assoc-ref %build-inputs "lua"))
202 "--with-features=huge"
203 "--enable-python3interp=yes"
204 "--enable-perlinterp=yes"
205 "--enable-rubyinterp=yes"
206 "--enable-tclinterp=yes"
207 "--enable-luainterp=yes"
214 ,@(substitute-keyword-arguments (package-arguments vim)
215 ;; This flag fixes the following error:
216 ;; .../libpython3.7m.a(pyexpat.o): undefined reference to symbol 'XML_FreeContentModel'
217 ;; .../libexpat.so.1: error adding symbols: DSO missing from command line
218 ((#:make-flags flags)
220 (list "LDFLAGS=-lexpat")
223 `(modify-phases ,phases
224 (add-before 'check 'start-xserver
225 (lambda* (#:key inputs #:allow-other-keys)
226 ;; Some tests require an X server, but does not start one.
227 (let ((xorg-server (assoc-ref inputs "xorg-server"))
229 (setenv "DISPLAY" display)
230 (zero? (system (string-append xorg-server "/bin/Xvfb "
231 display " &")))))))))))
233 (modify-inputs (package-native-inputs vim)
234 (prepend pkg-config xorg-server-for-tests)))
240 ("fontconfig" ,fontconfig)
241 ("freetype" ,freetype)
242 ("gdk-pixbuf" ,gdk-pixbuf)
243 ("gettext" ,gettext-minimal)
247 ("harfbuzz" ,harfbuzz)
252 ("libxdmcp" ,libxdmcp)
261 ,@(package-inputs vim)))
262 ;; The description shares language with the vim package. When making
263 ;; changes, check if the other description also needs to be updated.
264 (description "Vim is a highly configurable text editor built to enable efficient text
265 editing. It is an improved version of the vi editor distributed with most UNIX
268 Vim is often called a \"programmer's editor,\" and so useful for programming
269 that many consider it an entire IDE. It's not just for programmers, though.
270 Vim is perfect for all kinds of text editing, from composing email to editing
273 This package provides a version of Vim with many optional features enabled.
274 It includes a graphical interface, @command{gvim}, and support for plugins
275 written in the Python 3, Perl, Ruby, Tcl, and Lua programming languages.")))
277 (define-public vim-neocomplete
279 (name "vim-neocomplete")
285 (url "https://github.com/Shougo/neocomplete.vim")
286 (commit (string-append "ver." version))))
287 (file-name (git-file-name name version))
290 "1h6sci5mhdfg6sjsjpi8l5li02hg858zcayiwl60y9j2gqnd18lv"))))
291 (build-system copy-build-system)
294 '(("autoload" "share/vim/vimfiles/")
295 ("doc" "share/vim/vimfiles/")
296 ("plugin" "share/vim/vimfiles/"))))
297 (synopsis "Next generation completion framework for Vim")
299 "@code{neocomplete}, an abbreviation of 'neo-completion with cache',
301 It provides keyword completion system by maintaining a cache of keywords in
302 the current buffer. Neocomplete can be customized easily and has many more
303 features than Vim's built-in completion.")
304 (home-page "https://github.com/Shougo/neocomplete.vim/")
305 (license license:expat)))
307 ;; There are no release tarballs.
308 (define-public vim-neosnippet-snippets
309 (let ((commit "8e2b1c0cab9ed9a832b3743dbb65e9966a64331a")
312 (name "vim-neosnippet-snippets")
313 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
318 (url "https://github.com/Shougo/neosnippet-snippets")
320 (file-name (string-append name "-" version "-checkout"))
323 "151wpvbj6jb9jdkbhj3b77f5sq7y328spvwfbqyj1y32rg4ifmc6"))))
324 (build-system copy-build-system)
327 '(("neosnippets" "share/vim/vimfiles/"))))
328 (synopsis "Snippets for neosnippet")
330 "@code{neosnippet-snippets} provides standard snippets for the Vim plugin
331 @code{neosnippet}. Snippets are small templates for commonly used code that
332 you can fill in on the fly.")
333 (home-page "https://github.com/Shougo/neosnippet-snippets")
334 (license license:expat))))
336 ;; The released tarball is too old for our Vim.
337 (define-public vim-neosnippet
338 (let ((commit "1bd7e23c79b73da16eb0c9469b25c376d3594583")
341 (name "vim-neosnippet")
342 (version (string-append "4.2-" revision "." (string-take commit 7)))
347 (url "https://github.com/Shougo/neosnippet.vim/")
349 (file-name (string-append name "-" version "-checkout"))
352 "0k80syscmpnj38ks1fq02ds59g0r4jlg9ll7z4qc048mgi35alw5"))))
353 (build-system copy-build-system)
356 '(("autoload" "share/vim/vimfiles/")
357 ("doc" "share/vim/vimfiles/")
358 ("ftdetect" "share/vim/vimfiles/")
359 ("ftplugin" "share/vim/vimfiles/")
360 ("indent" "share/vim/vimfiles/")
361 ("plugin" "share/vim/vimfiles/")
362 ("rplugin" "share/vim/vimfiles/")
363 ("syntax" "share/vim/vimfiles/"))))
364 (synopsis "Snippet support for Vim")
366 "@code{neosnippet}, is a plugin for Vim which adds snippet support to Vim.
367 Snippets are small templates for commonly used code that you can fill in on
368 the fly. To use snippets can increase your productivity in Vim a lot.
369 The functionality of this plug-in is quite similar to plug-ins like
370 @code{snipMate.vim} or @code{snippetsEmu.vim}. But since you can choose
371 snippets with the neocomplcache / neocomplete interface, you might have less
372 trouble using them, because you do not have to remember each snippet name.")
373 (home-page "https://github.com/Shougo/neosnippet.vim/")
374 (license license:expat))))
376 (define-public vim-scheme
377 (let ((commit "e22fc8e199ef52f2efacd08e71c3add90d83b375")
381 (version (git-version "0.0.0" revision commit))
386 (url "https://git.foldling.org/vim-scheme.git")
388 (file-name (git-file-name name version))
391 "04h946vr4f8wxap3wzqs69y2v8n50g2zbk22jsg2kxr4c01z5cbw"))))
392 (build-system copy-build-system)
395 '(("ftplugin" "share/vim/vimfiles/")
396 ("indent" "share/vim/vimfiles/")
397 ("syntax" "share/vim/vimfiles/"))))
398 (synopsis "Scheme syntax for Vim")
400 "@code{vim-scheme} provides Scheme support for Vim (R7RS and CHICKEN).")
401 (home-page "https://foldling.org/git/vim-scheme.git/")
402 (license license:unlicense))))
404 (define-public vim-luna
405 (let ((commit "633619953dcf8577168e255230f96b05f28d6371")
409 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
414 (url "https://github.com/notpratheek/vim-luna")
416 (file-name (string-append name "-" version "-checkout"))
419 "0ka3qbhsh8lix1vyj4678j7dnchkd8khhirrnn3aylxxf8fpqyg8"))))
420 (build-system copy-build-system)
423 '(("colors" "share/vim/vimfiles/"))))
424 (synopsis "Dark color theme for Vim")
426 "@code{vim-luna} is a dark color theme for Vim.")
427 (home-page "https://github.com/notpratheek/vim-luna")
428 (license license:expat))))
430 ;; There are no tarball releases.
431 (define-public vim-context-filetype
432 (let ((commit "5e85f8cae26806f391aefe2661791a6de53bcea2")
435 (name "vim-context-filetype")
436 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
441 (url "https://github.com/Shougo/context_filetype.vim")
443 (file-name (string-append name "-" version "-checkout"))
446 "0alvrfhmd91zkd9h83s8wvgyq4iakcf6rybsyjd369qbgpcqky89"))))
447 (build-system copy-build-system)
450 '(("doc" "share/vim/vimfiles/")
451 ("autoload" "share/vim/vimfiles/"))))
452 (synopsis "Context filetype library for Vim")
454 "@code{vim-context-filetype} is context filetype library for Vim script.")
455 (home-page "https://github.com/Shougo/context_filetype.vim")
456 (license license:expat)))) ; ??? check again
458 (define-public vim-fugitive
460 (name "vim-fugitive")
466 (url "https://github.com/tpope/vim-fugitive")
467 (commit (string-append "v" version))))
468 (file-name (git-file-name name version))
470 (base32 "138290g2aph1jjhaza6biky5qi4ka6435s01bwxivllgb53g3irc"))))
471 (build-system copy-build-system)
474 '(("autoload" "share/vim/vimfiles/")
475 ("doc" "share/vim/vimfiles/")
476 ("ftdetect" "share/vim/vimfiles/")
477 ("ftplugin" "share/vim/vimfiles/")
478 ("plugin" "share/vim/vimfiles/")
479 ("syntax" "share/vim/vimfiles/"))))
480 (home-page "https://github.com/tpope/vim-fugitive")
481 (synopsis "Vim plugin to work with Git")
482 (description "Vim-fugitive is a wrapper for Vim that complements the
483 command window, where you can stage and review your changes before the next
484 commit or run any Git arbitrary command.")
485 (license license:vim))) ; distributed under the same license as vim
487 (define-public vim-airline
495 (url "https://github.com/vim-airline/vim-airline")
496 (commit (string-append "v" version))))
497 (file-name (git-file-name name version))
500 "1aksmr73648pvyc75pfdz28k2d4ky52rn7xiwcv7lz87q3vqld7k"))))
501 (build-system copy-build-system)
504 '(("autoload" "share/vim/vimfiles/")
505 ("doc" "share/vim/vimfiles/")
506 ("plugin" "share/vim/vimfiles/"))))
507 (synopsis "Statusline for Vim")
509 "@code{vim-airline} is an extensible statusline for Vim.
510 It can be extended and costumized with themes, works with unicode fonts
511 and powerline symbols, etc.")
512 (home-page "https://github.com/vim-airline/vim-airline")
513 (license license:expat)))
515 ;; There are no tarball releases.
516 (define-public vim-airline-themes
517 (let ((commit "e6f233231b232b6027cde6aebeeb18d9138e5324")
520 (name "vim-airline-themes")
521 (version (git-version "0.0.0" revision commit))
526 (url "https://github.com/vim-airline/vim-airline-themes")
528 (file-name (git-file-name name version))
531 "1sb7nb7j7bz0pv1c9bgdy0smhr0jk2b1vbdv9yzghg5lrknpsbr6"))))
532 (build-system copy-build-system)
535 '(("autoload" "share/vim/vimfiles/")
536 ("doc" "share/vim/vimfiles/")
537 ("plugin" "share/vim/vimfiles/"))))
538 (synopsis "Collection of themes for Vim-airline")
540 "@code{vim-airline-themes} is a collection of themes for @code{vim-airline}.")
541 (home-page "https://github.com/vim-airline/vim-airline-themes")
542 (license license:expat))))
544 (define-public vim-syntastic
546 (name "vim-syntastic")
552 (url "https://github.com/vim-syntastic/syntastic")
554 (file-name (git-file-name name version))
556 (base32 "0j91f72jaz1s6aw1hpjiz30vk2ds2aqd9gisk91grsldy6nz6hhz"))))
557 (build-system copy-build-system)
560 '(("autoload" "share/vim/vimfiles/")
561 ("doc" "share/vim/vimfiles/")
562 ("plugin" "share/vim/vimfiles/")
563 ("syntax_checkers" "share/vim/vimfiles/"))))
564 (synopsis "Syntax checking plugin for Vim")
566 "Vim-syntastic is a syntax checking plugin for Vim. It runs files through
567 external syntax checkers and displays any resulting errors to the user. This
568 can be done on demand, or automatically as files are saved. If syntax errors
569 are detected, the user is notified.")
570 (home-page "https://github.com/vim-syntastic/syntastic")
571 (license license:wtfpl2)))
573 (define-public vim-solarized
574 (let ((commit "62f656a02f93c5190a8753159e34b385588d5ff3")
577 (name "vim-solarized")
578 (version (git-version "1.0.0beta1" revision commit))
583 (url "https://github.com/altercation/solarized")
585 (file-name (git-file-name name version))
587 (base32 "0001mz5v3a8zvi3gzmxhi3yrsb6hs7qf6i497arsngnvj2cwn61d"))))
588 (build-system copy-build-system)
591 '(("vim-colors-solarized/colors" "share/vim/vimfiles/")
592 ("vim-colors-solarized/doc" "share/vim/vimfiles/"))))
593 (home-page "https://github.com/altercation/vim-colors-solarized")
594 (synopsis "Solarized color scheme for Vim")
596 "This package provides the Solarized theme as a Vim color scheme.
598 Solarized is a 16-color palette comprising 8 monotones and 8 accent
599 colors. It was designed for use with both terminal and GUI applications, and
600 has a dark and a light mode.
602 Based on CIELAB lightness relationships between colors, this theme reduces
603 brightness contrast but retains contrasting hues based on colorwheel relations
604 for syntax highlighting readability.
606 It keeps the same selective contrast relationships and overall feel when
607 switching between the light and dark background modes.")
608 (license license:expat))))
610 (define-public editorconfig-vim
612 (name "editorconfig-vim")
618 (url "https://github.com/editorconfig/editorconfig-vim")
619 (commit (string-append "v" version))))
620 (file-name (git-file-name name version))
623 "0mp80bi2m56bb93szw87vy6q5s85yk9g91sl4pr51316rgdv5kkv"))))
624 (build-system copy-build-system)
627 '(("autoload" "share/vim/vimfiles/")
628 ("doc" "share/vim/vimfiles/")
629 ("plugin" "share/vim/vimfiles/"))))
630 (home-page "https://editorconfig.org/")
631 (synopsis "EditorConfig plugin for Vim")
632 (description "EditorConfig makes it easy to maintain the correct coding
633 style when switching between different text editors and between different
634 projects. The EditorConfig project maintains a file format and plugins for
635 various text editors which allow this file format to be read and used by those
637 (license license:bsd-2)))
639 (define-public neovim-packer
640 (let ((commit "3a9f9801f683946b9f1047d8f4bf9946c29e927d")
643 (name "neovim-packer")
644 (version (git-version "0.0.0" revision commit))
648 (url "https://github.com/wbthomason/packer.nvim")
650 (file-name (git-file-name name version))
653 "1xn08z3a21mgfvp5i1nv57jnldwxwnl5nkryiff3zc99b1mizigp"))))
654 (build-system copy-build-system)
657 #~'(("lua" "share/nvim/site/pack/guix/start/packer.nvim/")
658 ("doc" "share/nvim/site/pack/guix/start/packer.nvim/"))))
659 (home-page "https://github.com/wbthomason/packer.nvim")
660 (synopsis "Plugin manager for Neovim")
662 "This package provides a plugin manager for Neovim, inspired by Emacs's
663 @code{use-package}. It's written in Lua, supports Luarocks dependencies, and
664 is based on Vim's builtin plugin support.")
665 (license license:expat))))
667 (define-public neovim-syntastic
669 (inherit vim-syntastic)
670 (name "neovim-syntastic")
673 '(("autoload" "share/nvim/site/")
674 ("doc" "share/nvim/site/")
675 ("plugin" "share/nvim/site/")
676 ("syntax_checkers" "share/nvim/site/"))))
677 (synopsis "Syntax checking plugin for Neovim")
679 "Vim-syntastic is a syntax checking plugin for Neovim. It runs files through
680 external syntax checkers and displays any resulting errors to the user. This
681 can be done on demand, or automatically as files are saved. If syntax errors
682 are detected, the user is notified.")))
684 (define-public neovim
691 (url "https://github.com/neovim/neovim")
692 (commit (string-append "v" version))))
693 (file-name (git-file-name name version))
696 "1jn4i4ral79ys06i50bimylm515sfh41z503gj50a74h1ylg0z4w"))))
697 (build-system cmake-build-system)
700 '((srfi srfi-26) (guix build cmake-build-system)
703 #~(list #$@(if (member (if (%current-target-system)
704 (gnu-triplet->nix-system (%current-target-system))
706 (package-supported-systems luajit))
708 '("-DPREFER_LUA:BOOL=YES")))
710 #~(modify-phases %standard-phases
711 (add-after 'unpack 'set-lua-paths
713 (let* ((lua-version "5.1")
714 (lua-cpath-spec (lambda (prefix)
715 (let ((path (string-append
724 (lua-path-spec (lambda (prefix)
725 (let ((path (string-append prefix
728 (string-append path "/?.lua;"
730 (lua-inputs (list (or #$(this-package-input "lua")
731 #$(this-package-input "luajit"))
737 (string-join (map lua-path-spec lua-inputs) ";"))
739 (string-join (map lua-cpath-spec lua-inputs) ";"))
741 (add-after 'unpack 'prevent-embedding-gcc-store-path
743 ;; nvim remembers its build options, including the compiler with
744 ;; its complete path. This adds gcc to the closure of nvim, which
745 ;; doubles its size. We remove the refirence here.
746 (substitute* "cmake/GetCompileFlags.cmake"
747 (("\\$\\{CMAKE_C_COMPILER\\}") "/gnu/store/.../bin/gcc"))
749 (inputs (list libuv-for-luv
755 (if (member (if (%current-target-system)
756 (gnu-triplet->nix-system (%current-target-system))
758 (package-supported-systems luajit))
766 (native-inputs (list pkg-config gettext-minimal gperf))
767 (home-page "https://neovim.io")
768 (synopsis "Fork of vim focused on extensibility and agility")
770 "Neovim is a project that seeks to aggressively
771 refactor Vim in order to:
774 @item Simplify maintenance and encourage contributions
775 @item Split the work between multiple developers
776 @item Enable advanced external UIs without modifications to the core
777 @item Improve extensibility with a new plugin architecture
780 ;; Neovim is licensed under the terms of the Apache 2.0 license,
781 ;; except for parts that were contributed under the Vim license.
782 (license (list license:asl2.0 license:vim))))
792 (url "https://github.com/jeanguyomarch/eovim/")
793 (commit (string-append "v" version))))
794 (file-name (git-file-name name version))
796 (base32 "06b7crmz3wvvq15ncl0jk20s8j1pmna2jin0k5y5n5qxpafbgp3k"))))
797 (build-system cmake-build-system)
799 '(#:tests? #false ;no tests
801 (modify-phases %standard-phases
802 (add-after 'configure 'reference-nvim
803 (lambda* (#:key inputs #:allow-other-keys)
804 (let ((nvim (search-input-file inputs "/bin/nvim")))
805 ;; This substitution should change one line, and replaces the default
806 ;; value in the struct of options with an absolute store reference.
807 (substitute* "../source/src/main.c"
808 (("(^[[:blank:]]+\\.nvim = \")nvim" _ start)
809 (string-append start nvim))))))
810 (add-before 'build 'set-home
811 (lambda _ (setenv "HOME" "/tmp"))))))
815 (list efl msgpack neovim))
816 (home-page "https://github.com/jeanguyomarch/eovim/")
817 (synopsis "EFL GUI for Neovim")
818 (description "Graphical Neovim interface based on the @acronym{EFL, Enlightenment
819 Foundation Libraries} toolkit. Its features include customizable appearance
820 and support for fonts with ligatures.")
821 (license license:expat)))
831 (string-append "https://github.com/vifm/vifm/releases/download/v"
832 version "/vifm-" version ".tar.bz2")
833 (string-append "https://sourceforge.net/projects/vifm/files/vifm/"
834 "vifm-" version ".tar.bz2")))
837 "122ncp319xisxjxcy33bshjib6905bb0aaz0xjdfkkycplz83qlg"))))
838 (build-system gnu-build-system)
840 '(#:configure-flags '("--disable-build-timestamp")
842 (modify-phases %standard-phases
843 (add-after 'patch-source-shebangs 'patch-test-shebangs
845 (substitute* (cons* "src/background.c"
847 (find-files "tests" "\\.c$"))
848 (("/bin/sh") (which "sh"))
849 (("/bin/bash") (which "bash")))
850 ;; This test segfaults
851 (substitute* "tests/Makefile"
853 (add-after 'install 'install-vim-plugin-files
854 (lambda* (#:key outputs #:allow-other-keys)
855 (let* ((out (assoc-ref outputs "out"))
856 (vifm (string-append out "/share/vifm"))
857 (vimfiles (string-append out "/share/vim/vimfiles")))
858 (copy-recursively (string-append vifm "/colors")
859 (string-append vimfiles "/colors"))
860 (copy-recursively (string-append vifm "/vim")
862 (delete-file-recursively (string-append vifm "/colors"))
863 (delete-file-recursively (string-append vifm "/vim"))))))))
865 (list groff)) ; for the documentation
867 (list libx11 ncurses perl))
868 (home-page "https://vifm.info/")
869 (synopsis "Flexible vi-like file manager using ncurses")
870 (description "Vifm is a file manager providing a @command{vi}-like usage
871 experience. It has similar keybindings and modes (e.g. normal, command line,
872 visual). The interface uses ncurses, thus vifm can be used in text-only
873 environments. It supports a wide range of features, some of which are known
874 from the @command{vi}-editor:
877 @item user mappings (almost like in @code{vi})
878 @item ranges in command
880 @item user defined commands (with support for ranges)
882 @item operation undoing/redoing
883 @item fuse file systems support
885 @item multiple files renaming
886 @item support of filename modifiers
887 @item colorschemes support
888 @item file name color according to file type
889 @item path specific colorscheme customization
891 @item operation backgrounding
892 @item customizable file viewers
893 @item handy @code{less}-like preview mode
894 @item filtering out and searching for files using regular expressions
895 @item one or two panes view
897 With the package comes a plugin to use vifm as a vim file selector.")
898 (license license:gpl2+)))
900 (define-public python-pynvim
902 (name "python-pynvim")
906 (uri (pypi-uri "pynvim" version))
909 "13qgwkqbx012j5spis1aw8rb120rw0zphgjy1j58irax8r6j1ikb"))))
910 (build-system python-build-system)
912 (list python-greenlet python-msgpack))
915 (home-page "https://github.com/neovim/pynvim")
916 (synopsis "Python client and plugin host for neovim")
917 (description "Pynvim implements support for python plugins in neovim. It
918 also works as a library for connecting to and scripting neovim processes
919 through its msgpack-rpc API.")
920 (license license:asl2.0)))
922 (define-public vim-guix-vim
924 (name "vim-guix-vim")
929 (url "https://gitlab.com/Efraim/guix.vim")
931 (file-name (git-file-name name version))
934 "080ni4z23qdr8rkrswjqfqfrrcnpn7qdgrg14glwji46wzvwxqyx"))))
935 (build-system copy-build-system)
938 '(("autoload" "share/vim/vimfiles/")
939 ("compiler" "share/vim/vimfiles/")
940 ("doc" "share/vim/vimfiles/")
941 ("indent" "share/vim/vimfiles/")
942 ("ftdetect" "share/vim/vimfiles/")
943 ("ftplugin" "share/vim/vimfiles/")
944 ("plugin" "share/vim/vimfiles/")
945 ("syntax" "share/vim/vimfiles/"))))
946 (home-page "https://gitlab.com/Efraim/guix.vim")
947 (synopsis "Guix integration in Vim")
948 (description "This package provides support for GNU Guix in Vim.")
949 (license license:vim)))
951 (define-public vim-asyncrun
953 (name "vim-asyncrun")
958 (url "https://github.com/skywind3000/asyncrun.vim")
960 (file-name (git-file-name name version))
963 "11zcw0sll6qg6ha0rr6n1cw5v73azvf7ycwn9lgiwa5cj7rrqjf4"))))
964 (build-system copy-build-system)
967 '(("plugin" "share/vim/vimfiles/")
968 ("doc/" "share/vim/vimfiles/doc" #:include ("asyncrun.txt")))))
969 (home-page "https://github.com/skywind3000/asyncrun.vim")
970 (synopsis "Run Async Shell Commands in Vim")
971 (description "This plugin takes the advantage of new APIs in Vim 8 (and
972 NeoVim) to enable you to run shell commands in background and read output in the
973 quickfix window in realtime.")
974 (license license:expat)))
976 (define-public vim-dispatch
978 (name "vim-dispatch")
984 (url "https://github.com/tpope/vim-dispatch")
985 (commit (string-append "v" version))))
986 (file-name (git-file-name name version))
989 "1m8b5mn2zqlphzs6xfwykwmghf6p0wabrhpjmh7vav35jgcxc4wl"))))
990 (build-system copy-build-system)
993 '(("autoload" "share/vim/vimfiles/")
994 ("doc" "share/vim/vimfiles/")
995 ("plugin" "share/vim/vimfiles/"))))
996 (home-page "https://github.com/tpope/vim-dispatch")
997 (synopsis "Asynchronous build and test dispatcher")
998 (description "Leverage the power of Vim's compiler plugins without being
999 bound by synchronicity. Kick off builds and test suites using one of several
1000 asynchronous adapters (including tmux, screen, and a headless mode), and when
1001 the job completes, errors will be loaded and parsed automatically.")
1002 (license license:vim)))
1004 (define-public vim-gemini-vim
1005 ;; No releases have been tagged.
1006 (let ((commit "f300c54174fc0db8fb68f1bc04307b58612e9630")
1009 (name "vim-gemini-vim")
1010 (version (git-version "0.0.0" revision commit))
1015 (url "https://git.sr.ht/~torresjrjr/gemini.vim")
1017 (file-name (git-file-name name version))
1019 (base32 "05ffhhfahjqwxyrqmsinsahrs15wknzl2qbj8mznyv319mn2civ2"))))
1020 (build-system copy-build-system)
1023 '(("ftdetect" "share/vim/vimfiles/")
1024 ("syntax" "share/vim/vimfiles/"))))
1025 (home-page "https://git.sr.ht/~torresjrjr/gemini.vim")
1026 (synopsis "Vim syntax highlighting plugin for Gemini")
1027 (description "This Vim plugin provides a Vim syntax highlighting plugin
1028 for Gemini Text, the text/gemini media type, as defined in the Gemini protocol
1030 (license license:gpl3))))
1032 (define-public vim-eunuch
1033 (let ((commit "33e875b31c8b811a0a47908884a5e2339106bbe8")
1037 (version (git-version "1.2" revision commit))
1042 (url "https://github.com/tpope/vim-eunuch")
1044 (file-name (git-file-name name version))
1047 "1xadb22kd40swmww0qxmmkcpcq6viy8l167pjck5q32hfngll5d3"))))
1048 (build-system copy-build-system)
1051 '(("doc" "share/vim/vimfiles/")
1052 ("plugin" "share/vim/vimfiles/"))))
1053 (home-page "https://github.com/tpope/vim-eunuch")
1054 (synopsis "Vim sugar for the UNIX shell commands")
1055 (description "Vim sugar for the UNIX shell commands that need it the most.
1056 This package includes commands such as @code{SudoWrite} and @code{SudoEdit} and
1057 help working on Vim buffers and the files they reference with one command.")
1058 (license license:vim))))
1060 (define-public vim-slime
1061 ;; No tagged releases.
1062 (let ((commit "a522fed677e50175f52efc5848cc35209af33216")
1066 (version (git-version "0.0.0" revision commit))
1071 (url "https://github.com/jpalardy/vim-slime")
1073 (file-name (git-file-name name version))
1075 (base32 "0k4b629jn6xlxyjxdl3cgm06v9dmx967rqnslv5m82c9kscwpyh4"))))
1076 (build-system copy-build-system)
1079 '(("autoload" "share/vim/vimfiles/")
1080 ("doc" "share/vim/vimfiles/")
1081 ("ftplugin" "share/vim/vimfiles/")
1082 ("plugin" "share/vim/vimfiles/"))))
1083 (home-page "https://technotales.wordpress.com/2007/10/03/like-slime-for-vim/")
1084 (synopsis "Vim plugin to give you some slime")
1085 (description "SLIME is an Emacs plugin to turn Emacs into a Lisp IDE. You
1086 can type text in a file, send it to a live REPL, and avoid having to reload all
1087 your code every time you make a change. @code{Vim-slime} is an attempt at
1088 getting some of these features into Vim. It works with any REPL and isn't tied
1090 (license license:expat))))
1092 (define-public vim-paredit
1093 ;; The last tagged version is from August 2013.
1094 (let ((commit "97d51d099523b37bb35cbcf3564cbfb46e66e4ec")
1097 (name "vim-paredit")
1098 (version (git-version "0.9.11" revision commit))
1103 (url "https://github.com/kovisoft/paredit")
1105 (file-name (git-file-name name version))
1107 (base32 "07d5s20r0ssd7rir45vy0fqlci44gha1a81rcilgar227f3nw328"))))
1108 (build-system copy-build-system)
1111 '(("doc" "share/vim/vimfiles/")
1112 ("plugin" "share/vim/vimfiles/"))))
1113 (home-page "https://github.com/kovisoft/paredit")
1114 (synopsis "Vim plugin for structured editing of Lisp S-expressions")
1116 "Paredit performs structured editing of Lisp S-expressions in Vim.
1117 @code{Paredit.vim} is similar to @code{paredit.el} for Emacs.")
1118 ;; License listed in plugin/paredit.vim.
1119 (license license:public-domain))))
1121 (define-public vim-surround
1123 (name "vim-surround")
1129 (url "https://github.com/tpope/vim-surround")
1130 (commit (string-append "v" version))))
1131 (file-name (git-file-name name version))
1133 (base32 "1b0bd5m5lv1p4d299mrwjfs2gk0zqwyaqdaid9hs9yqlxnr8s5nf"))))
1134 (build-system copy-build-system)
1137 '(("doc" "share/vim/vimfiles/")
1138 ("plugin" "share/vim/vimfiles/"))))
1139 (home-page "https://github.com/tpope/vim-surround")
1140 (synopsis "Vim plugin for easy quoting and parenthesizing")
1142 "Surround.vim is all about \"surroundings\": parentheses, brackets,
1143 quotes, XML tags, and more. The plugin provides mappings to easily delete,
1144 change and add such surroundings in pairs.")
1145 (license license:vim)))
1147 (define-public vim-gnupg
1154 (uri (string-append "https://github.com/jamessan/vim-gnupg/releases/"
1155 "download/v" version
1156 "/vim-gnupg-v" version ".tar.gz"))
1158 (base32 "02w8lgyyh7wgxysvmmcf9ja5c06vrbyh3alzvv97x8cfhrp0skn7"))))
1159 (build-system copy-build-system)
1162 '(("autoload" "share/vim/vimfiles/")
1163 ("doc" "share/vim/vimfiles/")
1164 ("plugin" "share/vim/vimfiles/"))))
1165 (home-page "https://www.vim.org/scripts/script.php?script_id=3645")
1166 (synopsis "Vim plugin for transparent editing of gpg encrypted files")
1168 "This script implements transparent editing of gpg encrypted files. The
1169 filename must have a @code{.gpg}, @code{.pgp} or @code{.asc} suffix. When
1170 opening such a file the content is decrypted, and the content will be encrypted
1171 to all recipients before it is written. This script turns off viminfo,
1172 swapfile, and undofile when editing encrypted files to increase security.")
1174 '((release-monitoring-url . "https://github.com/jamessan/vim-gnupg/releases")))
1175 (license license:gpl2+)))
1177 (define-public vim-ctrlp
1185 (url "https://github.com/ctrlpvim/ctrlp.vim")
1187 (file-name (git-file-name name version))
1189 (base32 "0n68hg59h4rjn0ziqbsh5pr03l3kr98zk54659ny6vq107af1w96"))))
1190 (build-system copy-build-system)
1193 '(("autoload" "share/vim/vimfiles/")
1194 ("doc" "share/vim/vimfiles/")
1195 ("plugin" "share/vim/vimfiles/"))))
1196 (home-page "https://ctrlpvim.github.io/ctrlp.vim/")
1197 (synopsis "Fuzzy file, buffer, mru, tag, etc. finder for Vim")
1201 @item Written in pure Vimscript for MacVim, gVim and Vim 7.0+.
1202 @item Full support for Vim's regexp as search patterns.
1203 @item Built-in @acronym{Most Recently Used, MRU} files monitoring and search.
1204 @item Built-in project's root finder.
1205 @item Open multiple files at once.
1206 @item Create new files and directories.
1207 @item Execute Ex commands on an opening file (jump to a line, to a string or do
1209 @item Optional cross-session caching and history allow for fast initialization.
1210 @item Mappings and usage conform to Vim's conventions.
1212 (license license:vim)))
1214 (define-public vim-mucomplete
1216 (name "vim-mucomplete")
1222 (url "https://github.com/lifepillar/vim-mucomplete")
1223 (commit (string-append "v" version))))
1224 (file-name (git-file-name name version))
1226 (base32 "054g80n09mmxxlh8xaic29bn8bgn3clvv732rymljdyvbj1mlhwd"))))
1227 (build-system copy-build-system)
1230 '(("autoload" "share/vim/vimfiles/")
1231 ("doc" "share/vim/vimfiles/")
1232 ("plugin" "share/vim/vimfiles/"))))
1233 (home-page "https://github.com/lifepillar/vim-mucomplete")
1234 (synopsis "MUcomplete is a minimalist autocompletion plugin for Vim")
1236 "MUcomplete is an implementation of chained (fallback) completion,
1237 whereby several completion methods are attempted one after another until a
1238 result is returned.")
1239 (license license:expat)))
1241 (define-public vim-gitgutter
1242 (let ((commit "256702dd1432894b3607d3de6cd660863b331818")
1245 (name "vim-gitgutter")
1246 (version (git-version "0.0.0" revision commit))
1251 (url "https://github.com/airblade/vim-gitgutter")
1253 (file-name (git-file-name name version))
1255 (base32 "0zpa7cs59a8sq0k3frlf9flpf30jcn239yrpmv40r7nqvxzglbpl"))))
1256 (build-system copy-build-system)
1259 '(("autoload" "share/vim/vimfiles/")
1260 ("doc" "share/vim/vimfiles/")
1261 ("plugin" "share/vim/vimfiles/"))))
1262 (synopsis "Vim plugin which shows a git diff in the sign column")
1264 "A Vim plugin which shows a git diff in the sign column. It shows which
1265 lines have been added, modified, or removed. You can also preview, stage, and
1266 undo individual hunks; and stage partial hunks. The plugin also provides a hunk
1267 text object. The signs are always up to date and the plugin never saves your
1269 (home-page "https://github.com/airblade/vim-gitgutter")
1270 (license license:expat))))
1272 (define-public vim-characterize
1274 (name "vim-characterize")
1280 (url "https://github.com/tpope/vim-characterize")
1281 (commit (string-append "v" version))))
1282 (file-name (git-file-name name version))
1284 (base32 "0ppsbsd696ih40d9f76mdl9sd9y7p2pvm65qmvq4b2zhkv4xbpxz"))))
1285 (build-system copy-build-system)
1288 '(("autoload" "share/vim/vimfiles/")
1289 ("doc" "share/vim/vimfiles/")
1290 ("plugin" "share/vim/vimfiles/"))))
1291 (home-page "https://github.com/tpope/vim-characterize")
1292 (synopsis "Vim plugin for showing Unicode character metadata")
1294 "In Vim, pressing @code{ga} on a character reveals its representation in
1295 decimal, octal, and hex. Characterize.vim modernizes this with the following
1298 @item Unicode character names: @code{U+00A9 COPYRIGHT SYMBOL}
1299 @item Vim digraphs (type after @code{<C-K>} to insert the character):
1300 @code{Co}, @code{cO}
1301 @item Emoji codes: @code{:copyright:}
1302 @item HTML entities: @code{©}
1304 (license license:vim)))
1306 (define-public vim-tagbar
1314 (url "https://github.com/preservim/tagbar")
1315 (commit (string-append "v" version))))
1316 (file-name (git-file-name name version))
1318 (base32 "1fqfs8msmr6d4kpvxqp14sdjvp5fj52q5w5kz71myzcd4kqzmirp"))))
1319 (build-system copy-build-system)
1322 '(("autoload" "share/vim/vimfiles/")
1323 ("doc" "share/vim/vimfiles/")
1324 ("plugin" "share/vim/vimfiles/")
1325 ("syntax" "share/vim/vimfiles/"))
1327 (modify-phases %standard-phases
1328 (add-after 'unpack 'link-universal-ctags
1329 (lambda* (#:key inputs #:allow-other-keys)
1330 (let ((ctags (assoc-ref inputs "universal-ctags")))
1331 (substitute* "autoload/tagbar.vim"
1332 (("(.*)universal-ctags']" all leader)
1333 (string-append all "\n"
1334 leader ctags "/bin/ctags']")))))))))
1336 (list universal-ctags))
1337 (home-page "https://github.com/preservim/tagbar")
1338 (synopsis "Vim plugin that displays tags in a window, ordered by scope")
1340 "Tagbar is a Vim plugin that provides an easy way to browse the tags of
1341 the current file and get an overview of its structure. It does this by creating
1342 a sidebar that displays the ctags-generated tags of the current file, ordered
1343 by their scope. This means that for example methods in C++ are displayed under
1344 the class they are defined in.")
1345 (license license:vim)))
1347 (define-public vim-nerdtree
1349 (name "vim-nerdtree")
1355 (url "https://github.com/preservim/nerdtree")
1357 (file-name (git-file-name name version))
1359 (base32 "1si8qla86ng8cffbmfrk9gss0i3912yw0f1ph4bsiq0kk837lccp"))))
1360 (build-system copy-build-system)
1363 '(("autoload" "share/vim/vimfiles/")
1364 ("doc" "share/vim/vimfiles/")
1365 ("lib" "share/vim/vimfiles/")
1366 ("nerdtree_plugin" "share/vim/vimfiles/")
1367 ("plugin" "share/vim/vimfiles/")
1368 ("syntax" "share/vim/vimfiles/"))))
1369 (home-page "https://github.com/preservim/nerdtree")
1370 (synopsis "Tree explorer plugin for Vim")
1372 "The NERDTree is a file system explorer for the Vim editor. Using this
1373 plugin, users can visually browse complex directory hierarchies, quickly open
1374 files for reading or editing, and perform basic file system operations.")
1375 (license license:wtfpl2)))
1377 (define-public vim-nerdcommenter
1379 (name "vim-nerdcommenter")
1385 (url "https://github.com/preservim/nerdcommenter")
1387 (file-name (git-file-name name version))
1389 (base32 "1ka2rqn7rby55aps3iblh1dcqxm7m7qx72mpkz6y2aaj8mkj0zyd"))))
1390 (build-system copy-build-system)
1394 #~`(("autoload" "share/vim/vimfiles/")
1395 ("doc" "share/vim/vimfiles/")
1396 ("plugin" "share/vim/vimfiles/"))))
1397 (home-page "https://github.com/preservim/nerdcommenter")
1398 (synopsis "Vim plugin for easy commenting of code")
1400 "NERD commenter is a Vim plugin that provides many different commenting
1401 operations and styles which are invoked via key mappings and a menu. These
1402 operations are available for most filetypes.")
1403 (license license:cc0)))