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