gnu: r-fields: Update to 11.4.
[jackhill/guix/guix.git] / gnu / packages / vim.scm
CommitLineData
eb490858
CR
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
504b9ba7 3;;; Copyright © 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
3c986a7d 4;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
9b11eee9 5;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
38190ea5 6;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
442277d0 7;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
c3ebaec5 8;;; Copyright © 2019 HiPhish <hiphish@posteo.de>
24d32e67 9;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu>
d0f31aee 10;;; Copyright © 2019, 2020 Jakub Kądziołka <kuba@kadziolka.net>
cae3b377 11;;; Copyright © 2020 Jack Hill <jackhill@jackhill.us>
eb490858
CR
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)
b5b73a82 29 #:use-module ((guix licenses) #:prefix license:)
eb490858 30 #:use-module (guix packages)
38190ea5 31 #:use-module (guix utils)
eb490858 32 #:use-module (guix download)
843b19ca 33 #:use-module (guix git-download)
9b11eee9 34 #:use-module (guix build-system cmake)
72194753 35 #:use-module (guix build-system copy)
eb490858 36 #:use-module (guix build-system gnu)
24d32e67 37 #:use-module (guix build-system python)
eb490858 38 #:use-module (gnu packages)
ad6198a5 39 #:use-module (gnu packages acl)
40 #:use-module (gnu packages admin) ; For GNU hostname
41 #:use-module (gnu packages attr)
9123c420 42 #:use-module (gnu packages autotools)
9b11eee9 43 #:use-module (gnu packages base)
ad6198a5 44 #:use-module (gnu packages fontutils)
eb490858 45 #:use-module (gnu packages gawk)
ad6198a5 46 #:use-module (gnu packages gettext)
47 #:use-module (gnu packages glib)
9b11eee9 48 #:use-module (gnu packages gperf)
65dccb3a 49 #:use-module (gnu packages groff)
ad6198a5 50 #:use-module (gnu packages gtk)
51 #:use-module (gnu packages image)
9b11eee9
RW
52 #:use-module (gnu packages jemalloc)
53 #:use-module (gnu packages libevent)
ad6198a5 54 #:use-module (gnu packages linux)
55 #:use-module (gnu packages lua)
eb490858
CR
56 #:use-module (gnu packages ncurses)
57 #:use-module (gnu packages perl)
ad6198a5 58 #:use-module (gnu packages pkg-config)
59 #:use-module (gnu packages python)
24d32e67 60 #:use-module (gnu packages python-xyz)
ad6198a5 61 #:use-module (gnu packages ruby)
9b11eee9 62 #:use-module (gnu packages serialization)
ad6198a5 63 #:use-module (gnu packages shells)
64 #:use-module (gnu packages tcl)
de3ed0b4 65 #:use-module (gnu packages text-editors)
9b11eee9 66 #:use-module (gnu packages terminals)
ad6198a5 67 #:use-module (gnu packages xdisorg)
68 #:use-module (gnu packages xorg))
eb490858
CR
69
70(define-public vim
71 (package
72 (name "vim")
19ab5800 73 (version "8.2.1500")
eb490858 74 (source (origin
b1303549
EF
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))
eb490858
CR
80 (sha256
81 (base32
19ab5800 82 "1f3ghv7g6khcvvs8irkxmskzc352xxmxw3wy0jq9q9r497v6p3ls"))))
eb490858
CR
83 (build-system gnu-build-system)
84 (arguments
85 `(#:test-target "test"
86 #:parallel-tests? #f
87 #:phases
7a93feb8 88 (modify-phases %standard-phases
3e09a2be
JK
89 (add-after 'patch-source-shebangs 'fix-installman
90 (lambda _
91 (substitute* "src/installman.sh"
92 ((" /bin/sh") (which "sh")))
93 #t))
a5dbc07d 94 (add-after 'configure 'patch-absolute-paths
7a93feb8
EF
95 (lambda _
96 (substitute* "runtime/tools/mve.awk"
97 (("/usr/bin/nawk") (which "gawk")))
db3cc007 98 (substitute* '("src/testdir/Makefile"
aa75dada 99 "src/testdir/test_normal.vim"
952a7fc8 100 "src/testdir/test_popupwin.vim"
4e133f4f 101 "src/testdir/test_system.vim"
a5dbc07d
JK
102 "src/testdir/test_terminal.vim"
103 "src/testdir/test_terminal2.vim")
db3cc007 104 (("/bin/sh") (which "sh")))
4e133f4f
EF
105 (substitute* "src/testdir/test_autocmd.vim"
106 (("/bin/kill") (which "kill")))
af60a200 107 #t))
4e133f4f 108 (add-before 'check 'set-environment-variables
9efcc494
JK
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"))
4e133f4f
EF
114
115 ;; Make sure the TERM environment variable is set for the tests
116 (setenv "TERM" "xterm")
9efcc494
JK
117 #t))
118 (add-before 'check 'skip-failing-tests
af60a200 119 (lambda _
9efcc494
JK
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"))
7af6e5da 128
952a7fc8 129 ;; These tests check how the terminal looks after executing some
9efcc494
JK
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")))
952a7fc8
EF
136 (substitute* "src/testdir/test_popupwin.vim"
137 ((".*Test_popup_drag_termwin.*" line)
138 (string-append line "return\n")))
db3cc007 139 #t)))))
eb490858 140 (inputs
b3546174 141 `(("gawk" ,gawk)
b3546174
MW
142 ("ncurses" ,ncurses)
143 ("perl" ,perl)
9efcc494 144 ("tcsh" ,tcsh))) ; For runtime/tools/vim32
9123c420 145 (native-inputs
9efcc494
JK
146 `(("libtool" ,libtool)
147
148 ;; For tests.
149 ("tzdata" ,tzdata-for-tests)))
3d6bc5af 150 (home-page "https://www.vim.org/")
d4bf49b1 151 (synopsis "Text editor based on vi")
cae3b377
JH
152 ;; The description shares language with the vim-full package. When making
153 ;; changes, check if the other description also needs to be updated.
eb490858
CR
154 (description
155 "Vim is a highly configurable text editor built to enable efficient text
35b9e423 156editing. It is an improved version of the vi editor distributed with most UNIX
eb490858
CR
157systems.
158
159Vim is often called a \"programmer's editor,\" and so useful for programming
35b9e423
EB
160that many consider it an entire IDE. It's not just for programmers, though.
161Vim is perfect for all kinds of text editing, from composing email to editing
d4bf49b1 162configuration files.")
eb490858 163 (license license:vim)))
ad6198a5 164
b0a1d7ef
RW
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 _
2d4fdb70
EF
176 (chdir "src/xxd")
177 #t))
b0a1d7ef
RW
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))))))
0ec430f7 183 (inputs `())
9123c420 184 (native-inputs `())
b0a1d7ef
RW
185 (synopsis "Hexdump utility from vim")
186 (description "This package provides the Hexdump utility xxd that comes
187with the editor vim.")))
188
ad6198a5 189(define-public vim-full
190 (package
3c143783
LF
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.
ad6198a5 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")
d0f31aee
JK
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")
38190ea5
MB
216 ,@(substitute-keyword-arguments (package-arguments vim)
217 ((#:phases phases)
218 `(modify-phases ,phases
38190ea5
MB
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 " &")))))))))))
ad6198a5 227 (native-inputs
38190ea5 228 `(("pkg-config" ,pkg-config)
ff337525 229 ("xorg-server" ,xorg-server-for-tests)
9123c420 230 ,@(package-native-inputs vim)))
ad6198a5 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)
7c90d0f4 239 ("gettext" ,gettext-minimal)
ad6198a5 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)
cae3b377
JH
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
261editing. It is an improved version of the vi editor distributed with most UNIX
262systems.
263
264Vim is often called a \"programmer's editor,\" and so useful for programming
265that many consider it an entire IDE. It's not just for programmers, though.
266Vim is perfect for all kinds of text editing, from composing email to editing
267configuration files.
268
269This package provides a version of Vim with many optional features enabled.
270It includes a graphical interface, @command{gvim}, and support for plugins
271written in the Python 3, Perl, Ruby, Tcl, and Lua programming languages.")))
65dccb3a 272
8bb7b4f5 273(define-public vim-neocomplete
274 (package
275 (name "vim-neocomplete")
276 (version "2.1")
277 (source
278 (origin
6a9aa795
EF
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))
8bb7b4f5 284 (sha256
285 (base32
6a9aa795 286 "1h6sci5mhdfg6sjsjpi8l5li02hg858zcayiwl60y9j2gqnd18lv"))))
72194753 287 (build-system copy-build-system)
8bb7b4f5 288 (arguments
72194753
EF
289 '(#:install-plan
290 '(("autoload" "share/vim/vimfiles/")
291 ("doc" "share/vim/vimfiles/")
292 ("plugin" "share/vim/vimfiles/"))))
8bb7b4f5 293 (synopsis "Next generation completion framework for Vim")
294 (description
295 "@code{neocomplete}, an abbreviation of 'neo-completion with cache',
296is a plugin for Vim.
297It provides keyword completion system by maintaining a cache of keywords in
298the current buffer. Neocomplete can be customized easily and has many more
299features than Vim's built-in completion.")
300 (home-page "https://github.com/Shougo/neocomplete.vim/")
301 (license license:expat)))
302
34af179a 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"))))
90d64d9c 320 (build-system copy-build-system)
34af179a 321 (arguments
90d64d9c
EF
322 '(#:install-plan
323 '(("neosnippets" "share/vim/vimfiles/"))))
34af179a 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
328you can fill in on the fly.")
329 (home-page "https://github.com/Shougo/neosnippet-snippets")
330 (license license:expat))))
331
5890f891 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"))))
f19e539c 349 (build-system copy-build-system)
5890f891 350 (arguments
f19e539c
EF
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/"))))
5890f891 360 (synopsis "Snippet support for Vim")
361 (description
362 "@code{neosnippet}, is a plugin for Vim which adds snippet support to Vim.
363Snippets are small templates for commonly used code that you can fill in on
364the fly. To use snippets can increase your productivity in Vim a lot.
365The 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
367snippets with the neocomplcache / neocomplete interface, you might have less
368trouble 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
843b19ca 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"))))
0db06e7d 388 (build-system copy-build-system)
843b19ca 389 (arguments
0db06e7d
EF
390 '(#:install-plan
391 '(("after" "share/vim/vimfiles/")
392 ("ftplugin" "share/vim/vimfiles/")
393 ("syntax" "share/vim/vimfiles/"))))
843b19ca 394 (synopsis "Scheme syntax for Vim")
395 (description
396 "@code{vim-scheme} provides Scheme support for Vim (R7RS and CHICKEN).")
bb45b9c2 397 (home-page "https://foldling.org/git/vim-scheme.git/")
843b19ca 398 (license license:public-domain))))
399
a4c95372 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"))))
84ec7b70 416 (build-system copy-build-system)
a4c95372 417 (arguments
84ec7b70
EF
418 '(#:install-plan
419 '(("colors" "share/vim/vimfiles/"))))
a4c95372 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
25340002 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"))))
0b350f73 443 (build-system copy-build-system)
25340002 444 (arguments
0b350f73
EF
445 '(#:install-plan
446 '(("doc" "share/vim/vimfiles/")
447 ("autoload" "share/vim/vimfiles/"))))
25340002 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
aad2dbfb 454(define-public vim-fugitive
261348e2
EF
455 (package
456 (name "vim-fugitive")
504b9ba7 457 (version "3.2")
261348e2
EF
458 (source
459 (origin
460 (method git-fetch)
461 (uri (git-reference
b0e7b699 462 (url "https://github.com/tpope/vim-fugitive")
261348e2
EF
463 (commit (string-append "v" version))))
464 (file-name (git-file-name name version))
465 (sha256
466 (base32
504b9ba7 467 "1jbn5jxadccmcz01j94d0i1bp74cixr0fpxxf1h0aqdf1ljk3d7n"))))
b274d2a6 468 (build-system copy-build-system)
261348e2 469 (arguments
b274d2a6
EF
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/"))))
261348e2
EF
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
aad2dbfb
EF
479command window, where you can stage and review your changes before the next
480commit or run any Git arbitrary command.")
261348e2 481 (license license:vim))) ; distributed under the same license as vim
aad2dbfb 482
7ffcf5c5 483(define-public vim-airline
484 (package
485 (name "vim-airline")
5d64c1b4 486 (version "0.11")
7ffcf5c5 487 (source
488 (origin
35a7e574
EF
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))
7ffcf5c5 494 (sha256
495 (base32
5d64c1b4 496 "1aksmr73648pvyc75pfdz28k2d4ky52rn7xiwcv7lz87q3vqld7k"))))
8423c6f3 497 (build-system copy-build-system)
7ffcf5c5 498 (arguments
8423c6f3
EF
499 '(#:install-plan
500 '(("autoload" "share/vim/vimfiles/")
501 ("doc" "share/vim/vimfiles/")
502 ("plugin" "share/vim/vimfiles/")
503 ("t" "share/vim/vimfiles/"))))
7ffcf5c5 504 (synopsis "Statusline for Vim")
505 (description
506 "@code{vim-airline} is an extensible statusline for Vim.
507It can be extended and costumized with themes, works with unicode fonts
508and powerline symbols, etc.")
509 (home-page "https://github.com/vim-airline/vim-airline")
510 (license license:expat)))
511
b02a141f 512;; There are no tarball releases.
513(define-public vim-airline-themes
deae64ce
EF
514 (let ((commit "e6f233231b232b6027cde6aebeeb18d9138e5324")
515 (revision "2"))
b02a141f 516 (package
517 (name "vim-airline-themes")
deae64ce 518 (version (git-version "0.0.0" revision commit))
b02a141f 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)))
deae64ce 525 (file-name (git-file-name name version))
b02a141f 526 (sha256
527 (base32
deae64ce 528 "1sb7nb7j7bz0pv1c9bgdy0smhr0jk2b1vbdv9yzghg5lrknpsbr6"))))
e114aa20 529 (build-system copy-build-system)
b02a141f 530 (arguments
e114aa20
EF
531 '(#:install-plan
532 '(("autoload" "share/vim/vimfiles/")
533 ("doc" "share/vim/vimfiles/")
534 ("plugin" "share/vim/vimfiles/"))))
b02a141f 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
86db4486 541(define-public vim-syntastic
542 (package
543 (name "vim-syntastic")
42521ab2 544 (version "3.10.0")
86db4486 545 (source
546 (origin
c71cc133
EF
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))
86db4486 552 (sha256
42521ab2 553 (base32 "0j91f72jaz1s6aw1hpjiz30vk2ds2aqd9gisk91grsldy6nz6hhz"))))
8e38ed1f 554 (build-system copy-build-system)
86db4486 555 (arguments
8e38ed1f
EF
556 '(#:install-plan
557 '(("autoload" "share/vim/vimfiles/")
558 ("doc" "share/vim/vimfiles/")
559 ("plugin" "share/vim/vimfiles/")
560 ("syntax_checkers" "share/vim/vimfiles/"))))
86db4486 561 (synopsis "Syntax checking plugin for Vim")
562 (description
563 "Vim-syntastic is a syntax checking plugin for Vim. It runs files through
564external syntax checkers and displays any resulting errors to the user. This
565can be done on demand, or automatically as files are saved. If syntax errors
566are detected, the user is notified.")
567 (home-page "https://github.com/vim-syntastic/syntastic")
568 (license license:wtfpl2)))
569
de3ed0b4
EF
570(define-public editorconfig-vim
571 (package
572 (name "editorconfig-vim")
2c0b7153 573 (version "1.1.1")
de3ed0b4
EF
574 (source
575 (origin
576 (method git-fetch)
577 (uri (git-reference
b0e7b699 578 (url "https://github.com/editorconfig/editorconfig-vim")
de3ed0b4
EF
579 (commit (string-append "v" version))))
580 (file-name (git-file-name name version))
581 (sha256
582 (base32
2c0b7153 583 "0mp80bi2m56bb93szw87vy6q5s85yk9g91sl4pr51316rgdv5kkv"))))
94d53fbb 584 (build-system copy-build-system)
de3ed0b4 585 (arguments
2c0b7153 586 '(#:install-plan
94d53fbb
EF
587 '(("autoload" "share/vim/vimfiles/")
588 ("doc" "share/vim/vimfiles/")
589 ("plugin" "share/vim/vimfiles/"))))
de3ed0b4
EF
590 (home-page "https://editorconfig.org/")
591 (synopsis "EditorConfig plugin for Vim")
592 (description "EditorConfig makes it easy to maintain the correct coding
593style when switching between different text editors and between different
594projects. The EditorConfig project maintains a file format and plugins for
595various text editors which allow this file format to be read and used by those
596editors.")
597 (license license:bsd-2)))
598
bc84735d 599(define-public neovim-syntastic
600 (package
601 (inherit vim-syntastic)
602 (name "neovim-syntastic")
603 (arguments
8e38ed1f
EF
604 '(#:install-plan
605 '(("autoload" "share/nvim/site/")
606 ("doc" "share/nvim/site/")
607 ("plugin" "share/nvim/site/")
608 ("syntax_checkers" "share/nvim/site/"))))
bc84735d 609 (synopsis "Syntax checking plugin for Neovim")
610 (description
611 "Vim-syntastic is a syntax checking plugin for Neovim. It runs files through
612external syntax checkers and displays any resulting errors to the user. This
613can be done on demand, or automatically as files are saved. If syntax errors
614are detected, the user is notified.")))
615
9b11eee9
RW
616(define-public neovim
617 (package
618 (name "neovim")
738c0d96 619 (version "0.4.4")
9b11eee9
RW
620 (source
621 (origin
c3ebaec5
H
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))
9b11eee9 627 (sha256
738c0d96 628 (base32 "11zyj6jvkwas3n6w1ckj3pk6jf81z1g7ngg4smmwm7c27y2a6f2m"))))
9b11eee9
RW
629 (build-system cmake-build-system)
630 (arguments
631 `(#:modules ((srfi srfi-26)
632 (guix build cmake-build-system)
633 (guix build utils))
4168e3fa 634 #:configure-flags '("-DPREFER_LUA:BOOL=YES")
9b11eee9
RW
635 #:phases
636 (modify-phases %standard-phases
637 (add-after 'unpack 'set-lua-paths
638 (lambda* (#:key inputs #:allow-other-keys)
9abfbd79 639 (let* ((lua-version "5.1")
9b11eee9
RW
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"
518fd3b6 650 "lua-luv"
9b11eee9
RW
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) ";"))
9fbd0b17
JL
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)))))
9b11eee9
RW
667 (inputs
668 `(("libuv" ,libuv)
669 ("msgpack" ,msgpack)
670 ("libtermkey" ,libtermkey)
671 ("libvterm" ,libvterm)
672 ("unibilium" ,unibilium)
673 ("jemalloc" ,jemalloc)
674 ("libiconv" ,libiconv)
9abfbd79 675 ("lua" ,lua-5.1)
518fd3b6 676 ("lua-luv" ,lua5.1-luv)
9abfbd79
H
677 ("lua-lpeg" ,lua5.1-lpeg)
678 ("lua-bitop" ,lua5.1-bitop)
679 ("lua-libmpack" ,lua5.1-libmpack)))
9b11eee9
RW
680 (native-inputs
681 `(("pkg-config" ,pkg-config)
682 ("gettext" ,gettext-minimal)
683 ("gperf" ,gperf)))
52bc70e4 684 (home-page "https://neovim.io")
9b11eee9
RW
685 (synopsis "Fork of vim focused on extensibility and agility")
686 (description "Neovim is a project that seeks to aggressively
687refactor 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
65dccb3a
EF
699(define-public vifm
700 (package
701 (name "vifm")
b4bd0d86 702 (version "0.10.1")
65dccb3a
EF
703 (source
704 (origin
705 (method url-fetch)
1dbd3432
EF
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")))
65dccb3a
EF
711 (sha256
712 (base32
b4bd0d86 713 "0fyhxh7ndjn8fyjhj14ymkr3pjcs3k1xbs43g7xvvq85vdb6y04r"))))
65dccb3a
EF
714 (build-system gnu-build-system)
715 (arguments
513a66c9
EF
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)))))
65dccb3a 742 (native-inputs
4f34e0db 743 `(("groff" ,groff))) ; for the documentation
65dccb3a
EF
744 (inputs
745 `(("libx11" ,libx11)
4f34e0db
EF
746 ("ncurses" ,ncurses)
747 ("perl" ,perl)))
748 (home-page "https://vifm.info/")
65dccb3a
EF
749 (synopsis "Flexible vi-like file manager using ncurses")
750 (description "Vifm is a file manager providing a @command{vi}-like usage
751experience. It has similar keybindings and modes (e.g. normal, command line,
752visual). The interface uses ncurses, thus vifm can be used in text-only
753environments. It supports a wide range of features, some of which are known
754from 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
777With the package comes a plugin to use vifm as a vim file selector.")
778 (license license:gpl2+)))
24d32e67
JL
779
780(define-public python-pynvim
781 (package
782 (name "python-pynvim")
3772d80d 783 (version "0.4.1")
24d32e67
JL
784 (source (origin
785 (method url-fetch)
786 (uri (pypi-uri "pynvim" version))
787 (sha256
788 (base32
3772d80d 789 "0n2cx22lrmbq7xk7356lyn6k77ryqvkxplw9k0fglk35ckb1isam"))))
24d32e67
JL
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
799also works as a library for connecting to and scripting neovim processes
800through its msgpack-rpc API.")
801 (license license:asl2.0)))
802
803(define-public python2-pynvim
804 (package-with-python2 python-pynvim))
a947ade6
EF
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"))))
12fe38a1 819 (build-system copy-build-system)
a947ade6 820 (arguments
12fe38a1
EF
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/"))))
a947ade6
EF
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)))
fb29d7d7
EF
832
833(define-public vim-asyncrun
834 (package
835 (name "vim-asyncrun")
0144f8de 836 (version "2.7.5")
fb29d7d7
EF
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
0144f8de 845 "02fiqf4rcrxbcgvj02mpd78wkxsrnbi54aciwh9fv5mnz5ka249m"))))
fb29d7d7
EF
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
854NeoVim) to enable you to run shell commands in background and read output in the
855quickfix window in realtime.")
856 (license license:expat)))
9b5e7d01
EF
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
881bound by synchronicity. Kick off builds and test suites using one of several
882asynchronous adapters (including tmux, screen, and a headless mode), and when
883the job completes, errors will be loaded and parsed automatically.")
884 (license license:vim)))
dda267e3
EF
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.
910This package includes commands such as @code{SudoWrite} and @code{SudoEdit} and
911help working on Vim buffers and the files they reference with one command.")
912 (license license:vim))))