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