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