gnu: vim: Update to 8.2.2067.
[jackhill/guix/guix.git] / gnu / packages / vim.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
3 ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
4 ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
5 ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
6 ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
7 ;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
8 ;;; Copyright © 2019 HiPhish <hiphish@posteo.de>
9 ;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu>
10 ;;; Copyright © 2019, 2020 Jakub Kądziołka <kuba@kadziolka.net>
11 ;;; Copyright © 2020 Jack Hill <jackhill@jackhill.us>
12 ;;;
13 ;;; This file is part of GNU Guix.
14 ;;;
15 ;;; GNU Guix is free software; you can redistribute it and/or modify it
16 ;;; under the terms of the GNU General Public License as published by
17 ;;; the Free Software Foundation; either version 3 of the License, or (at
18 ;;; your option) any later version.
19 ;;;
20 ;;; GNU Guix is distributed in the hope that it will be useful, but
21 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 ;;; GNU General Public License for more details.
24 ;;;
25 ;;; You should have received a copy of the GNU General Public License
26 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
27
28 (define-module (gnu packages vim)
29 #:use-module ((guix licenses) #:prefix license:)
30 #:use-module (guix packages)
31 #:use-module (guix utils)
32 #:use-module (guix download)
33 #:use-module (guix git-download)
34 #:use-module (guix build-system cmake)
35 #:use-module (guix build-system copy)
36 #:use-module (guix build-system gnu)
37 #:use-module (guix build-system python)
38 #:use-module (gnu packages)
39 #:use-module (gnu packages acl)
40 #:use-module (gnu packages admin) ; For GNU hostname
41 #:use-module (gnu packages attr)
42 #:use-module (gnu packages autotools)
43 #:use-module (gnu packages base)
44 #:use-module (gnu packages fontutils)
45 #:use-module (gnu packages gawk)
46 #:use-module (gnu packages gettext)
47 #:use-module (gnu packages glib)
48 #:use-module (gnu packages gperf)
49 #:use-module (gnu packages groff)
50 #:use-module (gnu packages gtk)
51 #:use-module (gnu packages image)
52 #:use-module (gnu packages jemalloc)
53 #:use-module (gnu packages libevent)
54 #:use-module (gnu packages linux)
55 #:use-module (gnu packages lua)
56 #:use-module (gnu packages ncurses)
57 #:use-module (gnu packages perl)
58 #:use-module (gnu packages pkg-config)
59 #:use-module (gnu packages python)
60 #:use-module (gnu packages python-xyz)
61 #:use-module (gnu packages ruby)
62 #:use-module (gnu packages serialization)
63 #:use-module (gnu packages shells)
64 #:use-module (gnu packages tcl)
65 #:use-module (gnu packages text-editors)
66 #:use-module (gnu packages terminals)
67 #:use-module (gnu packages xdisorg)
68 #:use-module (gnu packages xorg))
69
70 (define-public vim
71 (package
72 (name "vim")
73 (version "8.2.2067")
74 (source (origin
75 (method git-fetch)
76 (uri (git-reference
77 (url "https://github.com/vim/vim")
78 (commit (string-append "v" version))))
79 (file-name (git-file-name name version))
80 (sha256
81 (base32
82 "02cd953h69k9klrcwi756namwg39ka7if9ccc399ihb1l5f3kr66"))))
83 (build-system gnu-build-system)
84 (arguments
85 `(#:test-target "test"
86 #:parallel-tests? #f
87 #:phases
88 (modify-phases %standard-phases
89 (add-after 'configure 'patch-absolute-paths
90 (lambda _
91 (substitute* "runtime/tools/mve.awk"
92 (("/usr/bin/nawk") (which "gawk")))
93 (substitute* '("src/testdir/Makefile"
94 "src/testdir/test_normal.vim"
95 "src/testdir/test_popupwin.vim"
96 "src/testdir/test_system.vim"
97 "src/testdir/test_terminal.vim"
98 "src/testdir/test_terminal2.vim")
99 (("/bin/sh") (which "sh")))
100 (substitute* "src/testdir/test_autocmd.vim"
101 (("/bin/kill") (which "kill")))
102 #t))
103 (add-before 'check 'set-environment-variables
104 (lambda* (#:key inputs #:allow-other-keys)
105 ;; One of the tests tests timezone-dependent functions.
106 (setenv "TZDIR"
107 (string-append (assoc-ref inputs "tzdata")
108 "/share/zoneinfo"))
109
110 ;; Make sure the TERM environment variable is set for the tests
111 (setenv "TERM" "xterm")
112 #t))
113 (add-before 'check 'skip-or-fix-failing-tests
114 (lambda _
115 ;; This test assumes that PID 1 is run as root and that the user
116 ;; running the test suite does not have permission to kill(1, 0)
117 ;; it. This is not true in the build container, where both PID 1
118 ;; and the test suite are run as the same user. Skip the test.
119 ;; An alternative fix would be to patch the PID used to a random
120 ;; 32-bit value and hope it never shows up in the test environment.
121 (substitute* "src/testdir/test_swap.vim"
122 (("if !IsRoot\\(\\)") "if 0"))
123
124 ;; These tests compares output against a golden ‘…/|b|i|n|/|s|h…’
125 ;; literal. We need to match that and substitute a similarly
126 ;; ‘spliced’ path to ‘sh’ in the store, truncated to the last
127 ;; 44 (spliced: 88) or so characters.
128 ;; Two of the tests we simply skip instead of patching the screen dump.
129 (substitute* "src/testdir/test_popupwin.vim"
130 ((".*Test_popupwin_term_0[1|2].*") ""))
131 ;; We replace the external program call (!) with a scroll-back (<)
132 ;; symbol and blindly fix some other differences based on error output.
133 (let ((splice (lambda (s separator)
134 (string-join (map string (string->list s))
135 separator))))
136 (substitute* "src/testdir/dumps/Test_terminal_from_cmd.dump"
137 (((splice "/bin/sh" "\\|"))
138 (splice (string-take-right (which "sh") 44) "|"))
139 (("^\\|!") "|<")
140 (("@37") ""))
141 (substitute* '("src/testdir/dumps/Test_terminal_scrollback_1.dump"
142 "src/testdir/dumps/Test_terminal_scrollback_2.dump")
143 (((splice "/bin/sh" "\\|"))
144 (splice (string-take-right (which "sh") 61) "|"))
145 (("^\\|!") "|<")
146 ((" @55") " @1"))
147 (substitute* '("src/testdir/dumps/Test_terminal_scrollback_3.dump"
148 "src/testdir/dumps/Test_popupwin_term_03.dump"
149 "src/testdir/dumps/Test_popupwin_term_04.dump")
150 (((splice "/bin/sh" "\\|"))
151 (splice (string-take-right (which "sh") 62) "|"))
152 (("^\\|!") "|<")
153 (("\\]\\| @56") "]| @1")))
154 #t)))))
155 (inputs
156 `(("gawk" ,gawk)
157 ("ncurses" ,ncurses)
158 ("perl" ,perl)
159 ("tcsh" ,tcsh))) ; For runtime/tools/vim32
160 (native-inputs
161 `(("libtool" ,libtool)
162
163 ;; For tests.
164 ("tzdata" ,tzdata-for-tests)))
165 (home-page "https://www.vim.org/")
166 (synopsis "Text editor based on vi")
167 ;; The description shares language with the vim-full package. When making
168 ;; changes, check if the other description also needs to be updated.
169 (description
170 "Vim is a highly configurable text editor built to enable efficient text
171 editing. It is an improved version of the vi editor distributed with most UNIX
172 systems.
173
174 Vim is often called a \"programmer's editor,\" and so useful for programming
175 that many consider it an entire IDE. It's not just for programmers, though.
176 Vim is perfect for all kinds of text editing, from composing email to editing
177 configuration files.")
178 (license license:vim)))
179
180 (define-public xxd
181 (package (inherit vim)
182 (name "xxd")
183 (arguments
184 `(#:make-flags (list ,(string-append "CC=" (cc-for-target)))
185 #:tests? #f ; there are none
186 #:phases
187 (modify-phases %standard-phases
188 (delete 'configure)
189 (add-after 'unpack 'chdir
190 (lambda _
191 (chdir "src/xxd")
192 #t))
193 (replace 'install
194 (lambda* (#:key outputs #:allow-other-keys)
195 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
196 (install-file "xxd" bin)
197 #t))))))
198 (inputs `())
199 (native-inputs `())
200 (synopsis "Hexdump utility from vim")
201 (description "This package provides the Hexdump utility xxd that comes
202 with the editor vim.")))
203
204 (define-public vim-full
205 (package
206 ;; This package should share its source with Vim, but it doesn't
207 ;; build reliably, and we want to keep Vim up to date due to the
208 ;; frequency of important bug fixes.
209 (inherit vim)
210 (name "vim-full")
211 (arguments
212 `(#:configure-flags
213 (list (string-append "--with-lua-prefix="
214 (assoc-ref %build-inputs "lua"))
215 "--with-features=huge"
216 "--enable-python3interp=yes"
217 "--enable-perlinterp=yes"
218 "--enable-rubyinterp=yes"
219 "--enable-tclinterp=yes"
220 "--enable-luainterp=yes"
221 "--enable-cscope"
222 "--enable-sniff"
223 "--enable-multibyte"
224 "--enable-xim"
225 "--disable-selinux"
226 "--enable-gui")
227 ;; This flag fixes the following error:
228 ;; .../libpython3.7m.a(pyexpat.o): undefined reference to symbol 'XML_FreeContentModel'
229 ;; .../libexpat.so.1: error adding symbols: DSO missing from command line
230 #:make-flags '("LDFLAGS=-lexpat")
231 ,@(substitute-keyword-arguments (package-arguments vim)
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.2")
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 "1jbn5jxadccmcz01j94d0i1bp74cixr0fpxxf1h0aqdf1ljk3d7n"))))
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 editorconfig-vim
585 (package
586 (name "editorconfig-vim")
587 (version "1.1.1")
588 (source
589 (origin
590 (method git-fetch)
591 (uri (git-reference
592 (url "https://github.com/editorconfig/editorconfig-vim")
593 (commit (string-append "v" version))))
594 (file-name (git-file-name name version))
595 (sha256
596 (base32
597 "0mp80bi2m56bb93szw87vy6q5s85yk9g91sl4pr51316rgdv5kkv"))))
598 (build-system copy-build-system)
599 (arguments
600 '(#:install-plan
601 '(("autoload" "share/vim/vimfiles/")
602 ("doc" "share/vim/vimfiles/")
603 ("plugin" "share/vim/vimfiles/"))))
604 (home-page "https://editorconfig.org/")
605 (synopsis "EditorConfig plugin for Vim")
606 (description "EditorConfig makes it easy to maintain the correct coding
607 style when switching between different text editors and between different
608 projects. The EditorConfig project maintains a file format and plugins for
609 various text editors which allow this file format to be read and used by those
610 editors.")
611 (license license:bsd-2)))
612
613 (define-public neovim-syntastic
614 (package
615 (inherit vim-syntastic)
616 (name "neovim-syntastic")
617 (arguments
618 '(#:install-plan
619 '(("autoload" "share/nvim/site/")
620 ("doc" "share/nvim/site/")
621 ("plugin" "share/nvim/site/")
622 ("syntax_checkers" "share/nvim/site/"))))
623 (synopsis "Syntax checking plugin for Neovim")
624 (description
625 "Vim-syntastic is a syntax checking plugin for Neovim. It runs files through
626 external syntax checkers and displays any resulting errors to the user. This
627 can be done on demand, or automatically as files are saved. If syntax errors
628 are detected, the user is notified.")))
629
630 (define-public neovim
631 (package
632 (name "neovim")
633 (version "0.4.4")
634 (source
635 (origin
636 (method git-fetch)
637 (uri (git-reference
638 (url "https://github.com/neovim/neovim")
639 (commit (string-append "v" version))))
640 (file-name (git-file-name name version))
641 (sha256
642 (base32 "11zyj6jvkwas3n6w1ckj3pk6jf81z1g7ngg4smmwm7c27y2a6f2m"))))
643 (build-system cmake-build-system)
644 (arguments
645 `(#:modules ((srfi srfi-26)
646 (guix build cmake-build-system)
647 (guix build utils))
648 #:configure-flags '("-DPREFER_LUA:BOOL=YES")
649 #:phases
650 (modify-phases %standard-phases
651 (add-after 'unpack 'set-lua-paths
652 (lambda* (#:key inputs #:allow-other-keys)
653 (let* ((lua-version "5.1")
654 (lua-cpath-spec
655 (lambda (prefix)
656 (let ((path (string-append prefix "/lib/lua/" lua-version)))
657 (string-append path "/?.so;" path "/?/?.so"))))
658 (lua-path-spec
659 (lambda (prefix)
660 (let ((path (string-append prefix "/share/lua/" lua-version)))
661 (string-append path "/?.lua;" path "/?/?.lua"))))
662 (lua-inputs (map (cute assoc-ref %build-inputs <>)
663 '("lua"
664 "lua-luv"
665 "lua-lpeg"
666 "lua-bitop"
667 "lua-libmpack"))))
668 (setenv "LUA_PATH"
669 (string-join (map lua-path-spec lua-inputs) ";"))
670 (setenv "LUA_CPATH"
671 (string-join (map lua-cpath-spec lua-inputs) ";"))
672 #t)))
673 (add-after 'unpack 'prevent-embedding-gcc-store-path
674 (lambda _
675 ;; nvim remembers its build options, including the compiler with
676 ;; its complete path. This adds gcc to the closure of nvim, which
677 ;; doubles its size. We remove the refirence here.
678 (substitute* "cmake/GetCompileFlags.cmake"
679 (("\\$\\{CMAKE_C_COMPILER\\}") "/gnu/store/.../bin/gcc"))
680 #t)))))
681 (inputs
682 `(("libuv" ,libuv)
683 ("msgpack" ,msgpack)
684 ("libtermkey" ,libtermkey)
685 ("libvterm" ,libvterm)
686 ("unibilium" ,unibilium)
687 ("jemalloc" ,jemalloc)
688 ("libiconv" ,libiconv)
689 ("lua" ,lua-5.1)
690 ("lua-luv" ,lua5.1-luv)
691 ("lua-lpeg" ,lua5.1-lpeg)
692 ("lua-bitop" ,lua5.1-bitop)
693 ("lua-libmpack" ,lua5.1-libmpack)))
694 (native-inputs
695 `(("pkg-config" ,pkg-config)
696 ("gettext" ,gettext-minimal)
697 ("gperf" ,gperf)))
698 (home-page "https://neovim.io")
699 (synopsis "Fork of vim focused on extensibility and agility")
700 (description "Neovim is a project that seeks to aggressively
701 refactor Vim in order to:
702
703 @itemize
704 @item Simplify maintenance and encourage contributions
705 @item Split the work between multiple developers
706 @item Enable advanced external UIs without modifications to the core
707 @item Improve extensibility with a new plugin architecture
708 @end itemize\n")
709 ;; Neovim is licensed under the terms of the Apache 2.0 license,
710 ;; except for parts that were contributed under the Vim license.
711 (license (list license:asl2.0 license:vim))))
712
713 (define-public vifm
714 (package
715 (name "vifm")
716 (version "0.11")
717 (source
718 (origin
719 (method url-fetch)
720 (uri (list
721 (string-append "https://github.com/vifm/vifm/releases/download/v"
722 version "/vifm-" version ".tar.bz2")
723 (string-append "https://sourceforge.net/projects/vifm/files/vifm/"
724 "vifm-" version ".tar.bz2")))
725 (sha256
726 (base32
727 "0rqyd424y0g5b5basw2ybb60r9gar4f40d1xgzr3c2dsy4jpwvyh"))))
728 (build-system gnu-build-system)
729 (arguments
730 '(#:configure-flags '("--disable-build-timestamp")
731 #:phases
732 (modify-phases %standard-phases
733 (add-after 'patch-source-shebangs 'patch-test-shebangs
734 (lambda _
735 (substitute* (cons* "src/background.c"
736 "src/cfg/config.c"
737 (find-files "tests" "\\.c$"))
738 (("/bin/sh") (which "sh"))
739 (("/bin/bash") (which "bash")))
740 ;; This test segfaults
741 (substitute* "tests/Makefile"
742 (("misc") ""))
743 #t))
744 (add-after 'install 'install-vim-plugin-files
745 (lambda* (#:key outputs #:allow-other-keys)
746 (let* ((out (assoc-ref outputs "out"))
747 (vifm (string-append out "/share/vifm"))
748 (vimfiles (string-append out "/share/vim/vimfiles")))
749 (copy-recursively (string-append vifm "/colors")
750 (string-append vimfiles "/colors"))
751 (copy-recursively (string-append vifm "/vim")
752 vimfiles)
753 (delete-file-recursively (string-append vifm "/colors"))
754 (delete-file-recursively (string-append vifm "/vim")))
755 #t)))))
756 (native-inputs
757 `(("groff" ,groff))) ; for the documentation
758 (inputs
759 `(("libx11" ,libx11)
760 ("ncurses" ,ncurses)
761 ("perl" ,perl)))
762 (home-page "https://vifm.info/")
763 (synopsis "Flexible vi-like file manager using ncurses")
764 (description "Vifm is a file manager providing a @command{vi}-like usage
765 experience. It has similar keybindings and modes (e.g. normal, command line,
766 visual). The interface uses ncurses, thus vifm can be used in text-only
767 environments. It supports a wide range of features, some of which are known
768 from the @command{vi}-editor:
769 @enumerate
770 @item utf8 support
771 @item user mappings (almost like in @code{vi})
772 @item ranges in command
773 @item line commands
774 @item user defined commands (with support for ranges)
775 @item registers
776 @item operation undoing/redoing
777 @item fuse file systems support
778 @item trash
779 @item multiple files renaming
780 @item support of filename modifiers
781 @item colorschemes support
782 @item file name color according to file type
783 @item path specific colorscheme customization
784 @item bookmarks
785 @item operation backgrounding
786 @item customizable file viewers
787 @item handy @code{less}-like preview mode
788 @item filtering out and searching for files using regular expressions
789 @item one or two panes view
790 @end enumerate
791 With the package comes a plugin to use vifm as a vim file selector.")
792 (license license:gpl2+)))
793
794 (define-public python-pynvim
795 (package
796 (name "python-pynvim")
797 (version "0.4.2")
798 (source (origin
799 (method url-fetch)
800 (uri (pypi-uri "pynvim" version))
801 (sha256
802 (base32
803 "13qgwkqbx012j5spis1aw8rb120rw0zphgjy1j58irax8r6j1ikb"))))
804 (build-system python-build-system)
805 (propagated-inputs
806 `(("python-greenlet" ,python-greenlet)
807 ("python-msgpack" ,python-msgpack)))
808 (arguments
809 `(#:tests? #f))
810 (home-page "https://github.com/neovim/pynvim")
811 (synopsis "Python client and plugin host for neovim")
812 (description "Pynvim implements support for python plugins in neovim. It
813 also works as a library for connecting to and scripting neovim processes
814 through its msgpack-rpc API.")
815 (license license:asl2.0)))
816
817 (define-public python2-pynvim
818 (package-with-python2 python-pynvim))
819
820 (define-public vim-guix-vim
821 (package
822 (name "vim-guix-vim")
823 (version "0.1.1")
824 (source (origin
825 (method git-fetch)
826 (uri (git-reference
827 (url "https://gitlab.com/Efraim/guix.vim")
828 (commit version)))
829 (file-name (git-file-name name version))
830 (sha256
831 (base32
832 "10bfy0dgwizxr56b4272b7sqajpr6lnz332pzx055dis2zzjap8z"))))
833 (build-system copy-build-system)
834 (arguments
835 '(#:install-plan
836 '(("compiler" "share/vim/vimfiles/")
837 ("doc" "share/vim/vimfiles/")
838 ("indent" "share/vim/vimfiles/")
839 ("ftdetect" "share/vim/vimfiles/")
840 ("ftplugin" "share/vim/vimfiles/")
841 ("syntax" "share/vim/vimfiles/"))))
842 (home-page "https://gitlab.com/Efraim/guix.vim")
843 (synopsis "Guix integration in Vim")
844 (description "This package provides support for GNU Guix in Vim.")
845 (license license:vim)))
846
847 (define-public vim-asyncrun
848 (package
849 (name "vim-asyncrun")
850 (version "2.7.5")
851 (source (origin
852 (method git-fetch)
853 (uri (git-reference
854 (url "https://github.com/skywind3000/asyncrun.vim")
855 (commit version)))
856 (file-name (git-file-name name version))
857 (sha256
858 (base32
859 "02fiqf4rcrxbcgvj02mpd78wkxsrnbi54aciwh9fv5mnz5ka249m"))))
860 (build-system copy-build-system)
861 (arguments
862 '(#:install-plan
863 '(("plugin" "share/vim/vimfiles/")
864 ("doc/" "share/vim/vimfiles/doc" #:include ("asyncrun.txt")))))
865 (home-page "https://github.com/skywind3000/asyncrun.vim")
866 (synopsis "Run Async Shell Commands in Vim")
867 (description "This plugin takes the advantage of new APIs in Vim 8 (and
868 NeoVim) to enable you to run shell commands in background and read output in the
869 quickfix window in realtime.")
870 (license license:expat)))
871
872 (define-public vim-dispatch
873 (package
874 (name "vim-dispatch")
875 (version "1.8")
876 (source
877 (origin
878 (method git-fetch)
879 (uri (git-reference
880 (url "https://github.com/tpope/vim-dispatch")
881 (commit (string-append "v" version))))
882 (file-name (git-file-name name version))
883 (sha256
884 (base32
885 "1m8b5mn2zqlphzs6xfwykwmghf6p0wabrhpjmh7vav35jgcxc4wl"))))
886 (build-system copy-build-system)
887 (arguments
888 '(#:install-plan
889 '(("autoload" "share/vim/vimfiles/")
890 ("doc" "share/vim/vimfiles/")
891 ("plugin" "share/vim/vimfiles/"))))
892 (home-page "https://github.com/tpope/vim-dispatch")
893 (synopsis "Asynchronous build and test dispatcher")
894 (description "Leverage the power of Vim's compiler plugins without being
895 bound by synchronicity. Kick off builds and test suites using one of several
896 asynchronous adapters (including tmux, screen, and a headless mode), and when
897 the job completes, errors will be loaded and parsed automatically.")
898 (license license:vim)))
899
900 (define-public vim-eunuch
901 (let ((commit "33e875b31c8b811a0a47908884a5e2339106bbe8")
902 (revision "1"))
903 (package
904 (name "vim-eunuch")
905 (version (git-version "1.2" revision commit))
906 (source
907 (origin
908 (method git-fetch)
909 (uri (git-reference
910 (url "https://github.com/tpope/vim-eunuch")
911 (commit commit)))
912 (file-name (git-file-name name version))
913 (sha256
914 (base32
915 "1xadb22kd40swmww0qxmmkcpcq6viy8l167pjck5q32hfngll5d3"))))
916 (build-system copy-build-system)
917 (arguments
918 '(#:install-plan
919 '(("doc" "share/vim/vimfiles/")
920 ("plugin" "share/vim/vimfiles/"))))
921 (home-page "https://github.com/tpope/vim-eunuch")
922 (synopsis "Vim sugar for the UNIX shell commands")
923 (description "Vim sugar for the UNIX shell commands that need it the most.
924 This package includes commands such as @code{SudoWrite} and @code{SudoEdit} and
925 help working on Vim buffers and the files they reference with one command.")
926 (license license:vim))))