vim.scm 41 KB

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