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