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