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