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