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