1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
3 ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
4 ;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
5 ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
6 ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
7 ;;; Copyright © 2018, 2019, 2020 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>
12 ;;; This file is part of GNU Guix.
14 ;;; GNU Guix is free software; you can redistribute it and/or modify it
15 ;;; under the terms of the GNU General Public License as published by
16 ;;; the Free Software Foundation; either version 3 of the License, or (at
17 ;;; your option) any later version.
19 ;;; GNU Guix is distributed in the hope that it will be useful, but
20 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
21 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 ;;; GNU General Public License for more details.
24 ;;; You should have received a copy of the GNU General Public License
25 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
27 (define-module (gnu packages vim)
28 #:use-module ((guix licenses) #:prefix license:)
29 #:use-module (guix packages)
30 #:use-module (guix utils)
31 #:use-module (guix download)
32 #:use-module (guix git-download)
33 #:use-module (guix build-system cmake)
34 #:use-module (guix build-system gnu)
35 #:use-module (guix build-system python)
36 #:use-module (gnu packages)
37 #:use-module (gnu packages acl)
38 #:use-module (gnu packages admin) ; For GNU hostname
39 #:use-module (gnu packages attr)
40 #:use-module (gnu packages autotools)
41 #:use-module (gnu packages base)
42 #:use-module (gnu packages fontutils)
43 #:use-module (gnu packages gawk)
44 #:use-module (gnu packages gettext)
45 #:use-module (gnu packages glib)
46 #:use-module (gnu packages gperf)
47 #:use-module (gnu packages groff)
48 #:use-module (gnu packages gtk)
49 #:use-module (gnu packages image)
50 #:use-module (gnu packages jemalloc)
51 #:use-module (gnu packages libevent)
52 #:use-module (gnu packages linux)
53 #:use-module (gnu packages lua)
54 #:use-module (gnu packages ncurses)
55 #:use-module (gnu packages perl)
56 #:use-module (gnu packages pkg-config)
57 #:use-module (gnu packages python)
58 #:use-module (gnu packages python-xyz)
59 #:use-module (gnu packages ruby)
60 #:use-module (gnu packages serialization)
61 #:use-module (gnu packages shells)
62 #:use-module (gnu packages tcl)
63 #:use-module (gnu packages text-editors)
64 #:use-module (gnu packages terminals)
65 #:use-module (gnu packages xdisorg)
66 #:use-module (gnu packages xorg))
75 (url "https://github.com/vim/vim")
76 (commit (string-append "v" version))))
77 (file-name (git-file-name name version))
80 "1559lg8wgydyfc8c2sb2m7p8mlkarm7539qfxkh1skrw4mxi605k"))))
81 (build-system gnu-build-system)
83 `(#:test-target "test"
86 (modify-phases %standard-phases
87 (add-after 'unpack 'disable-CoW
88 ;; Disable copy-on-write (CoW) in the build directory. Tests fail on
89 ;; btrfs (and possibly other CoW file systems) for unclear reasons.
90 ;; This needs to be run early as it only affects newly-created files.
92 (invoke "chattr" "-R" "+C" ".")))
93 (add-after 'configure 'patch-config-files
95 (substitute* "runtime/tools/mve.awk"
96 (("/usr/bin/nawk") (which "gawk")))
97 (substitute* '("src/testdir/Makefile"
98 "src/testdir/test_normal.vim"
99 "src/testdir/test_terminal.vim")
100 (("/bin/sh") (which "sh")))
102 (add-before 'check 'set-TZDIR
103 (lambda* (#:key inputs #:allow-other-keys)
104 ;; One of the tests tests timezone-dependent functions.
106 (string-append (assoc-ref inputs "tzdata")
109 (add-before 'check 'skip-failing-tests
111 ;; This test assumes that PID 1 is run as root and that the user
112 ;; running the test suite does not have permission to kill(1, 0)
113 ;; it. This is not true in the build container, where both PID 1
114 ;; and the test suite are run as the same user. Skip the test.
115 ;; An alternative fix would be to patch the PID used to a random
116 ;; 32-bit value and hope it never shows up in the test environment.
117 (substitute* "src/testdir/test_swap.vim"
118 (("if !IsRoot\\(\\)") "if 0"))
120 ;; This test checks how the terminal looks after executing some
121 ;; actions. The path of the bash binary is shown, which results in
122 ;; a difference being detected. Patching the expected result is
123 ;; non-trivial due to the special format used, so skip the test.
124 (substitute* "src/testdir/test_terminal.vim"
125 ((".*Test_terminal_postponed_scrollback.*" line)
126 (string-append line "return\n")))
132 ("tcsh" ,tcsh))) ; For runtime/tools/vim32
134 `(("libtool" ,libtool)
137 ("e2fsprogs" ,e2fsprogs) ; for chattr in disable-CoW above
138 ("tzdata" ,tzdata-for-tests)))
139 (home-page "https://www.vim.org/")
140 (synopsis "Text editor based on vi")
142 "Vim is a highly configurable text editor built to enable efficient text
143 editing. It is an improved version of the vi editor distributed with most UNIX
146 Vim is often called a \"programmer's editor,\" and so useful for programming
147 that many consider it an entire IDE. It's not just for programmers, though.
148 Vim is perfect for all kinds of text editing, from composing email to editing
149 configuration files.")
150 (license license:vim)))
153 (package (inherit vim)
156 `(#:make-flags '("CC=gcc")
157 #:tests? #f ; there are none
159 (modify-phases %standard-phases
161 (add-after 'unpack 'chdir
166 (lambda* (#:key outputs #:allow-other-keys)
167 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
168 (install-file "xxd" bin)
172 (synopsis "Hexdump utility from vim")
173 (description "This package provides the Hexdump utility xxd that comes
174 with the editor vim.")))
176 (define-public vim-full
178 ;; This package should share its source with Vim, but it doesn't
179 ;; build reliably, and we want to keep Vim up to date due to the
180 ;; frequency of important bug fixes.
185 (list (string-append "--with-lua-prefix="
186 (assoc-ref %build-inputs "lua"))
187 "--with-features=huge"
188 "--enable-python3interp=yes"
189 "--enable-perlinterp=yes"
190 "--enable-rubyinterp=yes"
191 "--enable-tclinterp=yes"
192 "--enable-luainterp=yes"
199 ;; This flag fixes the following error:
200 ;; .../libpython3.7m.a(pyexpat.o): undefined reference to symbol 'XML_FreeContentModel'
201 ;; .../libexpat.so.1: error adding symbols: DSO missing from command line
202 #:make-flags '("LDFLAGS=-lexpat")
203 ,@(substitute-keyword-arguments (package-arguments vim)
205 `(modify-phases ,phases
206 (add-before 'check 'skip-previewpopup
207 ;; This test fails when the path to the source is long. See:
208 ;; https://github.com/vim/vim/issues/5615
210 (substitute* "src/testdir/test_popupwin.vim"
211 ((".*Test_previewpopup.*" line)
212 (string-append line "return\n")))))
213 (add-before 'check 'skip-test87
214 ;; This test fails for unknown reasons after switching
215 ;; to a git checkout.
217 (delete-file "src/testdir/test87.ok")
218 (delete-file "src/testdir/test87.in")
219 (substitute* '("src/Makefile"
220 "src/testdir/Make_vms.mms")
222 (substitute* "src/testdir/Make_all.mak"
223 (("test86.out \\\\") "test86")
226 (add-before 'check 'start-xserver
227 (lambda* (#:key inputs #:allow-other-keys)
228 ;; Some tests require an X server, but does not start one.
229 (let ((xorg-server (assoc-ref inputs "xorg-server"))
231 (setenv "DISPLAY" display)
232 (zero? (system (string-append xorg-server "/bin/Xvfb "
233 display " &")))))))))))
235 `(("pkg-config" ,pkg-config)
236 ("xorg-server" ,xorg-server-for-tests)
237 ,@(package-native-inputs vim)))
243 ("fontconfig" ,fontconfig)
244 ("freetype" ,freetype)
245 ("gdk-pixbuf" ,gdk-pixbuf)
246 ("gettext" ,gettext-minimal)
250 ("harfbuzz" ,harfbuzz)
255 ("libxdmcp" ,libxdmcp)
264 ,@(package-inputs vim)))))
266 (define-public vim-neocomplete
268 (name "vim-neocomplete")
274 (url "https://github.com/Shougo/neocomplete.vim")
275 (commit (string-append "ver." version))))
276 (file-name (git-file-name name version))
279 "1h6sci5mhdfg6sjsjpi8l5li02hg858zcayiwl60y9j2gqnd18lv"))))
280 (build-system gnu-build-system)
284 (modify-phases %standard-phases
288 (lambda* (#:key outputs #:allow-other-keys)
289 (let* ((out (assoc-ref outputs "out"))
290 (vimfiles (string-append out "/share/vim/vimfiles"))
291 (autoload (string-append vimfiles "/autoload"))
292 (doc (string-append vimfiles "/doc"))
293 (plugin (string-append vimfiles "/plugin")))
294 (copy-recursively "autoload" autoload)
295 (copy-recursively "doc" doc)
296 (copy-recursively "plugin" plugin)
298 (synopsis "Next generation completion framework for Vim")
300 "@code{neocomplete}, an abbreviation of 'neo-completion with cache',
302 It provides keyword completion system by maintaining a cache of keywords in
303 the current buffer. Neocomplete can be customized easily and has many more
304 features than Vim's built-in completion.")
305 (home-page "https://github.com/Shougo/neocomplete.vim/")
306 (license license:expat)))
308 ;; There are no release tarballs.
309 (define-public vim-neosnippet-snippets
310 (let ((commit "8e2b1c0cab9ed9a832b3743dbb65e9966a64331a")
313 (name "vim-neosnippet-snippets")
314 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
319 (url "https://github.com/Shougo/neosnippet-snippets")
321 (file-name (string-append name "-" version "-checkout"))
324 "151wpvbj6jb9jdkbhj3b77f5sq7y328spvwfbqyj1y32rg4ifmc6"))))
325 (build-system gnu-build-system)
329 (modify-phases %standard-phases
333 (lambda* (#:key outputs #:allow-other-keys)
334 (let* ((out (assoc-ref outputs "out"))
335 (vimfiles (string-append out "/share/vim/vimfiles")))
336 (copy-recursively "neosnippets"
337 (string-append vimfiles "/neosnippets"))
339 (synopsis "Snippets for neosnippet")
341 "@code{neosnippet-snippets} provides standard snippets for the Vim plugin
342 @code{neosnippet}. Snippets are small templates for commonly used code that
343 you can fill in on the fly.")
344 (home-page "https://github.com/Shougo/neosnippet-snippets")
345 (license license:expat))))
347 ;; The released tarball is too old for our Vim.
348 (define-public vim-neosnippet
349 (let ((commit "1bd7e23c79b73da16eb0c9469b25c376d3594583")
352 (name "vim-neosnippet")
353 (version (string-append "4.2-" revision "." (string-take commit 7)))
358 (url "https://github.com/Shougo/neosnippet.vim/")
360 (file-name (string-append name "-" version "-checkout"))
363 "0k80syscmpnj38ks1fq02ds59g0r4jlg9ll7z4qc048mgi35alw5"))))
364 (build-system gnu-build-system)
368 (modify-phases %standard-phases
372 (lambda* (#:key outputs #:allow-other-keys)
373 (let* ((out (assoc-ref outputs "out"))
374 (vimfiles (string-append out "/share/vim/vimfiles"))
375 (autoload (string-append vimfiles "/autoload"))
376 (doc (string-append vimfiles "/doc"))
377 (ftdetect (string-append vimfiles "/ftdetect"))
378 (ftplugin (string-append vimfiles "/ftplugin"))
379 (indent (string-append vimfiles "/indent"))
380 (plugin (string-append vimfiles "/plugin"))
381 (rplugin (string-append vimfiles "/rplugin"))
382 (syntax (string-append vimfiles "/syntax")))
383 (copy-recursively "autoload" autoload)
384 (copy-recursively "doc" doc)
385 (copy-recursively "ftdetect" ftdetect)
386 (copy-recursively "ftplugin" ftplugin)
387 (copy-recursively "indent" indent)
388 (copy-recursively "plugin" plugin)
389 (copy-recursively "rplugin" rplugin)
390 (copy-recursively "syntax" syntax)
392 (synopsis "Snippet support for Vim")
394 "@code{neosnippet}, is a plugin for Vim which adds snippet support to Vim.
395 Snippets are small templates for commonly used code that you can fill in on
396 the fly. To use snippets can increase your productivity in Vim a lot.
397 The functionality of this plug-in is quite similar to plug-ins like
398 @code{snipMate.vim} or @code{snippetsEmu.vim}. But since you can choose
399 snippets with the neocomplcache / neocomplete interface, you might have less
400 trouble using them, because you do not have to remember each snippet name.")
401 (home-page "https://github.com/Shougo/neosnippet.vim/")
402 (license license:expat))))
404 (define-public vim-scheme
405 (let ((commit "93827987c10f2d5dc519166a761f219204926d5f")
409 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
414 (url "http://git.foldling.org/vim-scheme.git")
416 (file-name (string-append name "-" version "-checkout"))
419 "1ynjr1109dxgj0lz261gmzz3wf5ap1m6j6hnvl3lcyv66a4y8pjv"))))
420 (build-system gnu-build-system)
424 (modify-phases %standard-phases
428 (lambda* (#:key outputs #:allow-other-keys)
429 (let* ((out (assoc-ref outputs "out"))
430 (vimfiles (string-append out "/share/vim/vimfiles"))
431 (after (string-append vimfiles "/after"))
432 (syntax (string-append vimfiles "/syntax"))
433 (ftplugin (string-append vimfiles "/ftplugin")))
434 (copy-recursively "after" after)
435 (copy-recursively "ftplugin" ftplugin)
436 (copy-recursively "syntax" syntax)
438 (synopsis "Scheme syntax for Vim")
440 "@code{vim-scheme} provides Scheme support for Vim (R7RS and CHICKEN).")
441 (home-page "http://foldling.org/git/vim-scheme.git/")
442 (license license:public-domain))))
444 (define-public vim-luna
445 (let ((commit "633619953dcf8577168e255230f96b05f28d6371")
449 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
454 (url "https://github.com/notpratheek/vim-luna")
456 (file-name (string-append name "-" version "-checkout"))
459 "0ka3qbhsh8lix1vyj4678j7dnchkd8khhirrnn3aylxxf8fpqyg8"))))
460 (build-system gnu-build-system)
464 (modify-phases %standard-phases
468 (lambda* (#:key outputs #:allow-other-keys)
469 (let* ((out (assoc-ref outputs "out"))
470 (vimfiles (string-append out "/share/vim/vimfiles"))
471 (colors (string-append vimfiles "/colors")))
472 (copy-recursively "colors" colors)
474 (synopsis "Dark color theme for Vim")
476 "@code{vim-luna} is a dark color theme for Vim.")
477 (home-page "https://github.com/notpratheek/vim-luna")
478 (license license:expat))))
480 ;; There are no tarball releases.
481 (define-public vim-context-filetype
482 (let ((commit "5e85f8cae26806f391aefe2661791a6de53bcea2")
485 (name "vim-context-filetype")
486 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
491 (url "https://github.com/Shougo/context_filetype.vim")
493 (file-name (string-append name "-" version "-checkout"))
496 "0alvrfhmd91zkd9h83s8wvgyq4iakcf6rybsyjd369qbgpcqky89"))))
497 (build-system gnu-build-system)
501 (modify-phases %standard-phases
505 (lambda* (#:key outputs #:allow-other-keys)
506 (let* ((out (assoc-ref outputs "out"))
507 (vimfiles (string-append out "/share/vim/vimfiles"))
508 (doc (string-append vimfiles "/doc"))
509 (autoload (string-append vimfiles "/autoload")))
510 (copy-recursively "doc" doc)
511 (copy-recursively "autoload" autoload)
513 (synopsis "Context filetype library for Vim")
515 "@code{vim-context-filetype} is context filetype library for Vim script.")
516 (home-page "https://github.com/Shougo/context_filetype.vim")
517 (license license:expat)))) ; ??? check again
519 (define-public vim-fugitive
521 (name "vim-fugitive")
527 (url "https://github.com/tpope/vim-fugitive.git")
528 (commit (string-append "v" version))))
529 (file-name (git-file-name name version))
532 "1jbn5jxadccmcz01j94d0i1bp74cixr0fpxxf1h0aqdf1ljk3d7n"))))
533 (build-system gnu-build-system)
537 (modify-phases %standard-phases
541 (lambda* (#:key outputs #:allow-other-keys)
542 (let* ((out (assoc-ref outputs "out"))
543 (vimfiles (string-append out "/share/vim/vimfiles"))
544 (autoload (string-append vimfiles "/autoload"))
545 (doc (string-append vimfiles "/doc"))
546 (ftdetect (string-append vimfiles "/ftdetect"))
547 (plugin (string-append vimfiles "/plugin"))
548 (syntax (string-append vimfiles "/syntax")))
549 (copy-recursively "autoload" autoload)
550 (copy-recursively "doc" doc)
551 (copy-recursively "ftdetect" ftdetect)
552 (copy-recursively "plugin" plugin)
553 (copy-recursively "syntax" syntax)
555 (home-page "https://github.com/tpope/vim-fugitive")
556 (synopsis "Vim plugin to work with Git")
557 (description "Vim-fugitive is a wrapper for Vim that complements the
558 command window, where you can stage and review your changes before the next
559 commit or run any Git arbitrary command.")
560 (license license:vim))) ; distributed under the same license as vim
562 (define-public vim-airline
570 (url "https://github.com/vim-airline/vim-airline")
571 (commit (string-append "v" version))))
572 (file-name (git-file-name name version))
575 "1aksmr73648pvyc75pfdz28k2d4ky52rn7xiwcv7lz87q3vqld7k"))))
576 (build-system gnu-build-system)
580 (modify-phases %standard-phases
584 (lambda* (#:key outputs #:allow-other-keys)
585 (let* ((out (assoc-ref outputs "out"))
586 (vimfiles (string-append out "/share/vim/vimfiles"))
587 (autoload (string-append vimfiles "/autoload"))
588 (doc (string-append vimfiles "/doc"))
589 (t (string-append vimfiles "/t"))
590 (plugin (string-append vimfiles "/plugin")))
591 (copy-recursively "autoload" autoload)
592 (copy-recursively "doc" doc)
593 (copy-recursively "plugin" plugin)
594 (copy-recursively "t" t)
596 (synopsis "Statusline for Vim")
598 "@code{vim-airline} is an extensible statusline for Vim.
599 It can be extended and costumized with themes, works with unicode fonts
600 and powerline symbols, etc.")
601 (home-page "https://github.com/vim-airline/vim-airline")
602 (license license:expat)))
604 ;; There are no tarball releases.
605 (define-public vim-airline-themes
606 (let ((commit "e6f233231b232b6027cde6aebeeb18d9138e5324")
609 (name "vim-airline-themes")
610 (version (git-version "0.0.0" revision commit))
615 (url "https://github.com/vim-airline/vim-airline-themes")
617 (file-name (git-file-name name version))
620 "1sb7nb7j7bz0pv1c9bgdy0smhr0jk2b1vbdv9yzghg5lrknpsbr6"))))
621 (build-system gnu-build-system)
625 (modify-phases %standard-phases
629 (lambda* (#:key outputs #:allow-other-keys)
630 (let* ((out (assoc-ref outputs "out"))
631 (vimfiles (string-append out "/share/vim/vimfiles"))
632 (doc (string-append vimfiles "/doc"))
633 (plugin (string-append vimfiles "/plugin"))
634 (autoload (string-append vimfiles "/autoload")))
635 (copy-recursively "doc" doc)
636 (copy-recursively "autoload" autoload)
637 (copy-recursively "plugin" plugin)
639 (synopsis "Collection of themes for Vim-airline")
641 "@code{vim-airline-themes} is a collection of themes for @code{vim-airline}.")
642 (home-page "https://github.com/vim-airline/vim-airline-themes")
643 (license license:expat))))
645 (define-public vim-syntastic
647 (name "vim-syntastic")
653 (url "https://github.com/vim-syntastic/syntastic")
655 (file-name (git-file-name name version))
657 (base32 "0j91f72jaz1s6aw1hpjiz30vk2ds2aqd9gisk91grsldy6nz6hhz"))))
658 (build-system gnu-build-system)
662 (modify-phases %standard-phases
666 (lambda* (#:key outputs #:allow-other-keys)
667 (let* ((out (assoc-ref outputs "out"))
668 (vimfiles (string-append out "/share/vim/vimfiles"))
669 (doc (string-append vimfiles "/doc"))
670 (plugin (string-append vimfiles "/plugin"))
671 (autoload (string-append vimfiles "/autoload"))
672 (syntax-checkers (string-append vimfiles "/syntax_checkers")))
673 (copy-recursively "doc" doc)
674 (copy-recursively "autoload" autoload)
675 (copy-recursively "plugin" plugin)
676 (copy-recursively "syntax_checkers" syntax-checkers)
678 (synopsis "Syntax checking plugin for Vim")
680 "Vim-syntastic is a syntax checking plugin for Vim. It runs files through
681 external syntax checkers and displays any resulting errors to the user. This
682 can be done on demand, or automatically as files are saved. If syntax errors
683 are detected, the user is notified.")
684 (home-page "https://github.com/vim-syntastic/syntastic")
685 (license license:wtfpl2)))
687 (define-public editorconfig-vim
689 (name "editorconfig-vim")
695 (url "https://github.com/editorconfig/editorconfig-vim.git")
696 (commit (string-append "v" version))))
697 (file-name (git-file-name name version))
700 "0vssfl1wjq0mv0p30c3dszwrh4yy90vwxmmdgqaxf5rykik7bdfd"))
701 (modules '((guix build utils)))
704 (delete-file-recursively "plugin/editorconfig-core-py") #t))))
705 (build-system gnu-build-system)
707 '(#:tests? #f ; tests require ruby and plugin-test repository
709 (modify-phases %standard-phases
712 (add-after 'unpack 'patch-editorconfig-path
713 (lambda* (#:key inputs #:allow-other-keys)
714 (let ((editorconfig (assoc-ref inputs "editorconfig-core")))
715 (substitute* "plugin/editorconfig.vim"
716 (("/opt") editorconfig))
719 (lambda* (#:key outputs #:allow-other-keys)
720 (let* ((out (assoc-ref outputs "out"))
721 (vimfiles (string-append out "/share/vim/vimfiles"))
722 (doc (string-append vimfiles "/doc"))
723 (plugin (string-append vimfiles "/plugin"))
724 (autoload (string-append vimfiles "/autoload")))
725 (copy-recursively "doc" doc)
726 (copy-recursively "autoload" autoload)
727 (copy-recursively "plugin" plugin)
730 `(("editorconfig-core" ,editorconfig-core-c)))
731 (home-page "https://editorconfig.org/")
732 (synopsis "EditorConfig plugin for Vim")
733 (description "EditorConfig makes it easy to maintain the correct coding
734 style when switching between different text editors and between different
735 projects. The EditorConfig project maintains a file format and plugins for
736 various text editors which allow this file format to be read and used by those
738 (license license:bsd-2)))
740 (define-public neovim-syntastic
742 (inherit vim-syntastic)
743 (name "neovim-syntastic")
747 (modify-phases %standard-phases
751 (lambda* (#:key outputs #:allow-other-keys)
752 (let* ((out (assoc-ref outputs "out"))
753 (vimfiles (string-append out "/share/nvim/site"))
754 (doc (string-append vimfiles "/doc"))
755 (plugin (string-append vimfiles "/plugin"))
756 (autoload (string-append vimfiles "/autoload"))
757 (syntax-checkers (string-append vimfiles "/syntax_checkers")))
758 (copy-recursively "doc" doc)
759 (copy-recursively "autoload" autoload)
760 (copy-recursively "plugin" plugin)
761 (copy-recursively "syntax_checkers" syntax-checkers)
763 (synopsis "Syntax checking plugin for Neovim")
765 "Vim-syntastic is a syntax checking plugin for Neovim. It runs files through
766 external syntax checkers and displays any resulting errors to the user. This
767 can be done on demand, or automatically as files are saved. If syntax errors
768 are detected, the user is notified.")))
770 (define-public neovim
778 (url "https://github.com/neovim/neovim")
779 (commit (string-append "v" version))))
780 (file-name (git-file-name name version))
782 (base32 "03p7pic7hw9yxxv7fbgls1f42apx3lik2k6mpaz1a109ngyc5kaj"))))
783 (build-system cmake-build-system)
785 `(#:modules ((srfi srfi-26)
786 (guix build cmake-build-system)
788 #:configure-flags '("-DPREFER_LUA:BOOL=YES")
790 (modify-phases %standard-phases
791 (add-after 'unpack 'set-lua-paths
792 (lambda* (#:key inputs #:allow-other-keys)
793 (let* ((lua-version "5.1")
796 (let ((path (string-append prefix "/lib/lua/" lua-version)))
797 (string-append path "/?.so;" path "/?/?.so"))))
800 (let ((path (string-append prefix "/share/lua/" lua-version)))
801 (string-append path "/?.lua;" path "/?/?.lua"))))
802 (lua-inputs (map (cute assoc-ref %build-inputs <>)
809 (string-join (map lua-path-spec lua-inputs) ";"))
811 (string-join (map lua-cpath-spec lua-inputs) ";"))
813 (add-after 'unpack 'prevent-embedding-gcc-store-path
815 ;; nvim remembers its build options, including the compiler with
816 ;; its complete path. This adds gcc to the closure of nvim, which
817 ;; doubles its size. We remove the refirence here.
818 (substitute* "cmake/GetCompileFlags.cmake"
819 (("\\$\\{CMAKE_C_COMPILER\\}") "/gnu/store/.../bin/gcc"))
824 ("libtermkey" ,libtermkey)
825 ("libvterm" ,libvterm)
826 ("unibilium" ,unibilium)
827 ("jemalloc" ,jemalloc)
828 ("libiconv" ,libiconv)
830 ("lua-luv" ,lua5.1-luv)
831 ("lua-lpeg" ,lua5.1-lpeg)
832 ("lua-bitop" ,lua5.1-bitop)
833 ("lua-libmpack" ,lua5.1-libmpack)))
835 `(("pkg-config" ,pkg-config)
836 ("gettext" ,gettext-minimal)
838 (home-page "https://neovim.io")
839 (synopsis "Fork of vim focused on extensibility and agility")
840 (description "Neovim is a project that seeks to aggressively
841 refactor Vim in order to:
844 @item Simplify maintenance and encourage contributions
845 @item Split the work between multiple developers
846 @item Enable advanced external UIs without modifications to the core
847 @item Improve extensibility with a new plugin architecture
849 ;; Neovim is licensed under the terms of the Apache 2.0 license,
850 ;; except for parts that were contributed under the Vim license.
851 (license (list license:asl2.0 license:vim))))
861 (string-append "https://github.com/vifm/vifm/releases/download/v"
862 version "/vifm-" version ".tar.bz2")
863 (string-append "https://sourceforge.net/projects/vifm/files/vifm/"
864 "vifm-" version ".tar.bz2")))
867 "0fyhxh7ndjn8fyjhj14ymkr3pjcs3k1xbs43g7xvvq85vdb6y04r"))))
868 (build-system gnu-build-system)
870 '(#:configure-flags '("--disable-build-timestamp")
872 (modify-phases %standard-phases
873 (add-after 'patch-source-shebangs 'patch-test-shebangs
875 (substitute* (cons* "src/background.c"
877 (find-files "tests" "\\.c$"))
878 (("/bin/sh") (which "sh"))
879 (("/bin/bash") (which "bash")))
880 ;; This test segfaults
881 (substitute* "tests/Makefile"
884 (add-after 'install 'install-vim-plugin-files
885 (lambda* (#:key outputs #:allow-other-keys)
886 (let* ((out (assoc-ref outputs "out"))
887 (vifm (string-append out "/share/vifm"))
888 (vimfiles (string-append out "/share/vim/vimfiles")))
889 (copy-recursively (string-append vifm "/colors")
890 (string-append vimfiles "/colors"))
891 (copy-recursively (string-append vifm "/vim")
893 (delete-file-recursively (string-append vifm "/colors"))
894 (delete-file-recursively (string-append vifm "/vim")))
897 `(("groff" ,groff))) ; for the documentation
902 (home-page "https://vifm.info/")
903 (synopsis "Flexible vi-like file manager using ncurses")
904 (description "Vifm is a file manager providing a @command{vi}-like usage
905 experience. It has similar keybindings and modes (e.g. normal, command line,
906 visual). The interface uses ncurses, thus vifm can be used in text-only
907 environments. It supports a wide range of features, some of which are known
908 from the @command{vi}-editor:
911 @item user mappings (almost like in @code{vi})
912 @item ranges in command
914 @item user defined commands (with support for ranges)
916 @item operation undoing/redoing
917 @item fuse file systems support
919 @item multiple files renaming
920 @item support of filename modifiers
921 @item colorschemes support
922 @item file name color according to file type
923 @item path specific colorscheme customization
925 @item operation backgrounding
926 @item customizable file viewers
927 @item handy @code{less}-like preview mode
928 @item filtering out and searching for files using regular expressions
929 @item one or two panes view
931 With the package comes a plugin to use vifm as a vim file selector.")
932 (license license:gpl2+)))
934 (define-public python-pynvim
936 (name "python-pynvim")
940 (uri (pypi-uri "pynvim" version))
943 "01dybk4vs452pljn1q3il5z2sd313ki0lgiglc0xmjc6wp290r6g"))))
944 (build-system python-build-system)
946 `(("python-greenlet" ,python-greenlet)
947 ("python-msgpack" ,python-msgpack)))
950 (home-page "https://github.com/neovim/pynvim")
951 (synopsis "Python client and plugin host for neovim")
952 (description "Pynvim implements support for python plugins in neovim. It
953 also works as a library for connecting to and scripting neovim processes
954 through its msgpack-rpc API.")
955 (license license:asl2.0)))
957 (define-public python2-pynvim
958 (package-with-python2 python-pynvim))
960 (define-public vim-guix-vim
962 (name "vim-guix-vim")
967 (url "https://gitlab.com/Efraim/guix.vim")
969 (file-name (git-file-name name version))
972 "1f8h8m96fqh3f9hy87spgh9kdqzyxl11n9s3rywvyq5xhn489bnk"))))
973 (build-system gnu-build-system)
977 (modify-phases %standard-phases
981 (lambda* (#:key outputs #:allow-other-keys)
982 (let* ((out (assoc-ref outputs "out"))
983 (vimfiles (string-append out "/share/vim/vimfiles")))
986 (copy-recursively dir (string-append vimfiles "/" dir)))
987 '("compiler" "doc" "indent" "ftdetect" "ftplugin" "syntax"))
989 (home-page "https://gitlab.com/Efraim/guix.vim")
990 (synopsis "Guix integration in Vim")
991 (description "This package provides support for GNU Guix in Vim.")
992 (license license:vim)))