gnu: Add rsibreak.
[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, 2019 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-for-tests)
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 git-fetch)
238 (uri (git-reference
239 (url "https://github.com/Shougo/neocomplete.vim")
240 (commit (string-append "ver." version))))
241 (file-name (git-file-name name version))
242 (sha256
243 (base32
244 "1h6sci5mhdfg6sjsjpi8l5li02hg858zcayiwl60y9j2gqnd18lv"))))
245 (build-system gnu-build-system)
246 (arguments
247 `(#:tests? #f
248 #:phases
249 (modify-phases %standard-phases
250 (delete 'configure)
251 (delete 'build)
252 (replace 'install
253 (lambda* (#:key outputs #:allow-other-keys)
254 (let* ((out (assoc-ref outputs "out"))
255 (vimfiles (string-append out "/share/vim/vimfiles"))
256 (autoload (string-append vimfiles "/autoload"))
257 (doc (string-append vimfiles "/doc"))
258 (plugin (string-append vimfiles "/plugin")))
259 (copy-recursively "autoload" autoload)
260 (copy-recursively "doc" doc)
261 (copy-recursively "plugin" plugin)
262 #t))))))
263 (synopsis "Next generation completion framework for Vim")
264 (description
265 "@code{neocomplete}, an abbreviation of 'neo-completion with cache',
266 is a plugin for Vim.
267 It provides keyword completion system by maintaining a cache of keywords in
268 the current buffer. Neocomplete can be customized easily and has many more
269 features than Vim's built-in completion.")
270 (home-page "https://github.com/Shougo/neocomplete.vim/")
271 (license license:expat)))
272
273 ;; There are no release tarballs.
274 (define-public vim-neosnippet-snippets
275 (let ((commit "8e2b1c0cab9ed9a832b3743dbb65e9966a64331a")
276 (revision "1"))
277 (package
278 (name "vim-neosnippet-snippets")
279 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
280 (source
281 (origin
282 (method git-fetch)
283 (uri (git-reference
284 (url "https://github.com/Shougo/neosnippet-snippets")
285 (commit commit)))
286 (file-name (string-append name "-" version "-checkout"))
287 (sha256
288 (base32
289 "151wpvbj6jb9jdkbhj3b77f5sq7y328spvwfbqyj1y32rg4ifmc6"))))
290 (build-system gnu-build-system)
291 (arguments
292 `(#:tests? #f
293 #:phases
294 (modify-phases %standard-phases
295 (delete 'configure)
296 (delete 'build)
297 (replace 'install
298 (lambda* (#:key outputs #:allow-other-keys)
299 (let* ((out (assoc-ref outputs "out"))
300 (vimfiles (string-append out "/share/vim/vimfiles")))
301 (copy-recursively "neosnippets"
302 (string-append vimfiles "/neosnippets"))
303 #t))))))
304 (synopsis "Snippets for neosnippet")
305 (description
306 "@code{neosnippet-snippets} provides standard snippets for the Vim plugin
307 @code{neosnippet}. Snippets are small templates for commonly used code that
308 you can fill in on the fly.")
309 (home-page "https://github.com/Shougo/neosnippet-snippets")
310 (license license:expat))))
311
312 ;; The released tarball is too old for our Vim.
313 (define-public vim-neosnippet
314 (let ((commit "1bd7e23c79b73da16eb0c9469b25c376d3594583")
315 (revision "1"))
316 (package
317 (name "vim-neosnippet")
318 (version (string-append "4.2-" revision "." (string-take commit 7)))
319 (source
320 (origin
321 (method git-fetch)
322 (uri (git-reference
323 (url "https://github.com/Shougo/neosnippet.vim/")
324 (commit commit)))
325 (file-name (string-append name "-" version "-checkout"))
326 (sha256
327 (base32
328 "0k80syscmpnj38ks1fq02ds59g0r4jlg9ll7z4qc048mgi35alw5"))))
329 (build-system gnu-build-system)
330 (arguments
331 `(#:tests? #f
332 #:phases
333 (modify-phases %standard-phases
334 (delete 'configure)
335 (delete 'build)
336 (replace 'install
337 (lambda* (#:key outputs #:allow-other-keys)
338 (let* ((out (assoc-ref outputs "out"))
339 (vimfiles (string-append out "/share/vim/vimfiles"))
340 (autoload (string-append vimfiles "/autoload"))
341 (doc (string-append vimfiles "/doc"))
342 (ftdetect (string-append vimfiles "/ftdetect"))
343 (ftplugin (string-append vimfiles "/ftplugin"))
344 (indent (string-append vimfiles "/indent"))
345 (plugin (string-append vimfiles "/plugin"))
346 (rplugin (string-append vimfiles "/rplugin"))
347 (syntax (string-append vimfiles "/syntax")))
348 (copy-recursively "autoload" autoload)
349 (copy-recursively "doc" doc)
350 (copy-recursively "ftdetect" ftdetect)
351 (copy-recursively "ftplugin" ftplugin)
352 (copy-recursively "indent" indent)
353 (copy-recursively "plugin" plugin)
354 (copy-recursively "rplugin" rplugin)
355 (copy-recursively "syntax" syntax)
356 #t))))))
357 (synopsis "Snippet support for Vim")
358 (description
359 "@code{neosnippet}, is a plugin for Vim which adds snippet support to Vim.
360 Snippets are small templates for commonly used code that you can fill in on
361 the fly. To use snippets can increase your productivity in Vim a lot.
362 The functionality of this plug-in is quite similar to plug-ins like
363 @code{snipMate.vim} or @code{snippetsEmu.vim}. But since you can choose
364 snippets with the neocomplcache / neocomplete interface, you might have less
365 trouble using them, because you do not have to remember each snippet name.")
366 (home-page "https://github.com/Shougo/neosnippet.vim/")
367 (license license:expat))))
368
369 (define-public vim-scheme
370 (let ((commit "93827987c10f2d5dc519166a761f219204926d5f")
371 (revision "1"))
372 (package
373 (name "vim-scheme")
374 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
375 (source
376 (origin
377 (method git-fetch)
378 (uri (git-reference
379 (url "http://git.foldling.org/vim-scheme.git")
380 (commit commit)))
381 (file-name (string-append name "-" version "-checkout"))
382 (sha256
383 (base32
384 "1ynjr1109dxgj0lz261gmzz3wf5ap1m6j6hnvl3lcyv66a4y8pjv"))))
385 (build-system gnu-build-system)
386 (arguments
387 `(#:tests? #f
388 #:phases
389 (modify-phases %standard-phases
390 (delete 'configure)
391 (delete 'build)
392 (replace 'install
393 (lambda* (#:key outputs #:allow-other-keys)
394 (let* ((out (assoc-ref outputs "out"))
395 (vimfiles (string-append out "/share/vim/vimfiles"))
396 (after (string-append vimfiles "/after"))
397 (syntax (string-append vimfiles "/syntax"))
398 (ftplugin (string-append vimfiles "/ftplugin")))
399 (copy-recursively "after" after)
400 (copy-recursively "ftplugin" ftplugin)
401 (copy-recursively "syntax" syntax)
402 #t))))))
403 (synopsis "Scheme syntax for Vim")
404 (description
405 "@code{vim-scheme} provides Scheme support for Vim (R7RS and CHICKEN).")
406 (home-page "http://foldling.org/git/vim-scheme.git/")
407 (license license:public-domain))))
408
409 (define-public vim-luna
410 (let ((commit "633619953dcf8577168e255230f96b05f28d6371")
411 (revision "1"))
412 (package
413 (name "vim-luna")
414 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
415 (source
416 (origin
417 (method git-fetch)
418 (uri (git-reference
419 (url "https://github.com/notpratheek/vim-luna")
420 (commit commit)))
421 (file-name (string-append name "-" version "-checkout"))
422 (sha256
423 (base32
424 "0ka3qbhsh8lix1vyj4678j7dnchkd8khhirrnn3aylxxf8fpqyg8"))))
425 (build-system gnu-build-system)
426 (arguments
427 `(#:tests? #f
428 #:phases
429 (modify-phases %standard-phases
430 (delete 'configure)
431 (delete 'build)
432 (replace 'install
433 (lambda* (#:key outputs #:allow-other-keys)
434 (let* ((out (assoc-ref outputs "out"))
435 (vimfiles (string-append out "/share/vim/vimfiles"))
436 (colors (string-append vimfiles "/colors")))
437 (copy-recursively "colors" colors)
438 #t))))))
439 (synopsis "Dark color theme for Vim")
440 (description
441 "@code{vim-luna} is a dark color theme for Vim.")
442 (home-page "https://github.com/notpratheek/vim-luna")
443 (license license:expat))))
444
445 ;; There are no tarball releases.
446 (define-public vim-context-filetype
447 (let ((commit "5e85f8cae26806f391aefe2661791a6de53bcea2")
448 (revision "1"))
449 (package
450 (name "vim-context-filetype")
451 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
452 (source
453 (origin
454 (method git-fetch)
455 (uri (git-reference
456 (url "https://github.com/Shougo/context_filetype.vim")
457 (commit commit)))
458 (file-name (string-append name "-" version "-checkout"))
459 (sha256
460 (base32
461 "0alvrfhmd91zkd9h83s8wvgyq4iakcf6rybsyjd369qbgpcqky89"))))
462 (build-system gnu-build-system)
463 (arguments
464 `(#:tests? #f
465 #:phases
466 (modify-phases %standard-phases
467 (delete 'configure)
468 (delete 'build)
469 (replace 'install
470 (lambda* (#:key outputs #:allow-other-keys)
471 (let* ((out (assoc-ref outputs "out"))
472 (vimfiles (string-append out "/share/vim/vimfiles"))
473 (doc (string-append vimfiles "/doc"))
474 (autoload (string-append vimfiles "/autoload")))
475 (copy-recursively "doc" doc)
476 (copy-recursively "autoload" autoload)
477 #t))))))
478 (synopsis "Context filetype library for Vim")
479 (description
480 "@code{vim-context-filetype} is context filetype library for Vim script.")
481 (home-page "https://github.com/Shougo/context_filetype.vim")
482 (license license:expat)))) ; ??? check again
483
484 (define-public vim-fugitive
485 (package
486 (name "vim-fugitive")
487 (version "3.1")
488 (source
489 (origin
490 (method git-fetch)
491 (uri (git-reference
492 (url "https://github.com/tpope/vim-fugitive.git")
493 (commit (string-append "v" version))))
494 (file-name (git-file-name name version))
495 (sha256
496 (base32
497 "0d9jhmidmy5c60iy9x47gqr675n5wp9wrzln83r8ima1fz7vvbgs"))))
498 (build-system gnu-build-system)
499 (arguments
500 '(#:tests? #f
501 #:phases
502 (modify-phases %standard-phases
503 (delete 'configure)
504 (delete 'build)
505 (replace 'install
506 (lambda* (#:key outputs #:allow-other-keys)
507 (let* ((out (assoc-ref outputs "out"))
508 (vimfiles (string-append out "/share/vim/vimfiles"))
509 (autoload (string-append vimfiles "/autoload"))
510 (doc (string-append vimfiles "/doc"))
511 (ftdetect (string-append vimfiles "/ftdetect"))
512 (plugin (string-append vimfiles "/plugin"))
513 (syntax (string-append vimfiles "/syntax")))
514 (copy-recursively "autoload" autoload)
515 (copy-recursively "doc" doc)
516 (copy-recursively "ftdetect" ftdetect)
517 (copy-recursively "plugin" plugin)
518 (copy-recursively "syntax" syntax)
519 #t))))))
520 (home-page "https://github.com/tpope/vim-fugitive")
521 (synopsis "Vim plugin to work with Git")
522 (description "Vim-fugitive is a wrapper for Vim that complements the
523 command window, where you can stage and review your changes before the next
524 commit or run any Git arbitrary command.")
525 (license license:vim))) ; distributed under the same license as vim
526
527 (define-public vim-airline
528 (package
529 (name "vim-airline")
530 (version "0.11")
531 (source
532 (origin
533 (method git-fetch)
534 (uri (git-reference
535 (url "https://github.com/vim-airline/vim-airline")
536 (commit (string-append "v" version))))
537 (file-name (git-file-name name version))
538 (sha256
539 (base32
540 "1aksmr73648pvyc75pfdz28k2d4ky52rn7xiwcv7lz87q3vqld7k"))))
541 (build-system gnu-build-system)
542 (arguments
543 `(#:tests? #f
544 #:phases
545 (modify-phases %standard-phases
546 (delete 'configure)
547 (delete 'build)
548 (replace 'install
549 (lambda* (#:key outputs #:allow-other-keys)
550 (let* ((out (assoc-ref outputs "out"))
551 (vimfiles (string-append out "/share/vim/vimfiles"))
552 (autoload (string-append vimfiles "/autoload"))
553 (doc (string-append vimfiles "/doc"))
554 (t (string-append vimfiles "/t"))
555 (plugin (string-append vimfiles "/plugin")))
556 (copy-recursively "autoload" autoload)
557 (copy-recursively "doc" doc)
558 (copy-recursively "plugin" plugin)
559 (copy-recursively "t" t)
560 #t))))))
561 (synopsis "Statusline for Vim")
562 (description
563 "@code{vim-airline} is an extensible statusline for Vim.
564 It can be extended and costumized with themes, works with unicode fonts
565 and powerline symbols, etc.")
566 (home-page "https://github.com/vim-airline/vim-airline")
567 (license license:expat)))
568
569 ;; There are no tarball releases.
570 (define-public vim-airline-themes
571 (let ((commit "e6f233231b232b6027cde6aebeeb18d9138e5324")
572 (revision "2"))
573 (package
574 (name "vim-airline-themes")
575 (version (git-version "0.0.0" revision commit))
576 (source
577 (origin
578 (method git-fetch)
579 (uri (git-reference
580 (url "https://github.com/vim-airline/vim-airline-themes")
581 (commit commit)))
582 (file-name (git-file-name name version))
583 (sha256
584 (base32
585 "1sb7nb7j7bz0pv1c9bgdy0smhr0jk2b1vbdv9yzghg5lrknpsbr6"))))
586 (build-system gnu-build-system)
587 (arguments
588 `(#:tests? #f
589 #:phases
590 (modify-phases %standard-phases
591 (delete 'configure)
592 (delete 'build)
593 (replace 'install
594 (lambda* (#:key outputs #:allow-other-keys)
595 (let* ((out (assoc-ref outputs "out"))
596 (vimfiles (string-append out "/share/vim/vimfiles"))
597 (doc (string-append vimfiles "/doc"))
598 (plugin (string-append vimfiles "/plugin"))
599 (autoload (string-append vimfiles "/autoload")))
600 (copy-recursively "doc" doc)
601 (copy-recursively "autoload" autoload)
602 (copy-recursively "plugin" plugin)
603 #t))))))
604 (synopsis "Collection of themes for Vim-airline")
605 (description
606 "@code{vim-airline-themes} is a collection of themes for @code{vim-airline}.")
607 (home-page "https://github.com/vim-airline/vim-airline-themes")
608 (license license:expat))))
609
610 (define-public vim-syntastic
611 (package
612 (name "vim-syntastic")
613 (version "3.10.0")
614 (source
615 (origin
616 (method git-fetch)
617 (uri (git-reference
618 (url "https://github.com/vim-syntastic/syntastic")
619 (commit version)))
620 (file-name (git-file-name name version))
621 (sha256
622 (base32 "0j91f72jaz1s6aw1hpjiz30vk2ds2aqd9gisk91grsldy6nz6hhz"))))
623 (build-system gnu-build-system)
624 (arguments
625 `(#:tests? #f
626 #:phases
627 (modify-phases %standard-phases
628 (delete 'configure)
629 (delete 'build)
630 (replace 'install
631 (lambda* (#:key outputs #:allow-other-keys)
632 (let* ((out (assoc-ref outputs "out"))
633 (vimfiles (string-append out "/share/vim/vimfiles"))
634 (doc (string-append vimfiles "/doc"))
635 (plugin (string-append vimfiles "/plugin"))
636 (autoload (string-append vimfiles "/autoload"))
637 (syntax-checkers (string-append vimfiles "/syntax_checkers")))
638 (copy-recursively "doc" doc)
639 (copy-recursively "autoload" autoload)
640 (copy-recursively "plugin" plugin)
641 (copy-recursively "syntax_checkers" syntax-checkers)
642 #t))))))
643 (synopsis "Syntax checking plugin for Vim")
644 (description
645 "Vim-syntastic is a syntax checking plugin for Vim. It runs files through
646 external syntax checkers and displays any resulting errors to the user. This
647 can be done on demand, or automatically as files are saved. If syntax errors
648 are detected, the user is notified.")
649 (home-page "https://github.com/vim-syntastic/syntastic")
650 (license license:wtfpl2)))
651
652 (define-public editorconfig-vim
653 (package
654 (name "editorconfig-vim")
655 (version "0.3.3")
656 (source
657 (origin
658 (method git-fetch)
659 (uri (git-reference
660 (url "https://github.com/editorconfig/editorconfig-vim.git")
661 (commit (string-append "v" version))))
662 (file-name (git-file-name name version))
663 (sha256
664 (base32
665 "0vssfl1wjq0mv0p30c3dszwrh4yy90vwxmmdgqaxf5rykik7bdfd"))
666 (modules '((guix build utils)))
667 (snippet
668 '(begin
669 (delete-file-recursively "plugin/editorconfig-core-py") #t))))
670 (build-system gnu-build-system)
671 (arguments
672 '(#:tests? #f ; tests require ruby and plugin-test repository
673 #:phases
674 (modify-phases %standard-phases
675 (delete 'configure)
676 (delete 'build)
677 (add-after 'unpack 'patch-editorconfig-path
678 (lambda* (#:key inputs #:allow-other-keys)
679 (let ((editorconfig (assoc-ref inputs "editorconfig-core")))
680 (substitute* "plugin/editorconfig.vim"
681 (("/opt") editorconfig))
682 #t)))
683 (replace 'install
684 (lambda* (#:key outputs #:allow-other-keys)
685 (let* ((out (assoc-ref outputs "out"))
686 (vimfiles (string-append out "/share/vim/vimfiles"))
687 (doc (string-append vimfiles "/doc"))
688 (plugin (string-append vimfiles "/plugin"))
689 (autoload (string-append vimfiles "/autoload")))
690 (copy-recursively "doc" doc)
691 (copy-recursively "autoload" autoload)
692 (copy-recursively "plugin" plugin)
693 #t))))))
694 (inputs
695 `(("editorconfig-core" ,editorconfig-core-c)))
696 (home-page "https://editorconfig.org/")
697 (synopsis "EditorConfig plugin for Vim")
698 (description "EditorConfig makes it easy to maintain the correct coding
699 style when switching between different text editors and between different
700 projects. The EditorConfig project maintains a file format and plugins for
701 various text editors which allow this file format to be read and used by those
702 editors.")
703 (license license:bsd-2)))
704
705 (define-public neovim-syntastic
706 (package
707 (inherit vim-syntastic)
708 (name "neovim-syntastic")
709 (arguments
710 `(#:tests? #f
711 #:phases
712 (modify-phases %standard-phases
713 (delete 'configure)
714 (delete 'build)
715 (replace 'install
716 (lambda* (#:key outputs #:allow-other-keys)
717 (let* ((out (assoc-ref outputs "out"))
718 (vimfiles (string-append out "/share/nvim/site"))
719 (doc (string-append vimfiles "/doc"))
720 (plugin (string-append vimfiles "/plugin"))
721 (autoload (string-append vimfiles "/autoload"))
722 (syntax-checkers (string-append vimfiles "/syntax_checkers")))
723 (copy-recursively "doc" doc)
724 (copy-recursively "autoload" autoload)
725 (copy-recursively "plugin" plugin)
726 (copy-recursively "syntax_checkers" syntax-checkers)
727 #t))))))
728 (synopsis "Syntax checking plugin for Neovim")
729 (description
730 "Vim-syntastic is a syntax checking plugin for Neovim. It runs files through
731 external syntax checkers and displays any resulting errors to the user. This
732 can be done on demand, or automatically as files are saved. If syntax errors
733 are detected, the user is notified.")))
734
735 (define-public neovim
736 (package
737 (name "neovim")
738 (version "0.4.3")
739 (source
740 (origin
741 (method git-fetch)
742 (uri (git-reference
743 (url "https://github.com/neovim/neovim")
744 (commit (string-append "v" version))))
745 (file-name (git-file-name name version))
746 (sha256
747 (base32 "03p7pic7hw9yxxv7fbgls1f42apx3lik2k6mpaz1a109ngyc5kaj"))))
748 (build-system cmake-build-system)
749 (arguments
750 `(#:modules ((srfi srfi-26)
751 (guix build cmake-build-system)
752 (guix build utils))
753 #:configure-flags '("-DPREFER_LUA:BOOL=YES")
754 #:phases
755 (modify-phases %standard-phases
756 (add-after 'unpack 'set-lua-paths
757 (lambda* (#:key inputs #:allow-other-keys)
758 (let* ((lua-version "5.1")
759 (lua-cpath-spec
760 (lambda (prefix)
761 (let ((path (string-append prefix "/lib/lua/" lua-version)))
762 (string-append path "/?.so;" path "/?/?.so"))))
763 (lua-path-spec
764 (lambda (prefix)
765 (let ((path (string-append prefix "/share/lua/" lua-version)))
766 (string-append path "/?.lua;" path "/?/?.lua"))))
767 (lua-inputs (map (cute assoc-ref %build-inputs <>)
768 '("lua"
769 "lua-luv"
770 "lua-lpeg"
771 "lua-bitop"
772 "lua-libmpack"))))
773 (setenv "LUA_PATH"
774 (string-join (map lua-path-spec lua-inputs) ";"))
775 (setenv "LUA_CPATH"
776 (string-join (map lua-cpath-spec lua-inputs) ";"))
777 #t)))
778 (add-after 'unpack 'prevent-embedding-gcc-store-path
779 (lambda _
780 ;; nvim remembers its build options, including the compiler with
781 ;; its complete path. This adds gcc to the closure of nvim, which
782 ;; doubles its size. We remove the refirence here.
783 (substitute* "cmake/GetCompileFlags.cmake"
784 (("\\$\\{CMAKE_C_COMPILER\\}") "/gnu/store/.../bin/gcc"))
785 #t)))))
786 (inputs
787 `(("libuv" ,libuv)
788 ("msgpack" ,msgpack)
789 ("libtermkey" ,libtermkey)
790 ("libvterm" ,libvterm)
791 ("unibilium" ,unibilium)
792 ("jemalloc" ,jemalloc)
793 ("libiconv" ,libiconv)
794 ("lua" ,lua-5.1)
795 ("lua-luv" ,lua5.1-luv)
796 ("lua-lpeg" ,lua5.1-lpeg)
797 ("lua-bitop" ,lua5.1-bitop)
798 ("lua-libmpack" ,lua5.1-libmpack)))
799 (native-inputs
800 `(("pkg-config" ,pkg-config)
801 ("gettext" ,gettext-minimal)
802 ("gperf" ,gperf)))
803 (home-page "https://neovim.io")
804 (synopsis "Fork of vim focused on extensibility and agility")
805 (description "Neovim is a project that seeks to aggressively
806 refactor Vim in order to:
807
808 @itemize
809 @item Simplify maintenance and encourage contributions
810 @item Split the work between multiple developers
811 @item Enable advanced external UIs without modifications to the core
812 @item Improve extensibility with a new plugin architecture
813 @end itemize\n")
814 ;; Neovim is licensed under the terms of the Apache 2.0 license,
815 ;; except for parts that were contributed under the Vim license.
816 (license (list license:asl2.0 license:vim))))
817
818 (define-public vifm
819 (package
820 (name "vifm")
821 (version "0.10.1")
822 (source
823 (origin
824 (method url-fetch)
825 (uri (list
826 (string-append "https://github.com/vifm/vifm/releases/download/v"
827 version "/vifm-" version ".tar.bz2")
828 (string-append "https://sourceforge.net/projects/vifm/files/vifm/"
829 "vifm-" version ".tar.bz2")))
830 (sha256
831 (base32
832 "0fyhxh7ndjn8fyjhj14ymkr3pjcs3k1xbs43g7xvvq85vdb6y04r"))))
833 (build-system gnu-build-system)
834 (arguments
835 '(#:configure-flags '("--disable-build-timestamp")
836 #:phases
837 (modify-phases %standard-phases
838 (add-after 'patch-source-shebangs 'patch-test-shebangs
839 (lambda _
840 (substitute* (cons* "src/background.c"
841 "src/cfg/config.c"
842 (find-files "tests" "\\.c$"))
843 (("/bin/sh") (which "sh"))
844 (("/bin/bash") (which "bash")))
845 ;; This test segfaults
846 (substitute* "tests/Makefile"
847 (("misc") ""))
848 #t))
849 (add-after 'install 'install-vim-plugin-files
850 (lambda* (#:key outputs #:allow-other-keys)
851 (let* ((out (assoc-ref outputs "out"))
852 (vifm (string-append out "/share/vifm"))
853 (vimfiles (string-append out "/share/vim/vimfiles")))
854 (copy-recursively (string-append vifm "/colors")
855 (string-append vimfiles "/colors"))
856 (copy-recursively (string-append vifm "/vim")
857 vimfiles)
858 (delete-file-recursively (string-append vifm "/colors"))
859 (delete-file-recursively (string-append vifm "/vim")))
860 #t)))))
861 (native-inputs
862 `(("groff" ,groff))) ; for the documentation
863 (inputs
864 `(("libx11" ,libx11)
865 ("ncurses" ,ncurses)
866 ("perl" ,perl)))
867 (home-page "https://vifm.info/")
868 (synopsis "Flexible vi-like file manager using ncurses")
869 (description "Vifm is a file manager providing a @command{vi}-like usage
870 experience. It has similar keybindings and modes (e.g. normal, command line,
871 visual). The interface uses ncurses, thus vifm can be used in text-only
872 environments. It supports a wide range of features, some of which are known
873 from the @command{vi}-editor:
874 @enumerate
875 @item utf8 support
876 @item user mappings (almost like in @code{vi})
877 @item ranges in command
878 @item line commands
879 @item user defined commands (with support for ranges)
880 @item registers
881 @item operation undoing/redoing
882 @item fuse file systems support
883 @item trash
884 @item multiple files renaming
885 @item support of filename modifiers
886 @item colorschemes support
887 @item file name color according to file type
888 @item path specific colorscheme customization
889 @item bookmarks
890 @item operation backgrounding
891 @item customizable file viewers
892 @item handy @code{less}-like preview mode
893 @item filtering out and searching for files using regular expressions
894 @item one or two panes view
895 @end enumerate
896 With the package comes a plugin to use vifm as a vim file selector.")
897 (license license:gpl2+)))
898
899 (define-public python-pynvim
900 (package
901 (name "python-pynvim")
902 (version "0.3.2")
903 (source (origin
904 (method url-fetch)
905 (uri (pypi-uri "pynvim" version))
906 (sha256
907 (base32
908 "01dybk4vs452pljn1q3il5z2sd313ki0lgiglc0xmjc6wp290r6g"))))
909 (build-system python-build-system)
910 (propagated-inputs
911 `(("python-greenlet" ,python-greenlet)
912 ("python-msgpack" ,python-msgpack)))
913 (arguments
914 `(#:tests? #f))
915 (home-page "https://github.com/neovim/pynvim")
916 (synopsis "Python client and plugin host for neovim")
917 (description "Pynvim implements support for python plugins in neovim. It
918 also works as a library for connecting to and scripting neovim processes
919 through its msgpack-rpc API.")
920 (license license:asl2.0)))
921
922 (define-public python2-pynvim
923 (package-with-python2 python-pynvim))