gnu: python2-ipykernel: Split from python-ipykernel.
[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 Efraim Flashner <efraim@flashner.co.il>
4 ;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
5 ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
6 ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
7 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
8 ;;; Copyright © 2019 HiPhish <hiphish@posteo.de>
9 ;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu>
10 ;;;
11 ;;; This file is part of GNU Guix.
12 ;;;
13 ;;; GNU Guix is free software; you can redistribute it and/or modify it
14 ;;; under the terms of the GNU General Public License as published by
15 ;;; the Free Software Foundation; either version 3 of the License, or (at
16 ;;; your option) any later version.
17 ;;;
18 ;;; GNU Guix is distributed in the hope that it will be useful, but
19 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;;; GNU General Public License for more details.
22 ;;;
23 ;;; You should have received a copy of the GNU General Public License
24 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
25
26 (define-module (gnu packages vim)
27 #:use-module ((guix licenses) #:prefix license:)
28 #:use-module (guix packages)
29 #:use-module (guix utils)
30 #:use-module (guix download)
31 #:use-module (guix git-download)
32 #:use-module (guix build-system cmake)
33 #:use-module (guix build-system gnu)
34 #:use-module (guix build-system python)
35 #:use-module (gnu packages)
36 #:use-module (gnu packages acl)
37 #:use-module (gnu packages admin) ; For GNU hostname
38 #:use-module (gnu packages attr)
39 #:use-module (gnu packages autotools)
40 #:use-module (gnu packages base)
41 #:use-module (gnu packages fontutils)
42 #:use-module (gnu packages gawk)
43 #:use-module (gnu packages gettext)
44 #:use-module (gnu packages glib)
45 #:use-module (gnu packages gperf)
46 #:use-module (gnu packages groff)
47 #:use-module (gnu packages gtk)
48 #:use-module (gnu packages image)
49 #:use-module (gnu packages jemalloc)
50 #:use-module (gnu packages libevent)
51 #:use-module (gnu packages linux)
52 #:use-module (gnu packages lua)
53 #:use-module (gnu packages ncurses)
54 #:use-module (gnu packages perl)
55 #:use-module (gnu packages pkg-config)
56 #:use-module (gnu packages python)
57 #:use-module (gnu packages python-xyz)
58 #:use-module (gnu packages ruby)
59 #:use-module (gnu packages serialization)
60 #:use-module (gnu packages shells)
61 #:use-module (gnu packages tcl)
62 #:use-module (gnu packages text-editors)
63 #:use-module (gnu packages terminals)
64 #:use-module (gnu packages xdisorg)
65 #:use-module (gnu packages xorg))
66
67 (define-public vim
68 (package
69 (name "vim")
70 (version "8.1.0644")
71 (source (origin
72 (method git-fetch)
73 (uri (git-reference
74 (url "https://github.com/vim/vim")
75 (commit (string-append "v" version))))
76 (file-name (git-file-name name version))
77 (sha256
78 (base32
79 "1xksb2v8rw1zgrd5fwqvrh44lf277k85sad2y4ia1z17y7i8j2fl"))))
80 (build-system gnu-build-system)
81 (arguments
82 `(#:test-target "test"
83 #:parallel-tests? #f
84 #:phases
85 (modify-phases %standard-phases
86 (add-after 'configure 'patch-config-files
87 (lambda _
88 (substitute* "runtime/tools/mve.awk"
89 (("/usr/bin/nawk") (which "gawk")))
90 (substitute* '("src/testdir/Makefile"
91 "src/testdir/test_normal.vim"
92 "src/testdir/test_terminal.vim")
93 (("/bin/sh") (which "sh")))
94 #t))
95 (add-before 'check 'patch-failing-tests
96 (lambda _
97 ;; XXX A single test fails with “Can't create file /dev/stdout” (at
98 ;; Test_writefile_sync_dev_stdout line 5) while /dev/stdout exists.
99 (substitute* "src/testdir/test_writefile.vim"
100 (("/dev/stdout") "a-regular-file"))
101
102 ;; XXX: This test fails when run in the build container:
103 ;; <https://github.com/vim/vim/issues/3348>.
104 (substitute* "src/testdir/test_search.vim"
105 ((".*'Test_incsearch_substitute_03'.*" all)
106 (string-append "\"" all "\n")))
107 #t)))))
108 (inputs
109 `(("gawk" ,gawk)
110 ("ncurses" ,ncurses)
111 ("perl" ,perl)
112 ("tcsh" ,tcsh))) ; For runtime/tools/vim32
113 (native-inputs
114 `(("libtool" ,libtool)))
115 (home-page "https://www.vim.org/")
116 (synopsis "Text editor based on vi")
117 (description
118 "Vim is a highly configurable text editor built to enable efficient text
119 editing. It is an improved version of the vi editor distributed with most UNIX
120 systems.
121
122 Vim is often called a \"programmer's editor,\" and so useful for programming
123 that many consider it an entire IDE. It's not just for programmers, though.
124 Vim is perfect for all kinds of text editing, from composing email to editing
125 configuration files.")
126 (license license:vim)))
127
128 (define-public xxd
129 (package (inherit vim)
130 (name "xxd")
131 (arguments
132 `(#:make-flags '("CC=gcc")
133 #:tests? #f ; there are none
134 #:phases
135 (modify-phases %standard-phases
136 (delete 'configure)
137 (add-after 'unpack 'chdir
138 (lambda _
139 (chdir "src/xxd")
140 #t))
141 (replace 'install
142 (lambda* (#:key outputs #:allow-other-keys)
143 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
144 (install-file "xxd" bin)
145 #t))))))
146 (inputs `())
147 (native-inputs `())
148 (synopsis "Hexdump utility from vim")
149 (description "This package provides the Hexdump utility xxd that comes
150 with the editor vim.")))
151
152 (define-public vim-full
153 (package
154 ;; This package should share its source with Vim, but it doesn't
155 ;; build reliably, and we want to keep Vim up to date due to the
156 ;; frequency of important bug fixes.
157 (inherit vim)
158 (name "vim-full")
159 (arguments
160 `(#:configure-flags
161 (list (string-append "--with-lua-prefix="
162 (assoc-ref %build-inputs "lua"))
163 "--with-features=huge"
164 "--enable-python3interp=yes"
165 "--enable-perlinterp=yes"
166 "--enable-rubyinterp=yes"
167 "--enable-tclinterp=yes"
168 "--enable-luainterp=yes"
169 "--enable-cscope"
170 "--enable-sniff"
171 "--enable-multibyte"
172 "--enable-xim"
173 "--disable-selinux"
174 "--enable-gui")
175 ,@(substitute-keyword-arguments (package-arguments vim)
176 ((#:phases phases)
177 `(modify-phases ,phases
178 (add-before 'check 'skip-test87
179 ;; This test fails for unknown reasons after switching
180 ;; to a git checkout.
181 (lambda _
182 (delete-file "src/testdir/test87.ok")
183 (delete-file "src/testdir/test87.in")
184 (substitute* '("src/Makefile"
185 "src/testdir/Make_vms.mms")
186 (("test87") ""))
187 (substitute* "src/testdir/Make_all.mak"
188 (("test86.out \\\\") "test86")
189 (("test87.out") ""))
190 #t))
191 (add-before 'check 'start-xserver
192 (lambda* (#:key inputs #:allow-other-keys)
193 ;; Some tests require an X server, but does not start one.
194 (let ((xorg-server (assoc-ref inputs "xorg-server"))
195 (display ":1"))
196 (setenv "DISPLAY" display)
197 (zero? (system (string-append xorg-server "/bin/Xvfb "
198 display " &")))))))))))
199 (native-inputs
200 `(("pkg-config" ,pkg-config)
201 ("xorg-server" ,xorg-server)
202 ,@(package-native-inputs vim)))
203 (inputs
204 `(("acl" ,acl)
205 ("atk" ,atk)
206 ("attr" ,attr)
207 ("cairo" ,cairo)
208 ("fontconfig" ,fontconfig)
209 ("freetype" ,freetype)
210 ("gdk-pixbuf" ,gdk-pixbuf)
211 ("gettext" ,gettext-minimal)
212 ("glib" ,glib)
213 ("gpm" ,gpm)
214 ("gtk" ,gtk+-2)
215 ("harfbuzz" ,harfbuzz)
216 ("libice" ,libice)
217 ("libpng" ,libpng)
218 ("libsm" ,libsm)
219 ("libx11" ,libx11)
220 ("libxdmcp" ,libxdmcp)
221 ("libxt" ,libxt)
222 ("libxpm" ,libxpm)
223 ("lua" ,lua)
224 ("pango" ,pango)
225 ("pixman" ,pixman)
226 ("python-3" ,python)
227 ("ruby" ,ruby)
228 ("tcl" ,tcl)
229 ,@(package-inputs vim)))))
230
231 (define-public vim-neocomplete
232 (package
233 (name "vim-neocomplete")
234 (version "2.1")
235 (source
236 (origin
237 (method url-fetch)
238 (uri (string-append "https://github.com/Shougo/neocomplete.vim/"
239 "archive/ver." version ".tar.gz"))
240 (file-name (string-append name "-" version ".tar.gz"))
241 (sha256
242 (base32
243 "1307gbrdwam2akq9w2lpijc41740i4layk2qkd9sjkqxfch5lni2"))))
244 (build-system gnu-build-system)
245 (arguments
246 `(#:tests? #f
247 #:phases
248 (modify-phases %standard-phases
249 (delete 'configure)
250 (delete 'build)
251 (replace 'install
252 (lambda* (#:key outputs #:allow-other-keys)
253 (let* ((out (assoc-ref outputs "out"))
254 (vimfiles (string-append out "/share/vim/vimfiles"))
255 (autoload (string-append vimfiles "/autoload"))
256 (doc (string-append vimfiles "/doc"))
257 (plugin (string-append vimfiles "/plugin")))
258 (copy-recursively "autoload" autoload)
259 (copy-recursively "doc" doc)
260 (copy-recursively "plugin" plugin)
261 #t))))))
262 (synopsis "Next generation completion framework for Vim")
263 (description
264 "@code{neocomplete}, an abbreviation of 'neo-completion with cache',
265 is a plugin for Vim.
266 It provides keyword completion system by maintaining a cache of keywords in
267 the current buffer. Neocomplete can be customized easily and has many more
268 features than Vim's built-in completion.")
269 (home-page "https://github.com/Shougo/neocomplete.vim/")
270 (license license:expat)))
271
272 ;; There are no release tarballs.
273 (define-public vim-neosnippet-snippets
274 (let ((commit "8e2b1c0cab9ed9a832b3743dbb65e9966a64331a")
275 (revision "1"))
276 (package
277 (name "vim-neosnippet-snippets")
278 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
279 (source
280 (origin
281 (method git-fetch)
282 (uri (git-reference
283 (url "https://github.com/Shougo/neosnippet-snippets")
284 (commit commit)))
285 (file-name (string-append name "-" version "-checkout"))
286 (sha256
287 (base32
288 "151wpvbj6jb9jdkbhj3b77f5sq7y328spvwfbqyj1y32rg4ifmc6"))))
289 (build-system gnu-build-system)
290 (arguments
291 `(#:tests? #f
292 #:phases
293 (modify-phases %standard-phases
294 (delete 'configure)
295 (delete 'build)
296 (replace 'install
297 (lambda* (#:key outputs #:allow-other-keys)
298 (let* ((out (assoc-ref outputs "out"))
299 (vimfiles (string-append out "/share/vim/vimfiles")))
300 (copy-recursively "neosnippets"
301 (string-append vimfiles "/neosnippets"))
302 #t))))))
303 (synopsis "Snippets for neosnippet")
304 (description
305 "@code{neosnippet-snippets} provides standard snippets for the Vim plugin
306 @code{neosnippet}. Snippets are small templates for commonly used code that
307 you can fill in on the fly.")
308 (home-page "https://github.com/Shougo/neosnippet-snippets")
309 (license license:expat))))
310
311 ;; The released tarball is too old for our Vim.
312 (define-public vim-neosnippet
313 (let ((commit "1bd7e23c79b73da16eb0c9469b25c376d3594583")
314 (revision "1"))
315 (package
316 (name "vim-neosnippet")
317 (version (string-append "4.2-" revision "." (string-take commit 7)))
318 (source
319 (origin
320 (method git-fetch)
321 (uri (git-reference
322 (url "https://github.com/Shougo/neosnippet.vim/")
323 (commit commit)))
324 (file-name (string-append name "-" version "-checkout"))
325 (sha256
326 (base32
327 "0k80syscmpnj38ks1fq02ds59g0r4jlg9ll7z4qc048mgi35alw5"))))
328 (build-system gnu-build-system)
329 (arguments
330 `(#:tests? #f
331 #:phases
332 (modify-phases %standard-phases
333 (delete 'configure)
334 (delete 'build)
335 (replace 'install
336 (lambda* (#:key outputs #:allow-other-keys)
337 (let* ((out (assoc-ref outputs "out"))
338 (vimfiles (string-append out "/share/vim/vimfiles"))
339 (autoload (string-append vimfiles "/autoload"))
340 (doc (string-append vimfiles "/doc"))
341 (ftdetect (string-append vimfiles "/ftdetect"))
342 (ftplugin (string-append vimfiles "/ftplugin"))
343 (indent (string-append vimfiles "/indent"))
344 (plugin (string-append vimfiles "/plugin"))
345 (rplugin (string-append vimfiles "/rplugin"))
346 (syntax (string-append vimfiles "/syntax")))
347 (copy-recursively "autoload" autoload)
348 (copy-recursively "doc" doc)
349 (copy-recursively "ftdetect" ftdetect)
350 (copy-recursively "ftplugin" ftplugin)
351 (copy-recursively "indent" indent)
352 (copy-recursively "plugin" plugin)
353 (copy-recursively "rplugin" rplugin)
354 (copy-recursively "syntax" syntax)
355 #t))))))
356 (synopsis "Snippet support for Vim")
357 (description
358 "@code{neosnippet}, is a plugin for Vim which adds snippet support to Vim.
359 Snippets are small templates for commonly used code that you can fill in on
360 the fly. To use snippets can increase your productivity in Vim a lot.
361 The functionality of this plug-in is quite similar to plug-ins like
362 @code{snipMate.vim} or @code{snippetsEmu.vim}. But since you can choose
363 snippets with the neocomplcache / neocomplete interface, you might have less
364 trouble using them, because you do not have to remember each snippet name.")
365 (home-page "https://github.com/Shougo/neosnippet.vim/")
366 (license license:expat))))
367
368 (define-public vim-scheme
369 (let ((commit "93827987c10f2d5dc519166a761f219204926d5f")
370 (revision "1"))
371 (package
372 (name "vim-scheme")
373 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
374 (source
375 (origin
376 (method git-fetch)
377 (uri (git-reference
378 (url "http://git.foldling.org/vim-scheme.git")
379 (commit commit)))
380 (file-name (string-append name "-" version "-checkout"))
381 (sha256
382 (base32
383 "1ynjr1109dxgj0lz261gmzz3wf5ap1m6j6hnvl3lcyv66a4y8pjv"))))
384 (build-system gnu-build-system)
385 (arguments
386 `(#:tests? #f
387 #:phases
388 (modify-phases %standard-phases
389 (delete 'configure)
390 (delete 'build)
391 (replace 'install
392 (lambda* (#:key outputs #:allow-other-keys)
393 (let* ((out (assoc-ref outputs "out"))
394 (vimfiles (string-append out "/share/vim/vimfiles"))
395 (after (string-append vimfiles "/after"))
396 (syntax (string-append vimfiles "/syntax"))
397 (ftplugin (string-append vimfiles "/ftplugin")))
398 (copy-recursively "after" after)
399 (copy-recursively "ftplugin" ftplugin)
400 (copy-recursively "syntax" syntax)
401 #t))))))
402 (synopsis "Scheme syntax for Vim")
403 (description
404 "@code{vim-scheme} provides Scheme support for Vim (R7RS and CHICKEN).")
405 (home-page "http://foldling.org/git/vim-scheme.git/")
406 (license license:public-domain))))
407
408 (define-public vim-luna
409 (let ((commit "633619953dcf8577168e255230f96b05f28d6371")
410 (revision "1"))
411 (package
412 (name "vim-luna")
413 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
414 (source
415 (origin
416 (method git-fetch)
417 (uri (git-reference
418 (url "https://github.com/notpratheek/vim-luna")
419 (commit commit)))
420 (file-name (string-append name "-" version "-checkout"))
421 (sha256
422 (base32
423 "0ka3qbhsh8lix1vyj4678j7dnchkd8khhirrnn3aylxxf8fpqyg8"))))
424 (build-system gnu-build-system)
425 (arguments
426 `(#:tests? #f
427 #:phases
428 (modify-phases %standard-phases
429 (delete 'configure)
430 (delete 'build)
431 (replace 'install
432 (lambda* (#:key outputs #:allow-other-keys)
433 (let* ((out (assoc-ref outputs "out"))
434 (vimfiles (string-append out "/share/vim/vimfiles"))
435 (colors (string-append vimfiles "/colors")))
436 (copy-recursively "colors" colors)
437 #t))))))
438 (synopsis "Dark color theme for Vim")
439 (description
440 "@code{vim-luna} is a dark color theme for Vim.")
441 (home-page "https://github.com/notpratheek/vim-luna")
442 (license license:expat))))
443
444 ;; There are no tarball releases.
445 (define-public vim-context-filetype
446 (let ((commit "5e85f8cae26806f391aefe2661791a6de53bcea2")
447 (revision "1"))
448 (package
449 (name "vim-context-filetype")
450 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
451 (source
452 (origin
453 (method git-fetch)
454 (uri (git-reference
455 (url "https://github.com/Shougo/context_filetype.vim")
456 (commit commit)))
457 (file-name (string-append name "-" version "-checkout"))
458 (sha256
459 (base32
460 "0alvrfhmd91zkd9h83s8wvgyq4iakcf6rybsyjd369qbgpcqky89"))))
461 (build-system gnu-build-system)
462 (arguments
463 `(#:tests? #f
464 #:phases
465 (modify-phases %standard-phases
466 (delete 'configure)
467 (delete 'build)
468 (replace 'install
469 (lambda* (#:key outputs #:allow-other-keys)
470 (let* ((out (assoc-ref outputs "out"))
471 (vimfiles (string-append out "/share/vim/vimfiles"))
472 (doc (string-append vimfiles "/doc"))
473 (autoload (string-append vimfiles "/autoload")))
474 (copy-recursively "doc" doc)
475 (copy-recursively "autoload" autoload)
476 #t))))))
477 (synopsis "Context filetype library for Vim")
478 (description
479 "@code{vim-context-filetype} is context filetype library for Vim script.")
480 (home-page "https://github.com/Shougo/context_filetype.vim")
481 (license license:expat)))) ; ??? check again
482
483 (define-public vim-fugitive
484 (package
485 (name "vim-fugitive")
486 (version "2.5")
487 (source
488 (origin
489 (method git-fetch)
490 (uri (git-reference
491 (url "https://github.com/tpope/vim-fugitive.git")
492 (commit (string-append "v" version))))
493 (file-name (git-file-name name version))
494 (sha256
495 (base32
496 "17yz7gxn7a49jzndr4z5vnk1y4a6c22qss3mwxzmq4m46fni0k8q"))))
497 (build-system gnu-build-system)
498 (arguments
499 '(#:tests? #f
500 #:phases
501 (modify-phases %standard-phases
502 (delete 'configure)
503 (delete 'build)
504 (replace 'install
505 (lambda* (#:key outputs #:allow-other-keys)
506 (let* ((out (assoc-ref outputs "out"))
507 (vimfiles (string-append out "/share/vim/vimfiles"))
508 (autoload (string-append vimfiles "/autoload"))
509 (doc (string-append vimfiles "/doc"))
510 (ftdetect (string-append vimfiles "/ftdetect"))
511 (plugin (string-append vimfiles "/plugin")))
512 (copy-recursively "autoload" autoload)
513 (copy-recursively "doc" doc)
514 (copy-recursively "ftdetect" ftdetect)
515 (copy-recursively "plugin" plugin)
516 #t))))))
517 (home-page "https://github.com/tpope/vim-fugitive")
518 (synopsis "Vim plugin to work with Git")
519 (description "Vim-fugitive is a wrapper for Vim that complements the
520 command window, where you can stage and review your changes before the next
521 commit or run any Git arbitrary command.")
522 (license license:vim))) ; distributed under the same license as vim
523
524 (define-public vim-airline
525 (package
526 (name "vim-airline")
527 (version "0.10")
528 (source
529 (origin
530 (method git-fetch)
531 (uri (git-reference
532 (url "https://github.com/vim-airline/vim-airline")
533 (commit (string-append "v" version))))
534 (file-name (git-file-name name version))
535 (sha256
536 (base32
537 "0k3c6p3xy6514n1n347ci4q9xjm9wwqirpdysam6f7r39crgmfhd"))))
538 (build-system gnu-build-system)
539 (arguments
540 `(#:tests? #f
541 #:phases
542 (modify-phases %standard-phases
543 (delete 'configure)
544 (delete 'build)
545 (replace 'install
546 (lambda* (#:key outputs #:allow-other-keys)
547 (let* ((out (assoc-ref outputs "out"))
548 (vimfiles (string-append out "/share/vim/vimfiles"))
549 (autoload (string-append vimfiles "/autoload"))
550 (doc (string-append vimfiles "/doc"))
551 (t (string-append vimfiles "/t"))
552 (plugin (string-append vimfiles "/plugin")))
553 (copy-recursively "autoload" autoload)
554 (copy-recursively "doc" doc)
555 (copy-recursively "plugin" plugin)
556 (copy-recursively "t" t)
557 #t))))))
558 (synopsis "Statusline for Vim")
559 (description
560 "@code{vim-airline} is an extensible statusline for Vim.
561 It can be extended and costumized with themes, works with unicode fonts
562 and powerline symbols, etc.")
563 (home-page "https://github.com/vim-airline/vim-airline")
564 (license license:expat)))
565
566 ;; There are no tarball releases.
567 (define-public vim-airline-themes
568 (let ((commit "6026eb78bf362cb3aa875aff8487f65728d0f7d8")
569 (revision "1"))
570 (package
571 (name "vim-airline-themes")
572 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
573 (source
574 (origin
575 (method git-fetch)
576 (uri (git-reference
577 (url "https://github.com/vim-airline/vim-airline-themes")
578 (commit commit)))
579 (file-name (string-append name "-" version "-checkout"))
580 (sha256
581 (base32
582 "13ijkavh1r0935cn2rjsfbdd1q3ka8bi26kw0bdkrqlrqxwvpss8"))))
583 (build-system gnu-build-system)
584 (arguments
585 `(#:tests? #f
586 #:phases
587 (modify-phases %standard-phases
588 (delete 'configure)
589 (delete 'build)
590 (replace 'install
591 (lambda* (#:key outputs #:allow-other-keys)
592 (let* ((out (assoc-ref outputs "out"))
593 (vimfiles (string-append out "/share/vim/vimfiles"))
594 (doc (string-append vimfiles "/doc"))
595 (plugin (string-append vimfiles "/plugin"))
596 (autoload (string-append vimfiles "/autoload")))
597 (copy-recursively "doc" doc)
598 (copy-recursively "autoload" autoload)
599 (copy-recursively "plugin" plugin)
600 #t))))))
601 (synopsis "Collection of themes for Vim-airline")
602 (description
603 "@code{vim-airline-themes} is a collection of themes for @code{vim-airline}.")
604 (home-page "https://github.com/vim-airline/vim-airline-themes")
605 (license license:expat))))
606
607 (define-public vim-syntastic
608 (package
609 (name "vim-syntastic")
610 (version "3.9.0")
611 (source
612 (origin
613 (method git-fetch)
614 (uri (git-reference
615 (url "https://github.com/vim-syntastic/syntastic")
616 (commit version)))
617 (file-name (git-file-name name version))
618 (sha256
619 (base32
620 "121a1mxgfng2y5zmivyyk02mca8pyw72crivf4f1q9nhn0barf57"))))
621 (build-system gnu-build-system)
622 (arguments
623 `(#:tests? #f
624 #:phases
625 (modify-phases %standard-phases
626 (delete 'configure)
627 (delete 'build)
628 (replace 'install
629 (lambda* (#:key outputs #:allow-other-keys)
630 (let* ((out (assoc-ref outputs "out"))
631 (vimfiles (string-append out "/share/vim/vimfiles"))
632 (doc (string-append vimfiles "/doc"))
633 (plugin (string-append vimfiles "/plugin"))
634 (autoload (string-append vimfiles "/autoload"))
635 (syntax-checkers (string-append vimfiles "/syntax_checkers")))
636 (copy-recursively "doc" doc)
637 (copy-recursively "autoload" autoload)
638 (copy-recursively "plugin" plugin)
639 (copy-recursively "syntax_checkers" syntax-checkers)
640 #t))))))
641 (synopsis "Syntax checking plugin for Vim")
642 (description
643 "Vim-syntastic is a syntax checking plugin for Vim. It runs files through
644 external syntax checkers and displays any resulting errors to the user. This
645 can be done on demand, or automatically as files are saved. If syntax errors
646 are detected, the user is notified.")
647 (home-page "https://github.com/vim-syntastic/syntastic")
648 (license license:wtfpl2)))
649
650 (define-public editorconfig-vim
651 (package
652 (name "editorconfig-vim")
653 (version "0.3.3")
654 (source
655 (origin
656 (method git-fetch)
657 (uri (git-reference
658 (url "https://github.com/editorconfig/editorconfig-vim.git")
659 (commit (string-append "v" version))))
660 (file-name (git-file-name name version))
661 (sha256
662 (base32
663 "0vssfl1wjq0mv0p30c3dszwrh4yy90vwxmmdgqaxf5rykik7bdfd"))
664 (modules '((guix build utils)))
665 (snippet
666 '(begin
667 (delete-file-recursively "plugin/editorconfig-core-py") #t))))
668 (build-system gnu-build-system)
669 (arguments
670 '(#:tests? #f ; tests require ruby and plugin-test repository
671 #:phases
672 (modify-phases %standard-phases
673 (delete 'configure)
674 (delete 'build)
675 (add-after 'unpack 'patch-editorconfig-path
676 (lambda* (#:key inputs #:allow-other-keys)
677 (let ((editorconfig (assoc-ref inputs "editorconfig-core")))
678 (substitute* "plugin/editorconfig.vim"
679 (("/opt") editorconfig))
680 #t)))
681 (replace 'install
682 (lambda* (#:key outputs #:allow-other-keys)
683 (let* ((out (assoc-ref outputs "out"))
684 (vimfiles (string-append out "/share/vim/vimfiles"))
685 (doc (string-append vimfiles "/doc"))
686 (plugin (string-append vimfiles "/plugin"))
687 (autoload (string-append vimfiles "/autoload")))
688 (copy-recursively "doc" doc)
689 (copy-recursively "autoload" autoload)
690 (copy-recursively "plugin" plugin)
691 #t))))))
692 (inputs
693 `(("editorconfig-core" ,editorconfig-core-c)))
694 (home-page "https://editorconfig.org/")
695 (synopsis "EditorConfig plugin for Vim")
696 (description "EditorConfig makes it easy to maintain the correct coding
697 style when switching between different text editors and between different
698 projects. The EditorConfig project maintains a file format and plugins for
699 various text editors which allow this file format to be read and used by those
700 editors.")
701 (license license:bsd-2)))
702
703 (define-public neovim-syntastic
704 (package
705 (inherit vim-syntastic)
706 (name "neovim-syntastic")
707 (arguments
708 `(#:tests? #f
709 #:phases
710 (modify-phases %standard-phases
711 (delete 'configure)
712 (delete 'build)
713 (replace 'install
714 (lambda* (#:key outputs #:allow-other-keys)
715 (let* ((out (assoc-ref outputs "out"))
716 (vimfiles (string-append out "/share/nvim/site"))
717 (doc (string-append vimfiles "/doc"))
718 (plugin (string-append vimfiles "/plugin"))
719 (autoload (string-append vimfiles "/autoload"))
720 (syntax-checkers (string-append vimfiles "/syntax_checkers")))
721 (copy-recursively "doc" doc)
722 (copy-recursively "autoload" autoload)
723 (copy-recursively "plugin" plugin)
724 (copy-recursively "syntax_checkers" syntax-checkers)
725 #t))))))
726 (synopsis "Syntax checking plugin for Neovim")
727 (description
728 "Vim-syntastic is a syntax checking plugin for Neovim. It runs files through
729 external syntax checkers and displays any resulting errors to the user. This
730 can be done on demand, or automatically as files are saved. If syntax errors
731 are detected, the user is notified.")))
732
733 (define-public neovim
734 (package
735 (name "neovim")
736 (version "0.3.7")
737 (source
738 (origin
739 (method git-fetch)
740 (uri (git-reference
741 (url "https://github.com/neovim/neovim")
742 (commit (string-append "v" version))))
743 (file-name (git-file-name name version))
744 (sha256
745 (base32
746 "1j6w5jvq5v7kf7diad91qs1acr427nidnk9s24yyrz0hwdd1c2lh"))))
747 (build-system cmake-build-system)
748 (arguments
749 `(#:modules ((srfi srfi-26)
750 (guix build cmake-build-system)
751 (guix build utils))
752 #:configure-flags '("-DPREFER_LUA:BOOL=YES")
753 #:phases
754 (modify-phases %standard-phases
755 ;; TODO: remove 'patch-tic on update
756 ;; see: https://github.com/neovim/neovim/issues/9687
757 (add-after 'unpack 'patch-tic
758 (lambda _
759 (substitute* "src/nvim/tui/tui.c"
760 (("value != NULL") "value != NULL && value != (char *)-1"))
761 #t))
762 (add-after 'unpack 'set-lua-paths
763 (lambda* (#:key inputs #:allow-other-keys)
764 (let* ((lua-version "5.1")
765 (lua-cpath-spec
766 (lambda (prefix)
767 (let ((path (string-append prefix "/lib/lua/" lua-version)))
768 (string-append path "/?.so;" path "/?/?.so"))))
769 (lua-path-spec
770 (lambda (prefix)
771 (let ((path (string-append prefix "/share/lua/" lua-version)))
772 (string-append path "/?.lua;" path "/?/?.lua"))))
773 (lua-inputs (map (cute assoc-ref %build-inputs <>)
774 '("lua"
775 "lua-lpeg"
776 "lua-bitop"
777 "lua-libmpack"))))
778 (setenv "LUA_PATH"
779 (string-join (map lua-path-spec lua-inputs) ";"))
780 (setenv "LUA_CPATH"
781 (string-join (map lua-cpath-spec lua-inputs) ";"))
782 #t))))))
783 (inputs
784 `(("libuv" ,libuv)
785 ("msgpack" ,msgpack)
786 ("libtermkey" ,libtermkey)
787 ("libvterm" ,libvterm)
788 ("unibilium" ,unibilium)
789 ("jemalloc" ,jemalloc)
790 ("libiconv" ,libiconv)
791 ("lua" ,lua-5.1)
792 ("lua-lpeg" ,lua5.1-lpeg)
793 ("lua-bitop" ,lua5.1-bitop)
794 ("lua-libmpack" ,lua5.1-libmpack)))
795 (native-inputs
796 `(("pkg-config" ,pkg-config)
797 ("gettext" ,gettext-minimal)
798 ("gperf" ,gperf)))
799 (home-page "https://neovim.io")
800 (synopsis "Fork of vim focused on extensibility and agility")
801 (description "Neovim is a project that seeks to aggressively
802 refactor Vim in order to:
803
804 @itemize
805 @item Simplify maintenance and encourage contributions
806 @item Split the work between multiple developers
807 @item Enable advanced external UIs without modifications to the core
808 @item Improve extensibility with a new plugin architecture
809 @end itemize\n")
810 ;; Neovim is licensed under the terms of the Apache 2.0 license,
811 ;; except for parts that were contributed under the Vim license.
812 (license (list license:asl2.0 license:vim))))
813
814 (define-public vifm
815 (package
816 (name "vifm")
817 (version "0.10")
818 (source
819 (origin
820 (method url-fetch)
821 (uri (list
822 (string-append "https://github.com/vifm/vifm/releases/download/v"
823 version "/vifm-" version ".tar.bz2")
824 (string-append "https://sourceforge.net/projects/vifm/files/vifm/"
825 "vifm-" version ".tar.bz2")))
826 (sha256
827 (base32
828 "1f380xcyjnm4xmcdazs6dj064bwddhywvn3mgm36k7r7b2gnjnp0"))))
829 (build-system gnu-build-system)
830 (arguments
831 '(#:configure-flags '("--disable-build-timestamp")
832 #:phases
833 (modify-phases %standard-phases
834 (add-after 'patch-source-shebangs 'patch-test-shebangs
835 (lambda _
836 (substitute* (cons* "src/background.c"
837 "src/cfg/config.c"
838 (find-files "tests" "\\.c$"))
839 (("/bin/sh") (which "sh"))
840 (("/bin/bash") (which "bash")))
841 ;; This test segfaults
842 (substitute* "tests/Makefile"
843 (("misc") ""))
844 #t))
845 (add-after 'install 'install-vim-plugin-files
846 (lambda* (#:key outputs #:allow-other-keys)
847 (let* ((out (assoc-ref outputs "out"))
848 (vifm (string-append out "/share/vifm"))
849 (vimfiles (string-append out "/share/vim/vimfiles")))
850 (copy-recursively (string-append vifm "/colors")
851 (string-append vimfiles "/colors"))
852 (copy-recursively (string-append vifm "/vim")
853 vimfiles)
854 (delete-file-recursively (string-append vifm "/colors"))
855 (delete-file-recursively (string-append vifm "/vim")))
856 #t)))))
857 (native-inputs
858 `(("groff" ,groff))) ; for the documentation
859 (inputs
860 `(("libx11" ,libx11)
861 ("ncurses" ,ncurses)
862 ("perl" ,perl)))
863 (home-page "https://vifm.info/")
864 (synopsis "Flexible vi-like file manager using ncurses")
865 (description "Vifm is a file manager providing a @command{vi}-like usage
866 experience. It has similar keybindings and modes (e.g. normal, command line,
867 visual). The interface uses ncurses, thus vifm can be used in text-only
868 environments. It supports a wide range of features, some of which are known
869 from the @command{vi}-editor:
870 @enumerate
871 @item utf8 support
872 @item user mappings (almost like in @code{vi})
873 @item ranges in command
874 @item line commands
875 @item user defined commands (with support for ranges)
876 @item registers
877 @item operation undoing/redoing
878 @item fuse file systems support
879 @item trash
880 @item multiple files renaming
881 @item support of filename modifiers
882 @item colorschemes support
883 @item file name color according to file type
884 @item path specific colorscheme customization
885 @item bookmarks
886 @item operation backgrounding
887 @item customizable file viewers
888 @item handy @code{less}-like preview mode
889 @item filtering out and searching for files using regular expressions
890 @item one or two panes view
891 @end enumerate
892 With the package comes a plugin to use vifm as a vim file selector.")
893 (license license:gpl2+)))
894
895 (define-public python-pynvim
896 (package
897 (name "python-pynvim")
898 (version "0.3.2")
899 (source (origin
900 (method url-fetch)
901 (uri (pypi-uri "pynvim" version))
902 (sha256
903 (base32
904 "01dybk4vs452pljn1q3il5z2sd313ki0lgiglc0xmjc6wp290r6g"))))
905 (build-system python-build-system)
906 (propagated-inputs
907 `(("python-greenlet" ,python-greenlet)
908 ("python-msgpack" ,python-msgpack)))
909 (arguments
910 `(#:tests? #f))
911 (home-page "https://github.com/neovim/pynvim")
912 (synopsis "Python client and plugin host for neovim")
913 (description "Pynvim implements support for python plugins in neovim. It
914 also works as a library for connecting to and scripting neovim processes
915 through its msgpack-rpc API.")
916 (license license:asl2.0)))
917
918 (define-public python2-pynvim
919 (package-with-python2 python-pynvim))