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