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