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