gnu: vim: Update to 8.2.1101.
[jackhill/guix/guix.git] / gnu / packages / vim.scm
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 Nikita <nikita@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>
11 ;;; Copyright © 2020 Jack Hill <jackhill@jackhill.us>
12 ;;;
13 ;;; This file is part of GNU Guix.
14 ;;;
15 ;;; GNU Guix is free software; you can redistribute it and/or modify it
16 ;;; under the terms of the GNU General Public License as published by
17 ;;; the Free Software Foundation; either version 3 of the License, or (at
18 ;;; your option) any later version.
19 ;;;
20 ;;; GNU Guix is distributed in the hope that it will be useful, but
21 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 ;;; GNU General Public License for more details.
24 ;;;
25 ;;; You should have received a copy of the GNU General Public License
26 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
27
28 (define-module (gnu packages vim)
29 #:use-module ((guix licenses) #:prefix license:)
30 #:use-module (guix packages)
31 #:use-module (guix utils)
32 #:use-module (guix download)
33 #:use-module (guix git-download)
34 #:use-module (guix build-system cmake)
35 #:use-module (guix build-system copy)
36 #:use-module (guix build-system gnu)
37 #:use-module (guix build-system python)
38 #:use-module (gnu packages)
39 #:use-module (gnu packages acl)
40 #:use-module (gnu packages admin) ; For GNU hostname
41 #:use-module (gnu packages attr)
42 #:use-module (gnu packages autotools)
43 #:use-module (gnu packages base)
44 #:use-module (gnu packages fontutils)
45 #:use-module (gnu packages gawk)
46 #:use-module (gnu packages gettext)
47 #:use-module (gnu packages glib)
48 #:use-module (gnu packages gperf)
49 #:use-module (gnu packages groff)
50 #:use-module (gnu packages gtk)
51 #:use-module (gnu packages image)
52 #:use-module (gnu packages jemalloc)
53 #:use-module (gnu packages libevent)
54 #:use-module (gnu packages linux)
55 #:use-module (gnu packages lua)
56 #:use-module (gnu packages ncurses)
57 #:use-module (gnu packages perl)
58 #:use-module (gnu packages pkg-config)
59 #:use-module (gnu packages python)
60 #:use-module (gnu packages python-xyz)
61 #:use-module (gnu packages ruby)
62 #:use-module (gnu packages serialization)
63 #:use-module (gnu packages shells)
64 #:use-module (gnu packages tcl)
65 #:use-module (gnu packages text-editors)
66 #:use-module (gnu packages terminals)
67 #:use-module (gnu packages xdisorg)
68 #:use-module (gnu packages xorg))
69
70 (define-public vim
71 (package
72 (name "vim")
73 (version "8.2.1101")
74 (source (origin
75 (method git-fetch)
76 (uri (git-reference
77 (url "https://github.com/vim/vim")
78 (commit (string-append "v" version))))
79 (file-name (git-file-name name version))
80 (sha256
81 (base32
82 "170k855vscixnk6rz01i3k22crjiz8b2h83fnm2b2ccha0jyn9mf"))))
83 (build-system gnu-build-system)
84 (arguments
85 `(#:test-target "test"
86 #:parallel-tests? #f
87 #:phases
88 (modify-phases %standard-phases
89 (add-after 'configure 'patch-config-files
90 (lambda _
91 (substitute* "runtime/tools/mve.awk"
92 (("/usr/bin/nawk") (which "gawk")))
93 (substitute* '("src/testdir/Makefile"
94 "src/testdir/test_normal.vim"
95 "src/testdir/test_system.vim"
96 "src/testdir/test_terminal.vim")
97 (("/bin/sh") (which "sh")))
98 (substitute* "src/testdir/test_autocmd.vim"
99 (("/bin/kill") (which "kill")))
100 #t))
101 (add-before 'check 'set-environment-variables
102 (lambda* (#:key inputs #:allow-other-keys)
103 ;; One of the tests tests timezone-dependent functions.
104 (setenv "TZDIR"
105 (string-append (assoc-ref inputs "tzdata")
106 "/share/zoneinfo"))
107
108 ;; Make sure the TERM environment variable is set for the tests
109 (setenv "TERM" "xterm")
110 #t))
111 (add-before 'check 'skip-failing-tests
112 (lambda _
113 ;; This test assumes that PID 1 is run as root and that the user
114 ;; running the test suite does not have permission to kill(1, 0)
115 ;; it. This is not true in the build container, where both PID 1
116 ;; and the test suite are run as the same user. Skip the test.
117 ;; An alternative fix would be to patch the PID used to a random
118 ;; 32-bit value and hope it never shows up in the test environment.
119 (substitute* "src/testdir/test_swap.vim"
120 (("if !IsRoot\\(\\)") "if 0"))
121
122 ;; These tests fail on upstream's CI on FreeBSD because they are
123 ;; run as root. They fail for us because PID 1 and the test suite
124 ;; are run by the same user.
125 (substitute* '("src/testdir/test_backup.vim"
126 "src/testdir/test_writefile.vim")
127 (("CheckNotBSD") "throw 'Skipped: this test fails on Guix'")
128 (("'bsd'") "'unix'"))
129
130 ;; This test checks how the terminal looks after executing some
131 ;; actions. The path of the bash binary is shown, which results in
132 ;; a difference being detected. Patching the expected result is
133 ;; non-trivial due to the special format used, so skip the test.
134 (substitute* "src/testdir/test_terminal.vim"
135 ((".*Test_terminal_postponed_scrollback.*" line)
136 (string-append line "return\n")))
137 #t)))))
138 (inputs
139 `(("gawk" ,gawk)
140 ("ncurses" ,ncurses)
141 ("perl" ,perl)
142 ("tcsh" ,tcsh))) ; For runtime/tools/vim32
143 (native-inputs
144 `(("libtool" ,libtool)
145
146 ;; For tests.
147 ("tzdata" ,tzdata-for-tests)))
148 (home-page "https://www.vim.org/")
149 (synopsis "Text editor based on vi")
150 ;; The description shares language with the vim-full package. When making
151 ;; changes, check if the other description also needs to be updated.
152 (description
153 "Vim is a highly configurable text editor built to enable efficient text
154 editing. It is an improved version of the vi editor distributed with most UNIX
155 systems.
156
157 Vim is often called a \"programmer's editor,\" and so useful for programming
158 that many consider it an entire IDE. It's not just for programmers, though.
159 Vim is perfect for all kinds of text editing, from composing email to editing
160 configuration files.")
161 (license license:vim)))
162
163 (define-public xxd
164 (package (inherit vim)
165 (name "xxd")
166 (arguments
167 `(#:make-flags '("CC=gcc")
168 #:tests? #f ; there are none
169 #:phases
170 (modify-phases %standard-phases
171 (delete 'configure)
172 (add-after 'unpack 'chdir
173 (lambda _
174 (chdir "src/xxd")
175 #t))
176 (replace 'install
177 (lambda* (#:key outputs #:allow-other-keys)
178 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
179 (install-file "xxd" bin)
180 #t))))))
181 (inputs `())
182 (native-inputs `())
183 (synopsis "Hexdump utility from vim")
184 (description "This package provides the Hexdump utility xxd that comes
185 with the editor vim.")))
186
187 (define-public vim-full
188 (package
189 ;; This package should share its source with Vim, but it doesn't
190 ;; build reliably, and we want to keep Vim up to date due to the
191 ;; frequency of important bug fixes.
192 (inherit vim)
193 (name "vim-full")
194 (arguments
195 `(#:configure-flags
196 (list (string-append "--with-lua-prefix="
197 (assoc-ref %build-inputs "lua"))
198 "--with-features=huge"
199 "--enable-python3interp=yes"
200 "--enable-perlinterp=yes"
201 "--enable-rubyinterp=yes"
202 "--enable-tclinterp=yes"
203 "--enable-luainterp=yes"
204 "--enable-cscope"
205 "--enable-sniff"
206 "--enable-multibyte"
207 "--enable-xim"
208 "--disable-selinux"
209 "--enable-gui")
210 ;; This flag fixes the following error:
211 ;; .../libpython3.7m.a(pyexpat.o): undefined reference to symbol 'XML_FreeContentModel'
212 ;; .../libexpat.so.1: error adding symbols: DSO missing from command line
213 #:make-flags '("LDFLAGS=-lexpat")
214 ,@(substitute-keyword-arguments (package-arguments vim)
215 ((#:phases phases)
216 `(modify-phases ,phases
217 (add-before 'check 'skip-previewpopup
218 ;; This test fails when the path to the source is long. See:
219 ;; https://github.com/vim/vim/issues/5615
220 (lambda _
221 (substitute* "src/testdir/test_popupwin.vim"
222 ((".*Test_previewpopup.*" line)
223 (string-append line "return\n")))))
224 (add-before 'check 'skip-test87
225 ;; This test fails for unknown reasons after switching
226 ;; to a git checkout.
227 (lambda _
228 (delete-file "src/testdir/test87.ok")
229 (delete-file "src/testdir/test87.in")
230 (substitute* '("src/Makefile"
231 "src/testdir/Make_vms.mms")
232 (("test87") ""))
233 (substitute* "src/testdir/Make_all.mak"
234 (("test86.out \\\\") "test86")
235 (("test87.out") ""))
236 #t))
237 (add-before 'check 'start-xserver
238 (lambda* (#:key inputs #:allow-other-keys)
239 ;; Some tests require an X server, but does not start one.
240 (let ((xorg-server (assoc-ref inputs "xorg-server"))
241 (display ":1"))
242 (setenv "DISPLAY" display)
243 (zero? (system (string-append xorg-server "/bin/Xvfb "
244 display " &")))))))))))
245 (native-inputs
246 `(("pkg-config" ,pkg-config)
247 ("xorg-server" ,xorg-server-for-tests)
248 ,@(package-native-inputs vim)))
249 (inputs
250 `(("acl" ,acl)
251 ("atk" ,atk)
252 ("attr" ,attr)
253 ("cairo" ,cairo)
254 ("fontconfig" ,fontconfig)
255 ("freetype" ,freetype)
256 ("gdk-pixbuf" ,gdk-pixbuf)
257 ("gettext" ,gettext-minimal)
258 ("glib" ,glib)
259 ("gpm" ,gpm)
260 ("gtk" ,gtk+-2)
261 ("harfbuzz" ,harfbuzz)
262 ("libice" ,libice)
263 ("libpng" ,libpng)
264 ("libsm" ,libsm)
265 ("libx11" ,libx11)
266 ("libxdmcp" ,libxdmcp)
267 ("libxt" ,libxt)
268 ("libxpm" ,libxpm)
269 ("lua" ,lua)
270 ("pango" ,pango)
271 ("pixman" ,pixman)
272 ("python-3" ,python)
273 ("ruby" ,ruby)
274 ("tcl" ,tcl)
275 ,@(package-inputs vim)))
276 ;; The description shares language with the vim package. When making
277 ;; changes, check if the other description also needs to be updated.
278 (description "Vim is a highly configurable text editor built to enable efficient text
279 editing. It is an improved version of the vi editor distributed with most UNIX
280 systems.
281
282 Vim is often called a \"programmer's editor,\" and so useful for programming
283 that many consider it an entire IDE. It's not just for programmers, though.
284 Vim is perfect for all kinds of text editing, from composing email to editing
285 configuration files.
286
287 This package provides a version of Vim with many optional features enabled.
288 It includes a graphical interface, @command{gvim}, and support for plugins
289 written in the Python 3, Perl, Ruby, Tcl, and Lua programming languages.")))
290
291 (define-public vim-neocomplete
292 (package
293 (name "vim-neocomplete")
294 (version "2.1")
295 (source
296 (origin
297 (method git-fetch)
298 (uri (git-reference
299 (url "https://github.com/Shougo/neocomplete.vim")
300 (commit (string-append "ver." version))))
301 (file-name (git-file-name name version))
302 (sha256
303 (base32
304 "1h6sci5mhdfg6sjsjpi8l5li02hg858zcayiwl60y9j2gqnd18lv"))))
305 (build-system copy-build-system)
306 (arguments
307 '(#:install-plan
308 '(("autoload" "share/vim/vimfiles/")
309 ("doc" "share/vim/vimfiles/")
310 ("plugin" "share/vim/vimfiles/"))))
311 (synopsis "Next generation completion framework for Vim")
312 (description
313 "@code{neocomplete}, an abbreviation of 'neo-completion with cache',
314 is a plugin for Vim.
315 It provides keyword completion system by maintaining a cache of keywords in
316 the current buffer. Neocomplete can be customized easily and has many more
317 features than Vim's built-in completion.")
318 (home-page "https://github.com/Shougo/neocomplete.vim/")
319 (license license:expat)))
320
321 ;; There are no release tarballs.
322 (define-public vim-neosnippet-snippets
323 (let ((commit "8e2b1c0cab9ed9a832b3743dbb65e9966a64331a")
324 (revision "1"))
325 (package
326 (name "vim-neosnippet-snippets")
327 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
328 (source
329 (origin
330 (method git-fetch)
331 (uri (git-reference
332 (url "https://github.com/Shougo/neosnippet-snippets")
333 (commit commit)))
334 (file-name (string-append name "-" version "-checkout"))
335 (sha256
336 (base32
337 "151wpvbj6jb9jdkbhj3b77f5sq7y328spvwfbqyj1y32rg4ifmc6"))))
338 (build-system copy-build-system)
339 (arguments
340 '(#:install-plan
341 '(("neosnippets" "share/vim/vimfiles/"))))
342 (synopsis "Snippets for neosnippet")
343 (description
344 "@code{neosnippet-snippets} provides standard snippets for the Vim plugin
345 @code{neosnippet}. Snippets are small templates for commonly used code that
346 you can fill in on the fly.")
347 (home-page "https://github.com/Shougo/neosnippet-snippets")
348 (license license:expat))))
349
350 ;; The released tarball is too old for our Vim.
351 (define-public vim-neosnippet
352 (let ((commit "1bd7e23c79b73da16eb0c9469b25c376d3594583")
353 (revision "1"))
354 (package
355 (name "vim-neosnippet")
356 (version (string-append "4.2-" revision "." (string-take commit 7)))
357 (source
358 (origin
359 (method git-fetch)
360 (uri (git-reference
361 (url "https://github.com/Shougo/neosnippet.vim/")
362 (commit commit)))
363 (file-name (string-append name "-" version "-checkout"))
364 (sha256
365 (base32
366 "0k80syscmpnj38ks1fq02ds59g0r4jlg9ll7z4qc048mgi35alw5"))))
367 (build-system copy-build-system)
368 (arguments
369 '(#:install-plan
370 '(("autoload" "share/vim/vimfiles/")
371 ("doc" "share/vim/vimfiles/")
372 ("ftdetect" "share/vim/vimfiles/")
373 ("ftplugin" "share/vim/vimfiles/")
374 ("indent" "share/vim/vimfiles/")
375 ("plugin" "share/vim/vimfiles/")
376 ("rplugin" "share/vim/vimfiles/")
377 ("syntax" "share/vim/vimfiles/"))))
378 (synopsis "Snippet support for Vim")
379 (description
380 "@code{neosnippet}, is a plugin for Vim which adds snippet support to Vim.
381 Snippets are small templates for commonly used code that you can fill in on
382 the fly. To use snippets can increase your productivity in Vim a lot.
383 The functionality of this plug-in is quite similar to plug-ins like
384 @code{snipMate.vim} or @code{snippetsEmu.vim}. But since you can choose
385 snippets with the neocomplcache / neocomplete interface, you might have less
386 trouble using them, because you do not have to remember each snippet name.")
387 (home-page "https://github.com/Shougo/neosnippet.vim/")
388 (license license:expat))))
389
390 (define-public vim-scheme
391 (let ((commit "93827987c10f2d5dc519166a761f219204926d5f")
392 (revision "1"))
393 (package
394 (name "vim-scheme")
395 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
396 (source
397 (origin
398 (method git-fetch)
399 (uri (git-reference
400 (url "http://git.foldling.org/vim-scheme.git")
401 (commit commit)))
402 (file-name (string-append name "-" version "-checkout"))
403 (sha256
404 (base32
405 "1ynjr1109dxgj0lz261gmzz3wf5ap1m6j6hnvl3lcyv66a4y8pjv"))))
406 (build-system copy-build-system)
407 (arguments
408 '(#:install-plan
409 '(("after" "share/vim/vimfiles/")
410 ("ftplugin" "share/vim/vimfiles/")
411 ("syntax" "share/vim/vimfiles/"))))
412 (synopsis "Scheme syntax for Vim")
413 (description
414 "@code{vim-scheme} provides Scheme support for Vim (R7RS and CHICKEN).")
415 (home-page "https://foldling.org/git/vim-scheme.git/")
416 (license license:public-domain))))
417
418 (define-public vim-luna
419 (let ((commit "633619953dcf8577168e255230f96b05f28d6371")
420 (revision "1"))
421 (package
422 (name "vim-luna")
423 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
424 (source
425 (origin
426 (method git-fetch)
427 (uri (git-reference
428 (url "https://github.com/notpratheek/vim-luna")
429 (commit commit)))
430 (file-name (string-append name "-" version "-checkout"))
431 (sha256
432 (base32
433 "0ka3qbhsh8lix1vyj4678j7dnchkd8khhirrnn3aylxxf8fpqyg8"))))
434 (build-system copy-build-system)
435 (arguments
436 '(#:install-plan
437 '(("colors" "share/vim/vimfiles/"))))
438 (synopsis "Dark color theme for Vim")
439 (description
440 "@code{vim-luna} is a dark color theme for Vim.")
441 (home-page "https://github.com/notpratheek/vim-luna")
442 (license license:expat))))
443
444 ;; There are no tarball releases.
445 (define-public vim-context-filetype
446 (let ((commit "5e85f8cae26806f391aefe2661791a6de53bcea2")
447 (revision "1"))
448 (package
449 (name "vim-context-filetype")
450 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
451 (source
452 (origin
453 (method git-fetch)
454 (uri (git-reference
455 (url "https://github.com/Shougo/context_filetype.vim")
456 (commit commit)))
457 (file-name (string-append name "-" version "-checkout"))
458 (sha256
459 (base32
460 "0alvrfhmd91zkd9h83s8wvgyq4iakcf6rybsyjd369qbgpcqky89"))))
461 (build-system copy-build-system)
462 (arguments
463 '(#:install-plan
464 '(("doc" "share/vim/vimfiles/")
465 ("autoload" "share/vim/vimfiles/"))))
466 (synopsis "Context filetype library for Vim")
467 (description
468 "@code{vim-context-filetype} is context filetype library for Vim script.")
469 (home-page "https://github.com/Shougo/context_filetype.vim")
470 (license license:expat)))) ; ??? check again
471
472 (define-public vim-fugitive
473 (package
474 (name "vim-fugitive")
475 (version "3.2")
476 (source
477 (origin
478 (method git-fetch)
479 (uri (git-reference
480 (url "https://github.com/tpope/vim-fugitive.git")
481 (commit (string-append "v" version))))
482 (file-name (git-file-name name version))
483 (sha256
484 (base32
485 "1jbn5jxadccmcz01j94d0i1bp74cixr0fpxxf1h0aqdf1ljk3d7n"))))
486 (build-system copy-build-system)
487 (arguments
488 '(#:install-plan
489 '(("autoload" "share/vim/vimfiles/")
490 ("doc" "share/vim/vimfiles/")
491 ("ftdetect" "share/vim/vimfiles/")
492 ("plugin" "share/vim/vimfiles/")
493 ("syntax" "share/vim/vimfiles/"))))
494 (home-page "https://github.com/tpope/vim-fugitive")
495 (synopsis "Vim plugin to work with Git")
496 (description "Vim-fugitive is a wrapper for Vim that complements the
497 command window, where you can stage and review your changes before the next
498 commit or run any Git arbitrary command.")
499 (license license:vim))) ; distributed under the same license as vim
500
501 (define-public vim-airline
502 (package
503 (name "vim-airline")
504 (version "0.11")
505 (source
506 (origin
507 (method git-fetch)
508 (uri (git-reference
509 (url "https://github.com/vim-airline/vim-airline")
510 (commit (string-append "v" version))))
511 (file-name (git-file-name name version))
512 (sha256
513 (base32
514 "1aksmr73648pvyc75pfdz28k2d4ky52rn7xiwcv7lz87q3vqld7k"))))
515 (build-system copy-build-system)
516 (arguments
517 '(#:install-plan
518 '(("autoload" "share/vim/vimfiles/")
519 ("doc" "share/vim/vimfiles/")
520 ("plugin" "share/vim/vimfiles/")
521 ("t" "share/vim/vimfiles/"))))
522 (synopsis "Statusline for Vim")
523 (description
524 "@code{vim-airline} is an extensible statusline for Vim.
525 It can be extended and costumized with themes, works with unicode fonts
526 and powerline symbols, etc.")
527 (home-page "https://github.com/vim-airline/vim-airline")
528 (license license:expat)))
529
530 ;; There are no tarball releases.
531 (define-public vim-airline-themes
532 (let ((commit "e6f233231b232b6027cde6aebeeb18d9138e5324")
533 (revision "2"))
534 (package
535 (name "vim-airline-themes")
536 (version (git-version "0.0.0" revision commit))
537 (source
538 (origin
539 (method git-fetch)
540 (uri (git-reference
541 (url "https://github.com/vim-airline/vim-airline-themes")
542 (commit commit)))
543 (file-name (git-file-name name version))
544 (sha256
545 (base32
546 "1sb7nb7j7bz0pv1c9bgdy0smhr0jk2b1vbdv9yzghg5lrknpsbr6"))))
547 (build-system copy-build-system)
548 (arguments
549 '(#:install-plan
550 '(("autoload" "share/vim/vimfiles/")
551 ("doc" "share/vim/vimfiles/")
552 ("plugin" "share/vim/vimfiles/"))))
553 (synopsis "Collection of themes for Vim-airline")
554 (description
555 "@code{vim-airline-themes} is a collection of themes for @code{vim-airline}.")
556 (home-page "https://github.com/vim-airline/vim-airline-themes")
557 (license license:expat))))
558
559 (define-public vim-syntastic
560 (package
561 (name "vim-syntastic")
562 (version "3.10.0")
563 (source
564 (origin
565 (method git-fetch)
566 (uri (git-reference
567 (url "https://github.com/vim-syntastic/syntastic")
568 (commit version)))
569 (file-name (git-file-name name version))
570 (sha256
571 (base32 "0j91f72jaz1s6aw1hpjiz30vk2ds2aqd9gisk91grsldy6nz6hhz"))))
572 (build-system copy-build-system)
573 (arguments
574 '(#:install-plan
575 '(("autoload" "share/vim/vimfiles/")
576 ("doc" "share/vim/vimfiles/")
577 ("plugin" "share/vim/vimfiles/")
578 ("syntax_checkers" "share/vim/vimfiles/"))))
579 (synopsis "Syntax checking plugin for Vim")
580 (description
581 "Vim-syntastic is a syntax checking plugin for Vim. It runs files through
582 external syntax checkers and displays any resulting errors to the user. This
583 can be done on demand, or automatically as files are saved. If syntax errors
584 are detected, the user is notified.")
585 (home-page "https://github.com/vim-syntastic/syntastic")
586 (license license:wtfpl2)))
587
588 (define-public editorconfig-vim
589 (package
590 (name "editorconfig-vim")
591 (version "0.3.3")
592 (source
593 (origin
594 (method git-fetch)
595 (uri (git-reference
596 (url "https://github.com/editorconfig/editorconfig-vim.git")
597 (commit (string-append "v" version))))
598 (file-name (git-file-name name version))
599 (sha256
600 (base32
601 "0vssfl1wjq0mv0p30c3dszwrh4yy90vwxmmdgqaxf5rykik7bdfd"))
602 (modules '((guix build utils)))
603 (snippet
604 '(begin
605 (delete-file-recursively "plugin/editorconfig-core-py") #t))))
606 (build-system copy-build-system)
607 (arguments
608 '(#:phases
609 (modify-phases %standard-phases
610 (add-after 'unpack 'patch-editorconfig-path
611 (lambda* (#:key inputs #:allow-other-keys)
612 (let ((editorconfig (assoc-ref inputs "editorconfig-core")))
613 (substitute* "plugin/editorconfig.vim"
614 (("/opt") editorconfig))
615 #t))))
616 #:install-plan
617 '(("autoload" "share/vim/vimfiles/")
618 ("doc" "share/vim/vimfiles/")
619 ("plugin" "share/vim/vimfiles/"))))
620 (inputs
621 `(("editorconfig-core" ,editorconfig-core-c)))
622 (home-page "https://editorconfig.org/")
623 (synopsis "EditorConfig plugin for Vim")
624 (description "EditorConfig makes it easy to maintain the correct coding
625 style when switching between different text editors and between different
626 projects. The EditorConfig project maintains a file format and plugins for
627 various text editors which allow this file format to be read and used by those
628 editors.")
629 (license license:bsd-2)))
630
631 (define-public neovim-syntastic
632 (package
633 (inherit vim-syntastic)
634 (name "neovim-syntastic")
635 (arguments
636 '(#:install-plan
637 '(("autoload" "share/nvim/site/")
638 ("doc" "share/nvim/site/")
639 ("plugin" "share/nvim/site/")
640 ("syntax_checkers" "share/nvim/site/"))))
641 (synopsis "Syntax checking plugin for Neovim")
642 (description
643 "Vim-syntastic is a syntax checking plugin for Neovim. It runs files through
644 external syntax checkers and displays any resulting errors to the user. This
645 can be done on demand, or automatically as files are saved. If syntax errors
646 are detected, the user is notified.")))
647
648 (define-public neovim
649 (package
650 (name "neovim")
651 (version "0.4.3")
652 (source
653 (origin
654 (method git-fetch)
655 (uri (git-reference
656 (url "https://github.com/neovim/neovim")
657 (commit (string-append "v" version))))
658 (file-name (git-file-name name version))
659 (sha256
660 (base32 "03p7pic7hw9yxxv7fbgls1f42apx3lik2k6mpaz1a109ngyc5kaj"))))
661 (build-system cmake-build-system)
662 (arguments
663 `(#:modules ((srfi srfi-26)
664 (guix build cmake-build-system)
665 (guix build utils))
666 #:configure-flags '("-DPREFER_LUA:BOOL=YES")
667 #:phases
668 (modify-phases %standard-phases
669 (add-after 'unpack 'set-lua-paths
670 (lambda* (#:key inputs #:allow-other-keys)
671 (let* ((lua-version "5.1")
672 (lua-cpath-spec
673 (lambda (prefix)
674 (let ((path (string-append prefix "/lib/lua/" lua-version)))
675 (string-append path "/?.so;" path "/?/?.so"))))
676 (lua-path-spec
677 (lambda (prefix)
678 (let ((path (string-append prefix "/share/lua/" lua-version)))
679 (string-append path "/?.lua;" path "/?/?.lua"))))
680 (lua-inputs (map (cute assoc-ref %build-inputs <>)
681 '("lua"
682 "lua-luv"
683 "lua-lpeg"
684 "lua-bitop"
685 "lua-libmpack"))))
686 (setenv "LUA_PATH"
687 (string-join (map lua-path-spec lua-inputs) ";"))
688 (setenv "LUA_CPATH"
689 (string-join (map lua-cpath-spec lua-inputs) ";"))
690 #t)))
691 (add-after 'unpack 'prevent-embedding-gcc-store-path
692 (lambda _
693 ;; nvim remembers its build options, including the compiler with
694 ;; its complete path. This adds gcc to the closure of nvim, which
695 ;; doubles its size. We remove the refirence here.
696 (substitute* "cmake/GetCompileFlags.cmake"
697 (("\\$\\{CMAKE_C_COMPILER\\}") "/gnu/store/.../bin/gcc"))
698 #t)))))
699 (inputs
700 `(("libuv" ,libuv)
701 ("msgpack" ,msgpack)
702 ("libtermkey" ,libtermkey)
703 ("libvterm" ,libvterm)
704 ("unibilium" ,unibilium)
705 ("jemalloc" ,jemalloc)
706 ("libiconv" ,libiconv)
707 ("lua" ,lua-5.1)
708 ("lua-luv" ,lua5.1-luv)
709 ("lua-lpeg" ,lua5.1-lpeg)
710 ("lua-bitop" ,lua5.1-bitop)
711 ("lua-libmpack" ,lua5.1-libmpack)))
712 (native-inputs
713 `(("pkg-config" ,pkg-config)
714 ("gettext" ,gettext-minimal)
715 ("gperf" ,gperf)))
716 (home-page "https://neovim.io")
717 (synopsis "Fork of vim focused on extensibility and agility")
718 (description "Neovim is a project that seeks to aggressively
719 refactor Vim in order to:
720
721 @itemize
722 @item Simplify maintenance and encourage contributions
723 @item Split the work between multiple developers
724 @item Enable advanced external UIs without modifications to the core
725 @item Improve extensibility with a new plugin architecture
726 @end itemize\n")
727 ;; Neovim is licensed under the terms of the Apache 2.0 license,
728 ;; except for parts that were contributed under the Vim license.
729 (license (list license:asl2.0 license:vim))))
730
731 (define-public vifm
732 (package
733 (name "vifm")
734 (version "0.10.1")
735 (source
736 (origin
737 (method url-fetch)
738 (uri (list
739 (string-append "https://github.com/vifm/vifm/releases/download/v"
740 version "/vifm-" version ".tar.bz2")
741 (string-append "https://sourceforge.net/projects/vifm/files/vifm/"
742 "vifm-" version ".tar.bz2")))
743 (sha256
744 (base32
745 "0fyhxh7ndjn8fyjhj14ymkr3pjcs3k1xbs43g7xvvq85vdb6y04r"))))
746 (build-system gnu-build-system)
747 (arguments
748 '(#:configure-flags '("--disable-build-timestamp")
749 #:phases
750 (modify-phases %standard-phases
751 (add-after 'patch-source-shebangs 'patch-test-shebangs
752 (lambda _
753 (substitute* (cons* "src/background.c"
754 "src/cfg/config.c"
755 (find-files "tests" "\\.c$"))
756 (("/bin/sh") (which "sh"))
757 (("/bin/bash") (which "bash")))
758 ;; This test segfaults
759 (substitute* "tests/Makefile"
760 (("misc") ""))
761 #t))
762 (add-after 'install 'install-vim-plugin-files
763 (lambda* (#:key outputs #:allow-other-keys)
764 (let* ((out (assoc-ref outputs "out"))
765 (vifm (string-append out "/share/vifm"))
766 (vimfiles (string-append out "/share/vim/vimfiles")))
767 (copy-recursively (string-append vifm "/colors")
768 (string-append vimfiles "/colors"))
769 (copy-recursively (string-append vifm "/vim")
770 vimfiles)
771 (delete-file-recursively (string-append vifm "/colors"))
772 (delete-file-recursively (string-append vifm "/vim")))
773 #t)))))
774 (native-inputs
775 `(("groff" ,groff))) ; for the documentation
776 (inputs
777 `(("libx11" ,libx11)
778 ("ncurses" ,ncurses)
779 ("perl" ,perl)))
780 (home-page "https://vifm.info/")
781 (synopsis "Flexible vi-like file manager using ncurses")
782 (description "Vifm is a file manager providing a @command{vi}-like usage
783 experience. It has similar keybindings and modes (e.g. normal, command line,
784 visual). The interface uses ncurses, thus vifm can be used in text-only
785 environments. It supports a wide range of features, some of which are known
786 from the @command{vi}-editor:
787 @enumerate
788 @item utf8 support
789 @item user mappings (almost like in @code{vi})
790 @item ranges in command
791 @item line commands
792 @item user defined commands (with support for ranges)
793 @item registers
794 @item operation undoing/redoing
795 @item fuse file systems support
796 @item trash
797 @item multiple files renaming
798 @item support of filename modifiers
799 @item colorschemes support
800 @item file name color according to file type
801 @item path specific colorscheme customization
802 @item bookmarks
803 @item operation backgrounding
804 @item customizable file viewers
805 @item handy @code{less}-like preview mode
806 @item filtering out and searching for files using regular expressions
807 @item one or two panes view
808 @end enumerate
809 With the package comes a plugin to use vifm as a vim file selector.")
810 (license license:gpl2+)))
811
812 (define-public python-pynvim
813 (package
814 (name "python-pynvim")
815 (version "0.3.2")
816 (source (origin
817 (method url-fetch)
818 (uri (pypi-uri "pynvim" version))
819 (sha256
820 (base32
821 "01dybk4vs452pljn1q3il5z2sd313ki0lgiglc0xmjc6wp290r6g"))))
822 (build-system python-build-system)
823 (propagated-inputs
824 `(("python-greenlet" ,python-greenlet)
825 ("python-msgpack" ,python-msgpack)))
826 (arguments
827 `(#:tests? #f))
828 (home-page "https://github.com/neovim/pynvim")
829 (synopsis "Python client and plugin host for neovim")
830 (description "Pynvim implements support for python plugins in neovim. It
831 also works as a library for connecting to and scripting neovim processes
832 through its msgpack-rpc API.")
833 (license license:asl2.0)))
834
835 (define-public python2-pynvim
836 (package-with-python2 python-pynvim))
837
838 (define-public vim-guix-vim
839 (package
840 (name "vim-guix-vim")
841 (version "0.1")
842 (source (origin
843 (method git-fetch)
844 (uri (git-reference
845 (url "https://gitlab.com/Efraim/guix.vim")
846 (commit version)))
847 (file-name (git-file-name name version))
848 (sha256
849 (base32
850 "1f8h8m96fqh3f9hy87spgh9kdqzyxl11n9s3rywvyq5xhn489bnk"))))
851 (build-system copy-build-system)
852 (arguments
853 '(#:install-plan
854 '(("compiler" "share/vim/vimfiles/")
855 ("doc" "share/vim/vimfiles/")
856 ("indent" "share/vim/vimfiles/")
857 ("ftdetect" "share/vim/vimfiles/")
858 ("ftplugin" "share/vim/vimfiles/")
859 ("syntax" "share/vim/vimfiles/"))))
860 (home-page "https://gitlab.com/Efraim/guix.vim")
861 (synopsis "Guix integration in Vim")
862 (description "This package provides support for GNU Guix in Vim.")
863 (license license:vim)))
864
865 (define-public vim-asyncrun
866 (package
867 (name "vim-asyncrun")
868 (version "2.7.5")
869 (source (origin
870 (method git-fetch)
871 (uri (git-reference
872 (url "https://github.com/skywind3000/asyncrun.vim")
873 (commit version)))
874 (file-name (git-file-name name version))
875 (sha256
876 (base32
877 "02fiqf4rcrxbcgvj02mpd78wkxsrnbi54aciwh9fv5mnz5ka249m"))))
878 (build-system copy-build-system)
879 (arguments
880 '(#:install-plan
881 '(("plugin" "share/vim/vimfiles/")
882 ("doc/" "share/vim/vimfiles/doc" #:include ("asyncrun.txt")))))
883 (home-page "https://github.com/skywind3000/asyncrun.vim")
884 (synopsis "Run Async Shell Commands in Vim")
885 (description "This plugin takes the advantage of new APIs in Vim 8 (and
886 NeoVim) to enable you to run shell commands in background and read output in the
887 quickfix window in realtime.")
888 (license license:expat)))
889
890 (define-public vim-dispatch
891 (package
892 (name "vim-dispatch")
893 (version "1.8")
894 (source
895 (origin
896 (method git-fetch)
897 (uri (git-reference
898 (url "https://github.com/tpope/vim-dispatch")
899 (commit (string-append "v" version))))
900 (file-name (git-file-name name version))
901 (sha256
902 (base32
903 "1m8b5mn2zqlphzs6xfwykwmghf6p0wabrhpjmh7vav35jgcxc4wl"))))
904 (build-system copy-build-system)
905 (arguments
906 '(#:install-plan
907 '(("autoload" "share/vim/vimfiles/")
908 ("doc" "share/vim/vimfiles/")
909 ("plugin" "share/vim/vimfiles/"))))
910 (home-page "https://github.com/tpope/vim-dispatch")
911 (synopsis "Asynchronous build and test dispatcher")
912 (description "Leverage the power of Vim's compiler plugins without being
913 bound by synchronicity. Kick off builds and test suites using one of several
914 asynchronous adapters (including tmux, screen, and a headless mode), and when
915 the job completes, errors will be loaded and parsed automatically.")
916 (license license:vim)))
917
918 (define-public vim-eunuch
919 (let ((commit "33e875b31c8b811a0a47908884a5e2339106bbe8")
920 (revision "1"))
921 (package
922 (name "vim-eunuch")
923 (version (git-version "1.2" revision commit))
924 (source
925 (origin
926 (method git-fetch)
927 (uri (git-reference
928 (url "https://github.com/tpope/vim-eunuch")
929 (commit commit)))
930 (file-name (git-file-name name version))
931 (sha256
932 (base32
933 "1xadb22kd40swmww0qxmmkcpcq6viy8l167pjck5q32hfngll5d3"))))
934 (build-system copy-build-system)
935 (arguments
936 '(#:install-plan
937 '(("doc" "share/vim/vimfiles/")
938 ("plugin" "share/vim/vimfiles/"))))
939 (home-page "https://github.com/tpope/vim-eunuch")
940 (synopsis "Vim sugar for the UNIX shell commands")
941 (description "Vim sugar for the UNIX shell commands that need it the most.
942 This package includes commands such as @code{SudoWrite} and @code{SudoEdit} and
943 help working on Vim buffers and the files they reference with one command.")
944 (license license:vim))))