pax_global_header00006660000000000000000000000064132040157420014510gustar00rootroot0000000000000052 comment=6d2c30daf3b29b84b15b547ef956e165f5e9685d neovim-0.2.2/000077500000000000000000000000001320401574200130065ustar00rootroot00000000000000neovim-0.2.2/.editorconfig000066400000000000000000000003301320401574200154570ustar00rootroot00000000000000root = true [*] indent_style = space indent_size = 2 end_of_line = lf insert_final_newline = true charset = utf_8 [runtime/doc/*.txt] indent_style = tab indent_size = 8 [Makefile] indent_style = tab tab_width = 4 neovim-0.2.2/.gitignore000066400000000000000000000014561320401574200150040ustar00rootroot00000000000000# Build/deps dir /build/ /cmake-build-debug/ /dist/ /.deps/ /tmp/ *.mo .*.sw? *~ *.pyc *.o *.so tags /src/nvim/po/vim.pot /src/nvim/po/*.ck # generated by tests with $NVIM_LOG_FILE set. /.nvimlog # Files generated by scripts/vim-patch.sh /.vim-src/ # Files generated by the tests /src/nvim/testdir/del /src/nvim/testdir/test*.out /src/nvim/testdir/test*.res /src/nvim/testdir/test.log /src/nvim/testdir/messages /src/nvim/testdir/viminfo /src/nvim/testdir/test.ok /src/nvim/testdir/*.failed /src/nvim/testdir/X* /src/nvim/testdir/valgrind.* /src/nvim/testdir/.gdbinit # Folder generated by the unit tests /test/includes/post/ # generated by luacheck during `make testlint' /test/.luacheckcache # local make targets local.mk # runtime/doc /runtime/doc/*.html /runtime/doc/tags.ref /runtime/doc/errors.log neovim-0.2.2/.travis.yml000066400000000000000000000103411320401574200151160ustar00rootroot00000000000000dist: trusty sudo: false language: c env: global: # To force rebuilding of third-party dependencies, set this to 'true'. - BUILD_NVIM_DEPS=false # Travis has 1.5 virtual cores according to # http://docs.travis-ci.com/user/speeding-up-the-build/#Paralellizing-your-build-on-one-VM - MAKE_CMD="make -j2" # Update PATH for pip. - PATH="$(python2.7 -c 'import site; print(site.getuserbase())')/bin:/usr/lib/llvm-symbolizer-4.0/bin:$PATH" # Build directory for Neovim. - BUILD_DIR="$TRAVIS_BUILD_DIR/build" # Build directory for third-party dependencies. - DEPS_BUILD_DIR="$HOME/nvim-deps" # Directory where third-party dependency sources are downloaded to. - DEPS_DOWNLOAD_DIR="$TRAVIS_BUILD_DIR/deps-downloads" # Install directory for Neovim. - INSTALL_PREFIX="$HOME/nvim-install" # Log directory for Clang sanitizers and Valgrind. - LOG_DIR="$BUILD_DIR/log" # Nvim log file. - NVIM_LOG_FILE="$BUILD_DIR/.nvimlog" # Default CMake flags. - CMAKE_FLAGS="-DTRAVIS_CI_BUILD=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX -DBUSTED_OUTPUT_TYPE=nvim -DDEPS_PREFIX=$DEPS_BUILD_DIR/usr -DMIN_LOG_LEVEL=3" - DEPS_CMAKE_FLAGS="-DDEPS_DOWNLOAD_DIR:PATH=$DEPS_DOWNLOAD_DIR" # Additional CMake flags for 32-bit builds. - CMAKE_FLAGS_32BIT="-DCMAKE_SYSTEM_LIBRARY_PATH=/lib32:/usr/lib32:/usr/local/lib32 -DCMAKE_IGNORE_PATH=/lib:/usr/lib:/usr/local/lib -DCMAKE_TOOLCHAIN_FILE=$TRAVIS_BUILD_DIR/cmake/i386-linux-gnu.toolchain.cmake" # Environment variables for Clang sanitizers. - ASAN_OPTIONS="detect_leaks=1:check_initialization_order=1:log_path=$LOG_DIR/asan" - TSAN_OPTIONS="log_path=$LOG_DIR/tsan" - UBSAN_OPTIONS="print_stacktrace=1 log_path=$LOG_DIR/ubsan" # Environment variables for Valgrind. - VALGRIND_LOG="$LOG_DIR/valgrind-%p.log" # Cache marker for third-party dependencies cache. # If this file exists, we know that the cache contains compiled # dependencies and we can use it. - CACHE_MARKER="$HOME/.cache/nvim-deps/.travis_cache_marker" # default target name for functional tests - FUNCTIONALTEST=functionaltest - CI_TARGET=tests jobs: include: - stage: sanitizers os: linux compiler: clang-4.0 env: > CLANG_SANITIZER=ASAN_UBSAN CMAKE_FLAGS="$CMAKE_FLAGS -DPREFER_LUA=ON" - stage: normal builds os: linux compiler: gcc-5 env: FUNCTIONALTEST=functionaltest-lua - os: linux # Travis creates a cache per compiler. # Set a different value here to store 32-bit # dependencies in a separate cache. compiler: gcc-5 -m32 env: BUILD_32BIT=ON - os: osx compiler: clang osx_image: xcode7.3 # macOS 10.11 - os: osx compiler: gcc-4.9 osx_image: xcode7.3 # macOS 10.11 - stage: lint os: linux env: CI_TARGET=lint - stage: Flaky builds os: linux compiler: gcc-5 env: GCOV=gcov-5 CMAKE_FLAGS="$CMAKE_FLAGS -DUSE_GCOV=ON" - os: linux compiler: clang-4.0 env: CLANG_SANITIZER=TSAN allow_failures: - env: GCOV=gcov-5 CMAKE_FLAGS="$CMAKE_FLAGS -DUSE_GCOV=ON" - env: CLANG_SANITIZER=TSAN fast_finish: true before_install: ci/before_install.sh install: ci/install.sh before_script: ci/before_script.sh script: ci/script.sh before_cache: ci/before_cache.sh after_success: ci/after_success.sh addons: apt: sources: - ubuntu-toolchain-r-test - llvm-toolchain-trusty-4.0 packages: - autoconf - automake - apport - build-essential - clang-4.0 - cmake - cscope - g++-5-multilib - g++-multilib - gcc-5-multilib - gcc-multilib - gdb - language-pack-tr - libc6-dev-i386 - libtool - llvm-4.0-dev - locales - pkg-config - unzip - valgrind - xclip branches: except: - nightly cache: apt: true directories: - "$HOME/.cache/pip" - "$HOME/.cache/nvim-deps" notifications: webhooks: urls: - https://webhooks.gitter.im/e/b5c38c99f9677aa3d031 neovim-0.2.2/BACKERS.md000066400000000000000000000351111320401574200144030ustar00rootroot00000000000000# Bountysource Backers Thank you to everyone who backed our [Bountysource fundraiser](https://www.bountysource.com/teams/neovim/fundraiser)! ### Your name and URL in BACKERS.md. - [Bob Breznak](http://brez.io) - [Tim Uruski](http://timuruski.net) - @mikker (http://brnbw.com) - Aaron J. [@metaxis](http://twitter.com/metaxis) Peterson - Adam George http://www.adamgeorge.com - Adam Lindberg (http://alind.io) - Adam McLain http://twitter.com/adammclain - Adam Piper http://ahri.net - Adrian Philipp http://adrian-philipp.com - Alexander Quine - Alexandru Dabija - Alexis Hildebrandt http://surryhill.net - Andrew M. Farrell http://amfarrell.com - Anton Beloglazov http://beloglazov.info/ - Arthur Axel fREW Schmidt - https://blog.afoolishmanifesto.com - Ben Thouret http://benjamin.thouret.com - Benedikt Böhm http://bb.xnull.de - bfredl, http://bfredl.github.io - Brandon Smith, http://reardencode.com - Brandon Wang, http://brandonwang.me - Brennen Bearnes http://p1k3.com - Brock Wilcox (awwaiid) http://thelackthereof.org/ - Cameron Eagans http://cweagans.net - Carl Myers http://cmyers.org/ - Carlos Alves http://www.carlosalves.info - Chris Chernesky, http://www.tinderglow.com - Chris Hartjes - Christoffer Holmstedt (http://www.christofferholmstedt.se) - Ciaran Downey - Craig Bane http://standardizedways.co.uk - Dane Summers http://pinedesk.biz - Daniel Collin https://twitter.com/daniel_collin - Daniel Rogers http://remotecodelist.com - Darshan Sawardekar http://pressing-matters.io - David Gabriel http://wiki.dest-unreachable.net - Deepak Kumar www.kreatio.com - Derek Rodger http://devslant.com - ebene fünf GmbH www.ebenefuenf.de - Ehtesh Choudhury - Emil Hernvall http://emilhernvall.github.io/ - Eric Siegel https://github.com/esiegel - Ethan Schoonover http://ethanschoonover.com - FFunction http://ffctn.com - Frank http://duckpun.ch - Gabriele Lana http://github.com/gabrielelana - Gavin Rogers http://praxeology.co.uk - Geoff Greer https://floobits.com/ - Glenn Strauss https://github.com/gstrauss/ - Gustav Buchholtz http://grod.se - Henri Bourcereau http://bourcereau.fr - http://jaredforsyth.com - http://www.1bsyl.com - Johann Dahm (http://johanndahm.com) - Ian Farmer http://farmernet.net - iauns - http://www.noobtube.com - Jacob Jewell www.immersiveapplications.com - James A. Overton http://james.overton.ca - James Tomasino - http://jamestomasino.com - Jamiel Almeida http://slashfoo.com - Jan Christoph Ebersbach http://www.e-jc.de/ - Jason Peacock http://jasonpeacock.com - Jason Weathered http://jasoncodes.com/ - Javier Maestro - Jeff Craig http://blog.foxxtrot.net/ - Jeremy Huffman http://jeremyhuffman.com - Jeremy Morrell http://rathercurio.us - Jesper Kjeldgaard (thejspr) - http://thejspr.com - Jim Hester (http://jimhester.com) - Joe Moon http://joe.xoxomoon.com - Johan Simonsson, http://fun-tech.se - John P. Kiffmeyer (http://jpk.is) - John Szakmeister http://www.szakmeister.net/ - John W. Long http://wiseheartdesign.com Twitter: @johnwlong GitHub: @jlong - Jon Yurek http://thoughtbot.com - jonaias http://jonaias.info - Josh Davis, http://joshldavis.com - Joshua Levesque (www.jandyco.com) - Justin M. Keyes https://github.com/justinmk - Justin Russell http://jrussell.me - kbussell - Kevin Sjöberg, http://kevinsjoberg.com - Kevin Sumner http://kevinsumner.com - Kevin Wu http://kevinformatics.com - Ley Missailidis, http://polymet.is - Loa https://github.com/loa - Lowe Schmidt http://loweschmidt.se - Marcello Barnaba http://sindro.me/ - Marcin Kulik - http://ku1ik.com - Marius Rieder http://www.durchmesser.ch/ - Mark Allen [@bytemeorg](http://twitter.com/bytemeorg) - Mark Percival http://markpercival.us - Mark Sprevak - Martin Ansdell-Smith https://ansdell.net/ - Martin Kopischke http://martin.kopischke.net - masukomi http://masukomi.org - Matt Greer -- http://mattgreer.org - MetaCosm | #Vim on Freenode - Michael Ulm www.mulm.at - Mikael Jansson http://mikaelj.se - Mikkel Høgh http://mikkel.hoegh.org/ - Ming Liu http://ming.codes - Holger Peters http://www.holger-peters.de - Alexander Myshov http://myshov.com/ - Darren Cheng http://sanguinerane.com/ - Felix Rath www.0fx.eu - Hong Xu http://www.topbug.net - Slava Kim https://www.meteor.com - Nate Soares (So8res) http://so8r.es - neektza http://pltconfusion.com - Niclas Nilsson, http://niclasnilsson.se - Nikolay Bachiyski http://extrapolate.me/ - Nikush Patel http://nikush.co.uk - Norman Köhring https://koehr.in - Osamu Komagata - Øystein E. Krog https://github.com/oysteinkrog - Pablo Brasero Moreno http://pablobm.com - Peter Souter http://www.petersouter.co.uk - Phil Levchenko (http://philslair.com) - Pierre Douyon https://github.com/pgdouyon - Prateek Rungta - Przemysław Pietrzkiewicz, http://ppi.sh - Rasmus Mattsson http://zzm.se - Reed Esau https://github.com/reedes - Richard Harding https://bmark.us - Rob Warner http://grailbox.com - Runar Balstad Jensen, http://stdout.no/ - Ryan Paul http://seg.phault.net - Saad Malik - https://github.com/saamalik - Saggi Malachi - http://sagg.im - Scott Wessels (http://www.usgn.net) - Sean DuBois (Sean-Der) http://siobud.com - Sebastian Vetter (http://www.roadside-developer.com) - Simen Endsjø, http://simendsjo.me - Stanley Chan (Happy-Dude) - Stefan Penner - Steve Vermeulen https://github.com/svermeulen - Steven Myint (https://github.com/myint) - Tae Sandoval Murgan - The Kompanee http://thekompanee.com - Thomas Cannon - Tim Oxley http://campjs.com/ - Timo Schmiade - Timothy Dahlin - Tiziano Santoro - Toban Wiebe http://tobanwiebe.com - Tobias Sjösten http://vvv.tobiassjosten.net/ - Tom Cammann http://github.com/takac - Val Markovic http://val.markovic.io/ - Víðir Valberg Guðmundsson http://rabotnik.coop - Weiyi Lou http://parlseygardens.net - Wesley Moore http://wezm.net/ - Woody Peterson, http://www.bitsofsignal.com - Zach Kelling, http://zeekay.io ### Your name in BACKERS.md. - @a13xb - @d1eg0 - @derkha - @georgebashi - @tmcw - @xpayn - Adam Baxter (voltagex) - Adam Miller (maxamillion) - Adam Sunderland/iterion - Adon Metcalfe (adonm) - Adrian Duyzer - Aidan Stein - ak47 - Aketzu - Alessandro Gangemi - Alessandro Pagnin - Alessandro Proscia - Alex Genco (alexgenco) - Alex Heeton - Alex Roper - Alex Soto (apsoto@gmail.com) - Alexander Flatter - Alexander Jeurissen - Alexander Shabalin - Alexander Woerndle - Alexandru Keszeg - Allan Hudgins - Ami Chayun - Amit Beka - Anders Fuzz - Andre Azzolini - Andre da Palma - André Santos/andrefs - Andrea Michi - Andreas Heider - Andreas Lappe - andrej ocenas / aocenas - Andrew Arminio @5thWall - Andrew DeMaria ~ muff1nman - Andrew Fallows - Andrew Fecheyr (@andruby) - Andrew Hartford - Andrey Tarantsov - Andrey Yurovsky - Andy Dirnberger - Andy Gayton - Andy Lindeman - Andy Webster - AngelLeliel - Anton Egorov / satyrius - Anton Shemerey - Arnaud Bétrémieux - Arne Ehrlich - Arseny Zarechnev - Arvind Deshpande - Astro Jetson Jr - Attila Maczak - Avétis KAZARIAN (avetisk) - BarryKay - bbinet - BenBergman - Bengt Lüers - Benjamin Bryant - Bèr 'berkes' Kessels - Bernd Homuth - Bheesham Persaud - Bilal Quadri - Bjorn Tipling - Bojan Zivanovic - Boris Searles - Braden Bruington - Brandon Liu/thenovices - Brandon Mathis - @imathis - Brett Ritter - Brian Shaver (shakerlxxv) - Bryan Grohman - Bryn Edwards - Calin Iorgulescu - calind - Cameron Wood / cewood - Chris Lopes - Chris Lord - Chris Porter - Chris Sims (@jcsims) - Christian Anton / fibbs - Christian Delahousse cdelahousse - Christian Lange - Christian Wellenbrock - Christophe Badoit - Christopher Lübbemeier - Christopher Mullins - Chungha Kim - ckromero - Claas-Thido Pfaff - Claes Mogren - Clayton Drazner - claytron - Colin Cooper - corytheboyd - Cristián Alberto Arenas Ulloa / NiñoScript - Cyril LEPAGNOT/cyrill62 - D3 Designs - DAddYE (github: DAddYE) - Dan Webb - Daniel C. Henning / danielsdesk - Daniel Egeberg - Daniel Egger - Daniel Hodan/czertbytes - Daniel Latzer - Daniel Riti - Daniel Weisser - Daniele Polencic - Dave Dixon - David Collie - David Galeano - David Newell - David Rappo, Bountysource.com - David Rasch - David Stensland - terite - Davit Samvelyan - Dean Morin - deffi420 - defrex - Deraen - Dewdrops - Dick Seabrook - Dominik Ritter - Don Browne - Donald Walker - Donna Martz - dpc - dperson - dvidsilva - Edan Maor - Eddy Garcia - Edward Ash/cazador481 - Elias Tandel Barrionovo - Elijah Mirecki - Elliot Winkler (github: mcmire) - Enric Lluelles - Eric Fode - Erik Goldman - Erik Johnson Github: terminalmage Twitter: @terminalmage - Erik Nordlund - Ethan Erchinger/erchn - Evan Tatarka - Ewoud van Raamsdonk - fd0 - Federico Galassi - Félix Archambault - Ferdinand Salis-Samaden - Florian Bartels - Florian Sachs - foca - forbesmyester - Frédéric de Villamil - Fredrik Rambris - Dapeng Li (luislee818) - Janko Marohnić (janko-m) - Jun Wu - Maurice van der Pot (Griffon26) - Ory Band (oryband) - Garrett Dawson - Gaveen Prabhasara - George Nikolopoulos - github username "alandyer" - Giuseppe Rota - gkalas - Gökhan Kocak - goodgravy - Göran Gustafsson (GLEG) - Graham Jans - Greg Marcil - Gregory Byrd/GByrd - Gustavo Barron / Cicloid - Gyuri Horák - Harald Hvaal - Harm Aarts - Harry Glaser - Håvard Grimelid - hencjo - Henning Hasemann - Henry "Ingvij" Kupty - henry4k - Heryandi - Hontvári József Levente - IKEDA, Yoshifumi - Ilia Choly - iliis - Ilya Katz - Indrek Juhkam / indrekj - irwand - Islam Sharabash / ibash - Ivar Vasara - Jack Stouffer - Jacqueline Leykam - Jakob Landbo - James Herdman - James Magness - James Murty / jmurty - James Nguyen - James Orr - James Pickard - James Seward - Jamie Hillman - Jan Larres - Jan Weitz - Janko Luin - Jannik Nielsen / bitkid - Jared Tyler Miller - Jason Imison - Jason Long / @jasonlong - Jason Stillwell/dragonfax - Jasu - javaguirre - Jedidiah Hurt - Jeff Schornick - Jen Patrick - Jens Hausherr - Jess Brown / Jess - Jesse Cooke/@jc00ke - Jessica Frazelle/ jfrazelle - Jesus Alvarez - Jez Allan - Jimmie Elvenmark - Jiří Koten - JJ Murre - joe di castro - Joe Malin/633squadron - Joel Meyer - Joey Trapp - Johan Klokkhammer Helsing - John Cant - John K. Paul - John Krueger - John Netherdrake - John Schmidt / schmee - John Whitley/@jwhitley - Jon Anhold - Jon Gosting - Jonas Rollsby - Jonathan Buschmann - Jonathan Gibert - Jonathan Jacobs - Jonathan Kinred - Jorge Gallegos (kad) - Joris Morger - Josemar Luedke - Joshua Brookover - Joshua Travis - Jouko Karvonen - jstemmer - Juan Campa - Juan Hernández Babón / jhbabon - juanolon - Justin Carter Moy - Justin Force - Kamil Slowikowski - Karl Ove Hufthammer - Kazuo Teramoto - Kevin Goslar - Kevin Hamer - Kevin Watters - Kevin Zimmerman / zim44 - kryft - Krzysztof Adamski - Lachlan Brad Easton - Lance Ulmer - Larry Riedel (Larry@Riedel.org) - Lasse Immonen (lasse.immonen@gmail.com) - Léo Unbekandt / Soulou - Leszek Swirski - Levi Brown - lhl - linduxed - Lluis Satorre Gonzalez - lobachevsky - Louis Pilfold - Lucas Stephanou/lucasts - Lucas Werkmeister - Luke Sampson - Luke van der Hoeven / @plukevdh - Maciej Litwiniuk (@mlitwiniuk) - Mads Navntoft Noe - Maik Derstappen / MrTango - Manuel Salvadores - Marcus Huntemann/mapclyps - Marcus Martin/nymaen - Markus Dobler - Mat Moore - Mate Nagy - Mathias Fußenegger - Matt Moretti - Matthew Machuga - Matthew Sunderland - Matthias Bilger - Matthias Lehmann - Maximilian Gerlach - Meryn Stol - Michael 'manveru' Fellinger - Michael "beefsack" Alexander - Michael Iles - Michael Irwin/mdi - Michael Kebe - Michael Lerch - Michael R. Jones - Michael Sanders/msanders - Michael Schall / schallm - Michail Denchev - Michał Bartoszkiewicz - Mickaël FORTUNATO - Miguel Santesmases - Mihir Pendse - Mike Bissett/paran01d - Mike Sergio - Mike Wadsten - mikedillion - Mikkel Oscar Lyderik Larsen - Miles Edland / edlandm - Miles Frain - Mirko Grönroos - Moritz Lotze - Morten Nygaard Åsnes - MrException - Julian Churchill (julianchurchill) - Nakul Dhotre - Corey Farwell (frewsxcv) - Tarrant Rollins (tarrant) - Naseer Ahmed - Nate Jones - Nate Soares (So8res) - Nate Straz - Neil Kirsopp - Nelson Chen/nelsonjchen - Nicholas Firth-McCoy (nfm) - Nick Sloan - Nickolas Means - Nicolai Ruckel - Niko Kivelä - nop - Nuno Frade - Olaf Heinemann - Ole Reifschneider - Oliver Caldwell - Olivier Lechevalier - orangain - orestis - pablasso - Pascal Hartig - Patrick Berkeley - Patrick Bihan-Faou, TeamBox SARL - Patrick Stapfer - Paul R Alexander - Pavel Afanasyev - Pawel Grzech - Paweł Nowak - Pedro Rodriguez T - Per Modin - Peter Edge - Peter Fern - Philipe Farias/philipefarias - Philipp Millar - Piotr Mitoraj - Prithvi Prabhu (prithvi) - Qingping Hou / houqp - Quasar Jarosz - queria - Rachid Zarouali / Xinity - Radek Szymczyszyn - Randy Topliffe / Taar - Ranko Radonić - Raphael Henrique Ribas - Ravi Joseph Pinto - rekab - Renato Zannon - Richard "RichiH" Hartmann - Richard Mihalovič - Richard Sotarsh Clark - Rio Kierkels - rob allen - Rob Bevan - Rob Miller @robmil - Rob O'Dwyer - Rodolfo Borges (aka bart9h) - Rodrigo Souto - Roland Szabo - Romans Malinovskis - Roshan George - Rostepher - runar - Russ Adams / rustushki - Ryan Phillips - Ryan Pierce/ fission1110 - Ryan Schmitt - Ryan Tarpine - Sadik Gokhan Caglar - Sam Stokes - Sanpi - Santiago Suarez Ordoñez - saxman7000 - Scott D'Aquila - Scott Mathson - Sean Copenhaver (@copenhas) - Sean McCleary - Sean M. Collins (sc68cal) - Sean Tegtmeyer - seanbell - Sebastian Geiger - Sergey Alexandrov - Shane Delmore - shawndumas - shazow - Silvan Jegen - Simon Ratner (simonratner) - Song Gao - Stanimir Angelov Mladenov - Stanislav B. - zbstof - Stefan Gojan (hoschi) - Stefan Hoffmann / stefan991 - Stefan Wienert - Steffen Rademacker - Stephen Oney/soney - Steve "ryz" Haßenpflug - Steven Daniel Webb - Steven Sloss - Sven Opitz - Sverre Rabbelier - Szymon Ząbkiewicz - Taichi Nakamura - Takayuki Soga - Teasp00n - Terin Stock - @terinjokes - Thai Pangsakulyanont (dtinth) - Thameera Senanayaka - Theo Belaire - Thomas Ferris Nicolaisen - Thomas Hirsch - Thomas Maffia/Szerated - Thomas Pani - Thomas Thune Hansen - Thorbjørn Lindeijer - Thunder Hu - Thys Meintjes - Tim Anema - Tim Matthews - Timo Kröger - Tolstyak - Tom Panning - Tom Wadley - Tony Kemp - tonyo112 - Tori "TicViking" Hamblin - treppo - Truman Ellis - Tuomas Vähänen - Tyler Briles/MrBri - Tyler Brock - Tyler Mandry - Ulf Fischer/ulf - Vangelis Tsoumenis - Vítězslav Homolka - Vladimir Chernis - Vojtech Jasny - vvakame - Vytis Valentinavičius - Wade Berrier - warrenv - whateverhuis - Will Binns-Smith - Xavier Antoviaque (xavier@antoviaque.org) - xsb - Yann Villessuzanne - yko - Youta Harada(cohalz) - Yrjö Peussa - Yusuke Kanda(@uskanda) - Yuval Langer - zerowidth - Ziling Zhao - Zsolt Botykai ### Anonymous Supporters There were also 307 other people who didn't claim any level of reward but contributed to the fundraiser. Thank you all for the support! neovim-0.2.2/BSDmakefile000066400000000000000000000001731320401574200150400ustar00rootroot00000000000000.DONE: @echo "Please use GNU Make (gmake) to build neovim" .DEFAULT: @echo "Please use GNU Make (gmake) to build neovim" neovim-0.2.2/CMakeLists.txt000066400000000000000000000531221320401574200155510ustar00rootroot00000000000000cmake_minimum_required(VERSION 2.8.7) project(nvim) if(POLICY CMP0059) cmake_policy(SET CMP0059 OLD) # Needed until cmake 2.8.12. #4389 endif() # Point CMake at any custom modules we may ship list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake") # We don't support building in-tree. include(PreventInTreeBuilds) # Prefer our bundled versions of dependencies. set(DEPS_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/.deps/usr" CACHE PATH "Path prefix for finding dependencies") if(CMAKE_CROSSCOMPILING AND NOT UNIX) list(INSERT CMAKE_FIND_ROOT_PATH 0 ${DEPS_PREFIX}) list(INSERT CMAKE_PREFIX_PATH 0 ${DEPS_PREFIX}/../host/bin) else() list(INSERT CMAKE_PREFIX_PATH 0 ${DEPS_PREFIX}) set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${DEPS_PREFIX}/lib/pkgconfig") endif() # used for check_c_compiler_flag include(CheckCCompilerFlag) if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") # CMake tries to treat /sw and /opt/local as extension of the system path, but # that doesn't really work out very well. Once you have a dependency that # resides there and have to add it as an include directory, then any other # dependency that could be satisfied from there must be--otherwise you can end # up with conflicting versions. So, let's make them more of a priority having # them be included as one of the first places to look for dependencies. list(APPEND CMAKE_PREFIX_PATH /sw /opt/local) # Work around some old, broken detection by CMake for knowing when to use the # isystem flag. Apple's compilers have supported this for quite some time # now. if(CMAKE_COMPILER_IS_GNUCC) set(CMAKE_INCLUDE_SYSTEM_FLAG_C "-isystem ") endif() if(CMAKE_COMPILER_IS_GNUCXX) set(CMAKE_INCLUDE_SYSTEM_FLAG_CXX "-isystem ") endif() endif() if(WIN32 OR CMAKE_SYSTEM_NAME STREQUAL "Darwin") # Enable fixing case-insensitive filenames for Windows and Mac. set(USE_FNAME_CASE TRUE) endif() # Set default build type. if(NOT CMAKE_BUILD_TYPE) message(STATUS "CMAKE_BUILD_TYPE not given, defaulting to 'Debug'.") set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Choose the type of build." FORCE) endif() # Set available build types for CMake GUIs. # A different build type can still be set by -DCMAKE_BUILD_TYPE=... set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo") # If not in a git repo (e.g., a tarball) these tokens define the complete # version string, else they are combined with the result of `git describe`. set(NVIM_VERSION_MAJOR 0) set(NVIM_VERSION_MINOR 2) set(NVIM_VERSION_PATCH 2) set(NVIM_VERSION_PRERELEASE "") # for package maintainers # API level set(NVIM_API_LEVEL 3) # Bump this after any API change. set(NVIM_API_LEVEL_COMPAT 0) # Adjust this after a _breaking_ API change. set(NVIM_API_PRERELEASE false) file(TO_CMAKE_PATH ${CMAKE_CURRENT_LIST_DIR}/.git FORCED_GIT_DIR) include(GetGitRevisionDescription) get_git_head_revision(GIT_REFSPEC NVIM_VERSION_COMMIT) if(NVIM_VERSION_COMMIT) # is a git repo git_describe(NVIM_VERSION_MEDIUM) # `git describe` annotates the most recent tagged release; for pre-release # builds we must replace that with the unreleased version. string(REGEX REPLACE "^v[0-9]+\\.[0-9]+\\.[0-9]+" "v${NVIM_VERSION_MAJOR}.${NVIM_VERSION_MINOR}.${NVIM_VERSION_PATCH}" NVIM_VERSION_MEDIUM ${NVIM_VERSION_MEDIUM}) endif() set(NVIM_VERSION_BUILD_TYPE "${CMAKE_BUILD_TYPE}") # NVIM_VERSION_CFLAGS set further below. set(CMAKE_EXPORT_COMPILE_COMMANDS ON) # Default to -O2 on release builds. if(CMAKE_C_FLAGS_RELEASE MATCHES "-O3") message(STATUS "Replacing -O3 in CMAKE_C_FLAGS_RELEASE with -O2.") string(REPLACE "-O3" "-O2" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}") endif() # Minimize logging for release-type builds. if(NOT CMAKE_C_FLAGS_RELEASE MATCHES DMIN_LOG_LEVEL) set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DMIN_LOG_LEVEL=3") endif() if(NOT CMAKE_C_FLAGS_MINSIZEREL MATCHES DMIN_LOG_LEVEL) set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} -DMIN_LOG_LEVEL=3") endif() if(NOT CMAKE_C_FLAGS_RELWITHDEBINFO MATCHES DMIN_LOG_LEVEL) set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -DMIN_LOG_LEVEL=3") endif() if(CMAKE_COMPILER_IS_GNUCC) check_c_compiler_flag(-Og HAS_OG_FLAG) else() set(HAS_OG_FLAG 0) endif() # # Build-type: RelWithDebInfo # if(HAS_OG_FLAG) set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -Og -g") endif() # We _want_ assertions in RelWithDebInfo build-type. if(CMAKE_C_FLAGS_RELWITHDEBINFO MATCHES DNDEBUG) string(REPLACE "-DNDEBUG" "" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}") endif() # Enable -Wconversion. if(NOT MSVC) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wconversion") endif() # gcc 4.0+ sets _FORTIFY_SOURCE=2 automatically. This currently # does not work with Neovim due to some uses of dynamically-sized structures. # https://github.com/neovim/neovim/issues/223 include(CheckCSourceCompiles) # Include the build type's default flags in the check for _FORTIFY_SOURCE, # otherwise we may incorrectly identify the level as acceptable and find out # later that it was not when optimizations were enabled. CFLAGS is applied # even though you don't see it in CMAKE_REQUIRED_FLAGS. set(INIT_FLAGS_NAME CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE}) string(TOUPPER ${INIT_FLAGS_NAME} INIT_FLAGS_NAME) if(${INIT_FLAGS_NAME}) set(CMAKE_REQUIRED_FLAGS "${${INIT_FLAGS_NAME}}") endif() # Include because some toolchains define _FORTIFY_SOURCE=2 in # internal header files, which should in turn be #included by . check_c_source_compiles(" #include #if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 1 #error \"_FORTIFY_SOURCE > 1\" #endif int main(void) { return 0; } " HAS_ACCEPTABLE_FORTIFY) if(NOT HAS_ACCEPTABLE_FORTIFY) message(STATUS "Unsupported _FORTIFY_SOURCE found, forcing _FORTIFY_SOURCE=1.") # Extract possible prefix to _FORTIFY_SOURCE (e.g. -Wp,-D_FORTIFY_SOURCE). STRING(REGEX MATCH "[^\ ]+-D_FORTIFY_SOURCE" _FORTIFY_SOURCE_PREFIX "${CMAKE_C_FLAGS}") STRING(REPLACE "-D_FORTIFY_SOURCE" "" _FORTIFY_SOURCE_PREFIX "${_FORTIFY_SOURCE_PREFIX}" ) if(NOT _FORTIFY_SOURCE_PREFIX STREQUAL "") message(STATUS "Detected _FORTIFY_SOURCE Prefix=${_FORTIFY_SOURCE_PREFIX}.") endif() # -U in add_definitions doesn't end up in the correct spot, so we add it to # the flags variable instead. set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${_FORTIFY_SOURCE_PREFIX}-U_FORTIFY_SOURCE ${_FORTIFY_SOURCE_PREFIX}-D_FORTIFY_SOURCE=1") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${_FORTIFY_SOURCE_PREFIX}-U_FORTIFY_SOURCE ${_FORTIFY_SOURCE_PREFIX}-D_FORTIFY_SOURCE=1") endif() # Remove --sort-common from linker flags, as this seems to cause bugs (see #2641, #3374). # TODO: Figure out the root cause. if(CMAKE_EXE_LINKER_FLAGS MATCHES "--sort-common" OR CMAKE_SHARED_LINKER_FLAGS MATCHES "--sort-common" OR CMAKE_MODULE_LINKER_FLAGS MATCHES "--sort-common") message(STATUS "Removing --sort-common from linker flags.") string(REGEX REPLACE ",--sort-common(=[^,]+)?" "" CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}") string(REGEX REPLACE ",--sort-common(=[^,]+)?" "" CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}") string(REGEX REPLACE ",--sort-common(=[^,]+)?" "" CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS}") # If no linker flags remain for a -Wl argument, remove it. # '-Wl$' will match LDFLAGS="-Wl,--sort-common", # '-Wl ' will match LDFLAGS="-Wl,--sort-common -Wl,..." string(REGEX REPLACE "-Wl($| )" "" CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}") string(REGEX REPLACE "-Wl($| )" "" CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}") string(REGEX REPLACE "-Wl($| )" "" CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS}") endif() check_c_source_compiles(" #include int main(void) { void *trace[1]; int trace_size = backtrace(trace, 1); return 0; } " HAVE_EXECINFO_BACKTRACE) if(MSVC) # XXX: /W4 gives too many warnings. #3241 add_definitions(/W3 -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE) else() add_definitions(-Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99) check_c_compiler_flag(-Wimplicit-fallthrough HAS_WIMPLICIT_FALLTHROUGH_FLAG) if(HAS_WIMPLICIT_FALLTHROUGH_FLAG) add_definitions(-Wimplicit-fallthrough) endif() # On FreeBSD 64 math.h uses unguarded C11 extension, which taints clang # 3.4.1 used there. if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" AND CMAKE_C_COMPILER_ID MATCHES "Clang") add_definitions(-Wno-c11-extensions) endif() endif() if(MINGW) # Use POSIX compatible stdio in Mingw add_definitions(-D__USE_MINGW_ANSI_STDIO) add_definitions(-D_WIN32_WINNT=0x0600) endif() # OpenBSD's GCC (4.2.1) doesn't have -Wvla check_c_compiler_flag(-Wvla HAS_WVLA_FLAG) if(HAS_WVLA_FLAG) add_definitions(-Wvla) endif() if(UNIX) # -fstack-protector breaks non Unix builds even in Mingw-w64 check_c_compiler_flag(-fstack-protector-strong HAS_FSTACK_PROTECTOR_STRONG_FLAG) check_c_compiler_flag(-fstack-protector HAS_FSTACK_PROTECTOR_FLAG) if(HAS_FSTACK_PROTECTOR_STRONG_FLAG) add_definitions(-fstack-protector-strong) elseif(HAS_FSTACK_PROTECTOR_FLAG) add_definitions(-fstack-protector --param ssp-buffer-size=4) endif() endif() check_c_compiler_flag(-fdiagnostics-color=auto HAS_DIAG_COLOR_FLAG) if(HAS_DIAG_COLOR_FLAG) add_definitions(-fdiagnostics-color=auto) endif() if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.8.5") # Array-bounds testing is broken in some GCC versions before 4.8.5. # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56273 check_c_compiler_flag(-Wno-array-bounds HAS_NO_ARRAY_BOUNDS_FLAG) if(HAS_NO_ARRAY_BOUNDS_FLAG) add_definitions(-Wno-array-bounds) endif() endif() endif() option(TRAVIS_CI_BUILD "Travis/QuickBuild CI. Extra flags will be set." OFF) if(TRAVIS_CI_BUILD) message(STATUS "Travis/QuickBuild CI build enabled.") add_definitions(-Werror) if(DEFINED ENV{BUILD_32BIT}) # Get some test coverage for unsigned char add_definitions(-funsigned-char) endif() endif() if(CMAKE_BUILD_TYPE MATCHES Debug) set(DEBUG 1) else() set(DEBUG 0) endif() add_definitions(-DINCLUDE_GENERATED_DECLARATIONS) if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_SYSTEM_NAME STREQUAL "Linux") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--no-undefined") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined") set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined") # For O_CLOEXEC, O_DIRECTORY, and O_NOFOLLOW flags on older systems # (pre POSIX.1-2008: glibc 2.11 and earlier). #4042 add_definitions(-D_GNU_SOURCE) endif() if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_SYSTEM_NAME STREQUAL "SunOS") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--no-undefined -lsocket") endif() if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_SIZEOF_VOID_P EQUAL 8) # Required for luajit. set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pagezero_size 10000 -image_base 100000000") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -image_base 100000000") set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -image_base 100000000") endif() include_directories("${PROJECT_BINARY_DIR}/config") include_directories("${PROJECT_SOURCE_DIR}/src") find_package(LibUV REQUIRED) include_directories(SYSTEM ${LIBUV_INCLUDE_DIRS}) find_package(Msgpack 1.0.0 REQUIRED) include_directories(SYSTEM ${MSGPACK_INCLUDE_DIRS}) # Note: The test lib requires LuaJIT; it will be skipped if LuaJIT is missing. option(PREFER_LUA "Prefer Lua over LuaJIT in the nvim executable." OFF) if(PREFER_LUA) find_package(Lua REQUIRED) set(LUA_PREFERRED_INCLUDE_DIRS ${LUA_INCLUDE_DIR}) set(LUA_PREFERRED_LIBRARIES ${LUA_LIBRARIES}) find_package(LuaJit) else() find_package(LuaJit REQUIRED) set(LUA_PREFERRED_INCLUDE_DIRS ${LUAJIT_INCLUDE_DIRS}) set(LUA_PREFERRED_LIBRARIES ${LUAJIT_LIBRARIES}) endif() list(APPEND CMAKE_REQUIRED_INCLUDES "${MSGPACK_INCLUDE_DIRS}") check_c_source_compiles(" #include int main(void) { return MSGPACK_OBJECT_FLOAT32; } " MSGPACK_HAS_FLOAT32) if(MSGPACK_HAS_FLOAT32) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DNVIM_MSGPACK_HAS_FLOAT32") endif() option(FEAT_TUI "Enable the Terminal UI" ON) if(FEAT_TUI) find_package(Unibilium REQUIRED) include_directories(SYSTEM ${UNIBILIUM_INCLUDE_DIRS}) list(APPEND CMAKE_REQUIRED_INCLUDES "${UNIBILIUM_INCLUDE_DIRS}") list(APPEND CMAKE_REQUIRED_LIBRARIES "${UNIBILIUM_LIBRARIES}") check_c_source_compiles(" #include int main(void) { return unibi_num_from_var(unibi_var_from_num(0)); } " UNIBI_HAS_VAR_FROM) if(UNIBI_HAS_VAR_FROM) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DNVIM_UNIBI_HAS_VAR_FROM") endif() find_package(LibTermkey REQUIRED) include_directories(SYSTEM ${LIBTERMKEY_INCLUDE_DIRS}) endif() find_package(LibVterm REQUIRED) include_directories(SYSTEM ${LIBVTERM_INCLUDE_DIRS}) if(WIN32) find_package(Winpty REQUIRED) include_directories(SYSTEM ${WINPTY_INCLUDE_DIRS}) endif() option(CLANG_ASAN_UBSAN "Enable Clang address & undefined behavior sanitizer for nvim binary." OFF) option(CLANG_MSAN "Enable Clang memory sanitizer for nvim binary." OFF) option(CLANG_TSAN "Enable Clang thread sanitizer for nvim binary." OFF) if((CLANG_ASAN_UBSAN AND CLANG_MSAN) OR (CLANG_ASAN_UBSAN AND CLANG_TSAN) OR (CLANG_MSAN AND CLANG_TSAN)) message(FATAL_ERROR "Sanitizers cannot be enabled simultaneously.") endif() if((CLANG_ASAN_UBSAN OR CLANG_MSAN OR CLANG_TSAN) AND NOT CMAKE_C_COMPILER_ID MATCHES "Clang") message(FATAL_ERROR "Sanitizers are only supported for Clang.") endif() if(CMAKE_SYSTEM_NAME MATCHES "OpenBSD|FreeBSD") message(STATUS "detected OpenBSD/FreeBSD; disabled jemalloc. #5318") option(ENABLE_JEMALLOC "enable jemalloc" OFF) else() option(ENABLE_JEMALLOC "enable jemalloc" ON) endif() if (ENABLE_JEMALLOC) if(CLANG_ASAN_UBSAN OR CLANG_MSAN OR CLANG_TSAN) message(STATUS "Sanitizers have been enabled; don't use jemalloc.") else() find_package(JeMalloc) if(JEMALLOC_FOUND) include_directories(SYSTEM ${JEMALLOC_INCLUDE_DIRS}) endif() endif() endif() find_package(LibIntl) if(LibIntl_FOUND) include_directories(SYSTEM ${LibIntl_INCLUDE_DIRS}) endif() find_package(Iconv) if(Iconv_FOUND) include_directories(SYSTEM ${Iconv_INCLUDE_DIRS}) endif() # Determine platform's threading library. Set CMAKE_THREAD_PREFER_PTHREAD # explicitly to indicate a strong preference for pthread. set(CMAKE_THREAD_PREFER_PTHREAD ON) find_package(Threads REQUIRED) # Place targets in bin/ or lib/ for all build configurations set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) foreach(CFGNAME ${CMAKE_CONFIGURATION_TYPES}) string(TOUPPER ${CFGNAME} CFGNAME) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CFGNAME} ${CMAKE_BINARY_DIR}/bin) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CFGNAME} ${CMAKE_BINARY_DIR}/lib) set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CFGNAME} ${CMAKE_BINARY_DIR}/lib) endforeach() # Find Lua interpreter include(LuaHelpers) set(LUA_DEPENDENCIES lpeg mpack bit) if(NOT LUA_PRG) foreach(CURRENT_LUA_PRG luajit lua5.1 lua5.2 lua) # If LUA_PRG is set find_program() will not search unset(LUA_PRG CACHE) unset(LUA_PRG_WORKS) find_program(LUA_PRG ${CURRENT_LUA_PRG}) if(LUA_PRG) check_lua_deps(${LUA_PRG} "${LUA_DEPENDENCIES}" LUA_PRG_WORKS) if(LUA_PRG_WORKS) break() endif() endif() endforeach() else() check_lua_deps(${LUA_PRG} "${LUA_DEPENDENCIES}" LUA_PRG_WORKS) endif() if(NOT LUA_PRG_WORKS) message(FATAL_ERROR "A suitable Lua interpreter was not found.") endif() message(STATUS "Using the Lua interpreter ${LUA_PRG}.") # Setup busted. find_program(BUSTED_PRG NAMES busted busted.bat) find_program(BUSTED_LUA_PRG busted-lua) if(NOT BUSTED_OUTPUT_TYPE) set(BUSTED_OUTPUT_TYPE "nvim") endif() find_program(LUACHECK_PRG luacheck) find_program(GPERF_PRG gperf) include(InstallHelpers) file(GLOB MANPAGES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} man/nvim.1) install_helper( FILES ${MANPAGES} DESTINATION ${CMAKE_INSTALL_MANDIR}/man1) # MIN_LOG_LEVEL for log.h if("${MIN_LOG_LEVEL}" MATCHES "^$") message(STATUS "MIN_LOG_LEVEL not specified") else() if(NOT MIN_LOG_LEVEL MATCHES "^[0-3]$") message(FATAL_ERROR "invalid MIN_LOG_LEVEL: " ${MIN_LOG_LEVEL}) endif() message(STATUS "MIN_LOG_LEVEL set to ${MIN_LOG_LEVEL}") endif() # Go down the tree. add_subdirectory(src/nvim) # Read compilation flags from src/nvim, used in config subdirectory below. include(GetCompileFlags) get_compile_flags(NVIM_VERSION_CFLAGS) add_subdirectory(test/includes) add_subdirectory(config) add_subdirectory(test/functional/fixtures) # compile test programs add_subdirectory(runtime) # Setup some test-related bits. We do this after going down the tree because we # need some of the targets. if(BUSTED_PRG) get_property(TEST_INCLUDE_DIRS DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES) # Set policy CMP0026 to OLD so we avoid CMake warnings on newer # versions of cmake. if(POLICY CMP0026) cmake_policy(SET CMP0026 OLD) endif() if(CMAKE_GENERATOR MATCHES "Visual Studio") set(TEST_LIBNVIM_PATH ${CMAKE_BINARY_DIR}/lib/nvim-test.dll) else() get_target_property(TEST_LIBNVIM_PATH nvim-test LOCATION) endif() # When running tests from 'ninja' we need to use the # console pool: to do so we need to use the USES_TERMINAL # option, but this is only available in CMake 3.2 set(TEST_TARGET_ARGS) if(NOT (${CMAKE_VERSION} VERSION_LESS 3.2.0)) list(APPEND TEST_TARGET_ARGS "USES_TERMINAL") endif() configure_file( test/config/paths.lua.in ${CMAKE_BINARY_DIR}/test/config/paths.lua) set(UNITTEST_PREREQS nvim-test unittest-headers) set(FUNCTIONALTEST_PREREQS nvim printargs-test shell-test) if(NOT WIN32) list(APPEND FUNCTIONALTEST_PREREQS tty-test) endif() set(BENCHMARK_PREREQS nvim tty-test) # Useful for automated build systems, if they want to manually run the tests. add_custom_target(unittest-prereqs DEPENDS ${UNITTEST_PREREQS}) add_custom_target(functionaltest-prereqs DEPENDS ${FUNCTIONALTEST_PREREQS}) add_custom_target(benchmark-prereqs DEPENDS ${BENCHMARK_PREREQS}) check_lua_module(${LUA_PRG} "ffi" LUA_HAS_FFI) if(LUA_HAS_FFI) add_custom_target(unittest COMMAND ${CMAKE_COMMAND} -DBUSTED_PRG=${BUSTED_PRG} -DLUA_PRG=${LUA_PRG} -DWORKING_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DBUSTED_OUTPUT_TYPE=${BUSTED_OUTPUT_TYPE} -DTEST_DIR=${CMAKE_CURRENT_SOURCE_DIR}/test -DBUILD_DIR=${CMAKE_BINARY_DIR} -DTEST_TYPE=unit -DSYSTEM_NAME=${CMAKE_SYSTEM_NAME} -P ${PROJECT_SOURCE_DIR}/cmake/RunTests.cmake DEPENDS ${UNITTEST_PREREQS} ${TEST_TARGET_ARGS}) else() message(WARNING "disabling unit tests: no Luajit FFI in ${LUA_PRG}") endif() add_custom_target(functionaltest COMMAND ${CMAKE_COMMAND} -DBUSTED_PRG=${BUSTED_PRG} -DLUA_PRG=${LUA_PRG} -DNVIM_PRG=$ -DWORKING_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DBUSTED_OUTPUT_TYPE=${BUSTED_OUTPUT_TYPE} -DTEST_DIR=${CMAKE_CURRENT_SOURCE_DIR}/test -DBUILD_DIR=${CMAKE_BINARY_DIR} -DTEST_TYPE=functional -DSYSTEM_NAME=${CMAKE_SYSTEM_NAME} -P ${PROJECT_SOURCE_DIR}/cmake/RunTests.cmake DEPENDS ${FUNCTIONALTEST_PREREQS} ${TEST_TARGET_ARGS}) add_custom_target(benchmark COMMAND ${CMAKE_COMMAND} -DBUSTED_PRG=${BUSTED_PRG} -DLUA_PRG=${LUA_PRG} -DNVIM_PRG=$ -DWORKING_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DBUSTED_OUTPUT_TYPE=${BUSTED_OUTPUT_TYPE} -DTEST_DIR=${CMAKE_CURRENT_SOURCE_DIR}/test -DBUILD_DIR=${CMAKE_BINARY_DIR} -DTEST_TYPE=benchmark -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME} -P ${PROJECT_SOURCE_DIR}/cmake/RunTests.cmake DEPENDS ${BENCHMARK_PREREQS} ${TEST_TARGET_ARGS}) endif() if(BUSTED_LUA_PRG) add_custom_target(functionaltest-lua COMMAND ${CMAKE_COMMAND} -DBUSTED_PRG=${BUSTED_LUA_PRG} -DLUA_PRG=${LUA_PRG} -DNVIM_PRG=$ -DWORKING_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DBUSTED_OUTPUT_TYPE=${BUSTED_OUTPUT_TYPE} -DTEST_DIR=${CMAKE_CURRENT_SOURCE_DIR}/test -DBUILD_DIR=${CMAKE_BINARY_DIR} -DTEST_TYPE=functional -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME} -P ${PROJECT_SOURCE_DIR}/cmake/RunTests.cmake DEPENDS ${FUNCTIONALTEST_PREREQS} ${TEST_TARGET_ARGS}) endif() if(LUACHECK_PRG) add_custom_target(testlint COMMAND ${CMAKE_COMMAND} -DLUACHECK_PRG=${LUACHECK_PRG} -DLUAFILES_DIR=${CMAKE_CURRENT_SOURCE_DIR}/test -DIGNORE_PATTERN="*/preload.lua" -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME} -P ${PROJECT_SOURCE_DIR}/cmake/RunLuacheck.cmake) add_custom_target( blobcodelint COMMAND ${CMAKE_COMMAND} -DLUACHECK_PRG=${LUACHECK_PRG} -DLUAFILES_DIR=${CMAKE_CURRENT_SOURCE_DIR}/src/nvim/lua -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME} -DREAD_GLOBALS=vim -P ${PROJECT_SOURCE_DIR}/cmake/RunLuacheck.cmake ) # TODO(ZyX-I): Run linter for all lua code in src add_custom_target( lualint DEPENDS blobcodelint ) endif() set(CPACK_PACKAGE_NAME "Neovim") set(CPACK_PACKAGE_VENDOR "neovim.io") set(CPACK_PACKAGE_VERSION ${NVIM_VERSION_MEDIUM}) set(CPACK_PACKAGE_INSTALL_DIRECTORY "Neovim") # Set toplevel directory/installer name as Neovim set(CPACK_PACKAGE_FILE_NAME "Neovim") set(CPACK_TOPLEVEL_TAG "Neovim") set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE") set(CPACK_NSIS_MODIFY_PATH ON) set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON) include(CPack) neovim-0.2.2/CONTRIBUTING.md000066400000000000000000000176331320401574200152510ustar00rootroot00000000000000# Contributing to Neovim Getting started --------------- If you want to help but don't know where to start, here are some low-risk/isolated tasks: - [Merge a Vim patch]. - Try a [complexity:low] issue. - Fix bugs found by [clang scan-build](#clang-scan-build), [coverity](#coverity), and [PVS](#pvs-studio). Developer guidelines -------------------- - Nvim developers should read `:help dev-help`. - External UI developers should read `:help dev-ui`. Reporting problems ------------------ - Check the [**FAQ**][wiki-faq]. - Search [existing issues][github-issues] (including closed!) - Update Neovim to the latest version to see if your problem persists. - Disable plugins incrementally, to narrow down the cause of the issue. - When reporting a crash, include a stacktrace. - [Bisect][git-bisect] to the cause of a regression, if you are able. This is _extremely_ helpful. - Check `$NVIM_LOG_FILE`, if it exists. - Include `cmake --system-information` for **build** issues. Pull requests ("PRs") --------------------- - To avoid duplicate work, create a `[WIP]` pull request as soon as possible. - Avoid cosmetic changes to unrelated files in the same commit. - Use a [feature branch][git-feature-branch] instead of the master branch. - Use a **rebase workflow** for small PRs. - After addressing review comments, it's fine to rebase and force-push. - Use a **merge workflow** for big, high-risk PRs. - Merge `master` into your PR when there are conflicts or when master introduces breaking changes. - Use the `ri` git alias: ``` [alias] ri = "!sh -c 't=\"${1:-master}\"; s=\"${2:-HEAD}\"; mb=\"$(git merge-base \"$t\" \"$s\")\"; if test \"x$mb\" = x ; then o=\"$t\"; else lm=\"$(git log -n1 --merges \"$t..$s\" --pretty=%H)\"; if test \"x$lm\" = x ; then o=\"$mb\"; else o=\"$lm\"; fi; fi; test $# -gt 0 && shift; test $# -gt 0 && shift; git rebase --interactive \"$o\" \"$@\"'" ``` This avoids unnecessary rebases yet still allows you to combine related commits, separate monolithic commits, etc. - Do not edit commits that come before the merge commit. - During a squash/fixup, use `exec make -C build unittest` between each pick/edit/reword. ### Stages: WIP, RFC, RDY Pull requests have three stages: `[WIP]` (Work In Progress), `[RFC]` (Request For Comment) and `[RDY]` (Ready). - Untagged PRs are assumed to be `[RFC]`, i.e. you are requesting a review. - Prepend `[WIP]` to the PR title if you are _not_ requesting feedback and the work is still in flux. - Prepend `[RDY]` to the PR title if you are _done_ with the PR and are only waiting on it to be merged. For example, a typical workflow is: 1. You open a `[WIP]` PR where the work is _not_ ready for feedback, you just want to let others know what you are doing. 2. Once the PR is ready for review, you replace `[WIP]` in the title with `[RFC]`. You may add fix up commits to address issues that come up during review. 3. Once the PR is ready for merging, you rebase/squash your work appropriately and then replace `[RFC]` in the title with `[RDY]`. ### Commit messages Follow [commit message hygiene][hygiene] to *make reviews easier* and to make the VCS/git logs more valuable. - Try to keep the first line under 72 characters. - **Prefix the commit subject with a _scope_:** `doc:`, `test:`, `foo.c:`, `runtime:`, ... - For commits that contain only style/lint changes, a single-word subject line is preferred: `style` or `lint`. - A blank line must separate the subject from the description. - Use the _imperative voice_: "Fix bug" rather than "Fixed bug" or "Fixes bug." ### Automated builds (CI) Each pull request must pass the automated builds on [travis CI], [quickbuild] and [AppVeyor]. - CI builds are compiled with [`-Werror`][gcc-warnings], so compiler warnings will fail the build. - If any tests fail, the build will fail. See [Building Neovim#running-tests][wiki-run-tests] to run tests locally. Passing locally doesn't guarantee passing the CI build, because of the different compilers and platforms tested against. - CI runs [ASan] and other analyzers. - To run valgrind locally: `VALGRIND=1 make test` - To run Clang ASan/UBSan locally: `CC=clang make CMAKE_FLAGS="-DCLANG_ASAN_UBSAN=ON"` - The `lint` build ([#3174][3174]) checks modified lines _and their immediate neighbors_. This is to encourage incrementally updating the legacy style to meet our style guidelines. - A single word (`lint` or `style`) is sufficient as the subject line of a commit that contains only style changes. - [How to investigate QuickBuild failures](https://github.com/neovim/neovim/pull/4718#issuecomment-217631350) QuickBuild uses this invocation: mkdir -p build/${params.get("buildType")} \ && cd build/${params.get("buildType")} \ && cmake -G "Unix Makefiles" -DBUSTED_OUTPUT_TYPE=TAP -DCMAKE_BUILD_TYPE=${params.get("buildType")} -DTRAVIS_CI_BUILD=ON ../.. && ${node.getAttribute("make", "make")} VERBOSE=1 nvim unittest-prereqs functionaltest-prereqs ### Clang scan-build The auto-generated [clang-scan] report presents walk-throughs of bugs found by Clang's [scan-build](https://clang-analyzer.llvm.org/scan-build.html) static analyzer. To verify a fix locally, run `scan-build` like this: rm -rf build/ scan-build --use-analyzer=/usr/bin/clang make ### Coverity [Coverity](https://scan.coverity.com/projects/neovim-neovim) runs against the master build. To view the defects, just request access; you will be approved. Use this commit-message format for coverity fixes: coverity/: where `` is the Coverity ID (CID). For example see [#804](https://github.com/neovim/neovim/pull/804). ### PVS-Studio View the [PVS analysis report](https://neovim.io/doc/reports/pvs/) to see bugs found by [PVS Studio](https://www.viva64.com/en/pvs-studio/). You can run `scripts/pvscheck.sh` locally to run PVS on your machine. Reviewing --------- To help review pull requests, start with [this checklist][review-checklist]. Reviewing can be done on GitHub, but you may find it easier to do locally. Using [`hub`][hub], you can create a new branch with the contents of a pull request, e.g. [#1820][1820]: hub checkout https://github.com/neovim/neovim/pull/1820 Use [`git log -p master..FETCH_HEAD`][git-history-filtering] to list all commits in the feature branch which aren't in the `master` branch; `-p` shows each commit's diff. To show the whole surrounding function of a change as context, use the `-W` argument as well. [gcc-warnings]: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html [git-bisect]: http://git-scm.com/book/tr/v2/Git-Tools-Debugging-with-Git [git-feature-branch]: https://www.atlassian.com/git/tutorials/comparing-workflows [git-history-filtering]: https://www.atlassian.com/git/tutorials/git-log/filtering-the-commit-history [git-history-rewriting]: http://git-scm.com/book/en/v2/Git-Tools-Rewriting-History [git-rebasing]: http://git-scm.com/book/en/v2/Git-Branching-Rebasing [github-issues]: https://github.com/neovim/neovim/issues [1820]: https://github.com/neovim/neovim/pull/1820 [hub]: https://hub.github.com/ [hygiene]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html [style-guide]: http://neovim.io/develop/style-guide.xml [ASan]: http://clang.llvm.org/docs/AddressSanitizer.html [wiki-run-tests]: https://github.com/neovim/neovim/wiki/Building-Neovim#running-tests [wiki-faq]: https://github.com/neovim/neovim/wiki/FAQ [review-checklist]: https://github.com/neovim/neovim/wiki/Code-review-checklist [3174]: https://github.com/neovim/neovim/issues/3174 [travis CI]: https://travis-ci.org/neovim/neovim [quickbuild]: http://neovim-qb.szakmeister.net/dashboard [AppVeyor]: https://ci.appveyor.com/project/neovim/neovim [Merge a Vim patch]: https://github.com/neovim/neovim/wiki/Merging-patches-from-upstream-Vim [clang-scan]: https://neovim.io/doc/reports/clang/ [complexity:low]: https://github.com/neovim/neovim/issues?q=is%3Aopen+is%3Aissue+label%3Acomplexity%3Alow neovim-0.2.2/ISSUE_TEMPLATE.md000066400000000000000000000004641320401574200155170ustar00rootroot00000000000000 - `nvim --version`: - Vim (version: ) behaves differently? - Operating system/version: - Terminal name/version: - `$TERM`: ### Steps to reproduce using `nvim -u NORC` ``` nvim -u NORC ``` ### Actual behaviour ### Expected behaviour neovim-0.2.2/LICENSE000066400000000000000000000366371320401574200140320ustar00rootroot00000000000000Copyright Neovim contributors. All rights reserved. Neovim is licensed under the terms of the Apache 2.0 license, except for parts of Neovim that were contributed under the Vim license (see below). Neovim's license follows: ==== Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. ==== The above license applies to all parts of Neovim except (1) parts that were contributed under the Vim license and (2) externally maintained libraries. The externally maintained libraries used by Neovim are: - Klib: a Generic Library in C. MIT/X11 license. - libuv. Copyright Joyent, Inc. and other Node contributors. Node.js license. - LuaJIT: a Just-In-Time Compiler for Lua. Copyright Mike Pall. MIT license. ==== Any parts of Neovim that were contributed under the Vim license are licensed under the Vim license unless the copyright holder gave permission to license those contributions under the Apache 2.0 license. The Vim license follows: VIM LICENSE I) There are no restrictions on distributing unmodified copies of Vim except that they must include this license text. You can also distribute unmodified parts of Vim, likewise unrestricted except that they must include this license text. You are also allowed to include executables that you made from the unmodified Vim sources, plus your own usage examples and Vim scripts. II) It is allowed to distribute a modified (or extended) version of Vim, including executables and/or source code, when the following four conditions are met: 1) This license text must be included unmodified. 2) The modified Vim must be distributed in one of the following five ways: a) If you make changes to Vim yourself, you must clearly describe in the distribution how to contact you. When the maintainer asks you (in any way) for a copy of the modified Vim you distributed, you must make your changes, including source code, available to the maintainer without fee. The maintainer reserves the right to include your changes in the official version of Vim. What the maintainer will do with your changes and under what license they will be distributed is negotiable. If there has been no negotiation then this license, or a later version, also applies to your changes. The current maintainer is Bram Moolenaar . If this changes it will be announced in appropriate places (most likely vim.sf.net, www.vim.org and/or comp.editors). When it is completely impossible to contact the maintainer, the obligation to send him your changes ceases. Once the maintainer has confirmed that he has received your changes they will not have to be sent again. b) If you have received a modified Vim that was distributed as mentioned under a) you are allowed to further distribute it unmodified, as mentioned at I). If you make additional changes the text under a) applies to those changes. c) Provide all the changes, including source code, with every copy of the modified Vim you distribute. This may be done in the form of a context diff. You can choose what license to use for new code you add. The changes and their license must not restrict others from making their own changes to the official version of Vim. d) When you have a modified Vim which includes changes as mentioned under c), you can distribute it without the source code for the changes if the following three conditions are met: - The license that applies to the changes permits you to distribute the changes to the Vim maintainer without fee or restriction, and permits the Vim maintainer to include the changes in the official version of Vim without fee or restriction. - You keep the changes for at least three years after last distributing the corresponding modified Vim. When the maintainer or someone who you distributed the modified Vim to asks you (in any way) for the changes within this period, you must make them available to him. - You clearly describe in the distribution how to contact you. This contact information must remain valid for at least three years after last distributing the corresponding modified Vim, or as long as possible. e) When the GNU General Public License (GPL) applies to the changes, you can distribute the modified Vim under the GNU GPL version 2 or any later version. 3) A message must be added, at least in the output of the ":version" command and in the intro screen, such that the user of the modified Vim is able to see that it was modified. When distributing as mentioned under 2)e) adding the message is only required for as far as this does not conflict with the license used for the changes. 4) The contact information as required under 2)a) and 2)d) must not be removed or changed, except that the person himself can make corrections. III) If you distribute a modified version of Vim, you are encouraged to use the Vim license for your changes and make them available to the maintainer, including the source code. The preferred way to do this is by e-mail or by uploading the files to a server and e-mailing the URL. If the number of changes is small (e.g., a modified Makefile) e-mailing a context diff will do. The e-mail address to be used is IV) It is not allowed to remove this license from the distribution of the Vim sources, parts of it or from a modified version. You may use this license for previous Vim releases instead of the license that they came with, at your option. neovim-0.2.2/Makefile000066400000000000000000000073131320401574200144520ustar00rootroot00000000000000filter-false = $(strip $(filter-out 0 off OFF false FALSE,$1)) filter-true = $(strip $(filter-out 1 on ON true TRUE,$1)) # See contrib/local.mk.example -include local.mk CMAKE_PRG ?= $(shell (command -v cmake3 || echo cmake)) CMAKE_BUILD_TYPE ?= Debug CMAKE_FLAGS := -DCMAKE_BUILD_TYPE=$(CMAKE_BUILD_TYPE) DOC_DOWNLOAD_URL_BASE := https://raw.githubusercontent.com/neovim/doc/gh-pages CLINT_ERRORS_FILE_PATH := /reports/clint/errors.json BUILD_TYPE ?= $(shell (type ninja > /dev/null 2>&1 && echo "Ninja") || \ echo "Unix Makefiles") ifeq (,$(BUILD_TOOL)) ifeq (Ninja,$(BUILD_TYPE)) ifneq ($(shell $(CMAKE_PRG) --help 2>/dev/null | grep Ninja),) BUILD_TOOL := ninja else # User's version of CMake doesn't support Ninja BUILD_TOOL = $(MAKE) BUILD_TYPE := Unix Makefiles endif else BUILD_TOOL = $(MAKE) endif endif ifneq ($(VERBOSE),) # Only need to handle Ninja here. Make will inherit the VERBOSE variable. ifeq ($(BUILD_TYPE),Ninja) VERBOSE_FLAG := -v endif endif BUILD_CMD = $(BUILD_TOOL) $(VERBOSE_FLAG) # Extra CMake flags which extend the default set CMAKE_EXTRA_FLAGS ?= DEPS_CMAKE_FLAGS ?= USE_BUNDLED_DEPS ?= ifneq (,$(USE_BUNDLED_DEPS)) BUNDLED_CMAKE_FLAG := -DUSE_BUNDLED=$(USE_BUNDLED_DEPS) endif ifneq (,$(findstring functionaltest-lua,$(MAKECMDGOALS))) BUNDLED_LUA_CMAKE_FLAG := -DUSE_BUNDLED_LUA=ON $(shell [ -x .deps/usr/bin/lua ] || rm build/.ran-*) endif # For use where we want to make sure only a single job is run. This does issue # a warning, but we need to keep SCRIPTS argument. SINGLE_MAKE = export MAKEFLAGS= ; $(MAKE) all: nvim nvim: build/.ran-cmake deps +$(BUILD_CMD) -C build libnvim: build/.ran-cmake deps +$(BUILD_CMD) -C build libnvim cmake: touch CMakeLists.txt $(MAKE) build/.ran-cmake build/.ran-cmake: | deps cd build && $(CMAKE_PRG) -G '$(BUILD_TYPE)' $(CMAKE_FLAGS) $(CMAKE_EXTRA_FLAGS) .. touch $@ deps: | build/.ran-third-party-cmake ifeq ($(call filter-true,$(USE_BUNDLED_DEPS)),) +$(BUILD_CMD) -C .deps endif build/.ran-third-party-cmake: ifeq ($(call filter-true,$(USE_BUNDLED_DEPS)),) mkdir -p .deps cd .deps && \ $(CMAKE_PRG) -G '$(BUILD_TYPE)' $(BUNDLED_CMAKE_FLAG) $(BUNDLED_LUA_CMAKE_FLAG) \ $(DEPS_CMAKE_FLAGS) ../third-party endif mkdir -p build touch $@ # TODO: cmake 3.2+ add_custom_target() has a USES_TERMINAL flag. oldtest: | nvim helptags +$(SINGLE_MAKE) -C src/nvim/testdir clean ifeq ($(strip $(TEST_FILE)),) +$(SINGLE_MAKE) -C src/nvim/testdir NVIM_PRG="$(realpath build/bin/nvim)" $(MAKEOVERRIDES) else +$(SINGLE_MAKE) -C src/nvim/testdir NVIM_PRG="$(realpath build/bin/nvim)" NEW_TESTS=$(TEST_FILE) SCRIPTS= $(MAKEOVERRIDES) endif helptags: | nvim +$(BUILD_CMD) -C build helptags functionaltest: | nvim +$(BUILD_CMD) -C build functionaltest functionaltest-lua: | nvim +$(BUILD_CMD) -C build functionaltest-lua testlint: | build/.ran-cmake deps $(BUILD_CMD) -C build testlint lualint: | build/.ran-cmake deps $(BUILD_CMD) -C build lualint unittest: | nvim +$(BUILD_CMD) -C build unittest benchmark: | nvim +$(BUILD_CMD) -C build benchmark test: functionaltest unittest clean: +test -d build && $(BUILD_CMD) -C build clean || true $(MAKE) -C src/nvim/testdir clean $(MAKE) -C runtime/doc clean distclean: clean rm -rf .deps build install: | nvim +$(BUILD_CMD) -C build install clint: build/.ran-cmake +$(BUILD_CMD) -C build clint clint-full: build/.ran-cmake +$(BUILD_CMD) -C build clint-full check-single-includes: build/.ran-cmake +$(BUILD_CMD) -C build check-single-includes appimage: bash scripts/genappimage.sh lint: check-single-includes clint testlint lualint .PHONY: test testlint lualint functionaltest unittest lint clint clean distclean nvim libnvim cmake deps install appimage neovim-0.2.2/README.md000066400000000000000000000133421320401574200142700ustar00rootroot00000000000000[![Neovim](https://raw.githubusercontent.com/neovim/neovim.github.io/master/logos/neovim-logo-600x173.png)](https://neovim.io) [Wiki](https://github.com/neovim/neovim/wiki) | [Documentation](https://neovim.io/doc) | [Twitter](https://twitter.com/Neovim) | [Community](https://neovim.io/community/) | [Gitter **Chat**](https://gitter.im/neovim/neovim) [![Travis Build Status](https://travis-ci.org/neovim/neovim.svg?branch=master)](https://travis-ci.org/neovim/neovim) [![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/urdqjrik5u521fac/branch/master?svg=true)](https://ci.appveyor.com/project/neovim/neovim/branch/master) [![codecov](https://img.shields.io/codecov/c/github/neovim/neovim.svg)](https://codecov.io/gh/neovim/neovim) [![Coverity Scan Build](https://scan.coverity.com/projects/2227/badge.svg)](https://scan.coverity.com/projects/2227) [![Clang Scan Build](https://neovim.io/doc/reports/clang/badge.svg)](https://neovim.io/doc/reports/clang) [![PVS-studio Check](https://neovim.io/doc/reports/pvs/badge.svg)](https://neovim.io/doc/reports/pvs) [![Debian CI](https://badges.debian.net/badges/debian/testing/neovim/version.svg)](https://buildd.debian.org/neovim) [![Downloads](https://img.shields.io/github/downloads/neovim/neovim/total.svg?maxAge=2592000)](https://github.com/neovim/neovim/releases/) Neovim is a project that seeks to aggressively refactor Vim in order to: - Simplify maintenance and encourage [contributions](CONTRIBUTING.md) - Split the work between multiple developers - Enable [advanced UIs] without modifications to the core - Maximize [extensibility](https://github.com/neovim/neovim/wiki/Plugin-UI-architecture) See [the wiki](https://github.com/neovim/neovim/wiki/Introduction) and [Roadmap] for more information. [![Throughput Graph](https://graphs.waffle.io/neovim/neovim/throughput.svg)](https://waffle.io/neovim/neovim/metrics) Install from source ------------------- make CMAKE_BUILD_TYPE=RelWithDebInfo sudo make install To install to a non-default location, specify `CMAKE_INSTALL_PREFIX`: make CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX=/full/path/" make install See [the wiki](https://github.com/neovim/neovim/wiki/Building-Neovim) for details. Install from package -------------------- Pre-built packages for Windows, macOS, and Linux are found at the [Releases](https://github.com/neovim/neovim/releases/) page. Managed packages are in [Homebrew], [Debian], [Ubuntu], [Fedora], [Arch Linux], [Gentoo], and [more](https://github.com/neovim/neovim/wiki/Installing-Neovim)! Project layout -------------- ├─ ci/ build automation ├─ cmake/ build scripts ├─ runtime/ user plugins/docs ├─ src/ application source code (see src/nvim/README.md) │ ├─ api/ API subsystem │ ├─ eval/ VimL subsystem │ ├─ event/ event-loop subsystem │ ├─ generators/ code generation (pre-compilation) │ ├─ lib/ generic data structures │ ├─ lua/ lua subsystem │ ├─ msgpack_rpc/ RPC subsystem │ ├─ os/ low-level platform code │ └─ tui/ built-in UI ├─ third-party/ cmake subproject to build dependencies └─ test/ tests (see test/README.md) - To disable `third-party/` specify `USE_BUNDLED_DEPS=NO` or `USE_BUNDLED=NO` (CMake option). Features -------- - Modern [GUIs](https://github.com/neovim/neovim/wiki/Related-projects#gui) - [API](https://github.com/neovim/neovim/wiki/Related-projects#api-clients) access from any language including clojure, lisp, go, haskell, lua, javascript, perl, python, ruby, rust. - Embedded, scriptable [terminal emulator](https://neovim.io/doc/user/nvim_terminal_emulator.html) - Asynchronous [job control](https://github.com/neovim/neovim/pull/2247) - [Shared data (shada)](https://github.com/neovim/neovim/pull/2506) among multiple editor instances - [XDG base directories](https://github.com/neovim/neovim/pull/3470) support - Compatible with most Vim plugins, including Ruby and Python plugins. See [`:help nvim-features`][nvim-features] for the full list! License ------- Neovim is licensed under the terms of the Apache 2.0 license, except for parts that were contributed under the Vim license. - Contributions committed before [b17d96][license-commit] remain under the Vim license. - Contributions committed after [b17d96][license-commit] are licensed under Apache 2.0 unless those contributions were copied from Vim (identified in the commit logs by the `vim-patch` token). See `LICENSE` for details. Vim is Charityware. You can use and copy it as much as you like, but you are encouraged to make a donation for needy children in Uganda. Please see the kcc section of the vim docs or visit the ICCF web site, available at these URLs: http://iccf-holland.org/ http://www.vim.org/iccf/ http://www.iccf.nl/ You can also sponsor the development of Vim. Vim sponsors can vote for features. The money goes to Uganda anyway. [license-commit]: https://github.com/neovim/neovim/commit/b17d9691a24099c9210289f16afb1a498a89d803 [nvim-features]: https://neovim.io/doc/user/vim_diff.html#nvim-features [Roadmap]: https://neovim.io/roadmap/ [advanced UIs]: https://github.com/neovim/neovim/wiki/Related-projects#gui [Homebrew]: https://github.com/neovim/homebrew-neovim#installation [Debian]: https://packages.debian.org/testing/neovim [Ubuntu]: http://packages.ubuntu.com/search?keywords=neovim [Fedora]: https://admin.fedoraproject.org/pkgdb/package/rpms/neovim [Arch Linux]: https://www.archlinux.org/packages/?q=neovim [Gentoo]: https://packages.gentoo.org/packages/app-editors/neovim neovim-0.2.2/appveyor.yml000066400000000000000000000006101320401574200153730ustar00rootroot00000000000000version: '{build}' environment: APPVEYOR_CACHE_ENTRY_ZIP_ARGS: "-t7z -m0=lzma -mx=9" configuration: - MINGW_64 - MINGW_32 - MINGW_64-gcov matrix: allow_failures: - configuration: MINGW_64-gcov install: [] build_script: - call ci\build.bat cache: - C:\msys64\var\cache\pacman\pkg -> ci\build.bat - .deps -> third-party\** artifacts: - path: build/Neovim.zip - path: build/bin/nvim.exe neovim-0.2.2/busted/000077500000000000000000000000001320401574200142745ustar00rootroot00000000000000neovim-0.2.2/busted/outputHandlers/000077500000000000000000000000001320401574200173155ustar00rootroot00000000000000neovim-0.2.2/busted/outputHandlers/TAP.lua000066400000000000000000000053261320401574200204520ustar00rootroot00000000000000-- TODO(jkeyes): remove this and use the upstream version as soon as it is -- available in a release of busted. local pretty = require 'pl.pretty' return function(options) local busted = require 'busted' local handler = require 'busted.outputHandlers.base'() local success = 'ok %u - %s' local failure = 'not ' .. success local skip = 'ok %u - # SKIP %s' local counter = 0 handler.suiteReset = function() counter = 0 return nil, true end handler.suiteEnd = function() print('1..' .. counter) io.flush() return nil, true end local function showFailure(t) local message = t.message local trace = t.trace or {} if message == nil then message = 'Nil error' elseif type(message) ~= 'string' then message = pretty.write(message) end print(failure:format(counter, t.name)) print('# ' .. t.element.trace.short_src .. ' @ ' .. t.element.trace.currentline) if t.randomseed then print('# Random seed: ' .. t.randomseed) end print('# Failure message: ' .. message:gsub('\n', '\n# ')) if options.verbose and trace.traceback then print('# ' .. trace.traceback:gsub('^\n', '', 1):gsub('\n', '\n# ')) end end handler.testStart = function(element, parent) local trace = element.trace if options.verbose and trace and trace.short_src then local fileline = trace.short_src .. ' @ ' .. trace.currentline .. ': ' local testName = fileline .. handler.getFullName(element) print('# ' .. testName) end io.flush() return nil, true end handler.testEnd = function(element, parent, status, trace) counter = counter + 1 if status == 'success' then local t = handler.successes[#handler.successes] print(success:format(counter, t.name)) elseif status == 'pending' then local t = handler.pendings[#handler.pendings] print(skip:format(counter, (t.message or t.name))) elseif status == 'failure' then showFailure(handler.failures[#handler.failures]) elseif status == 'error' then showFailure(handler.errors[#handler.errors]) end io.flush() return nil, true end handler.error = function(element, parent, message, debug) if element.descriptor ~= 'it' then counter = counter + 1 showFailure(handler.errors[#handler.errors]) end io.flush() return nil, true end busted.subscribe({ 'suite', 'reset' }, handler.suiteReset) busted.subscribe({ 'suite', 'end' }, handler.suiteEnd) busted.subscribe({ 'test', 'start' }, handler.testStart, { predicate = handler.cancelOnPending }) busted.subscribe({ 'test', 'end' }, handler.testEnd, { predicate = handler.cancelOnPending }) busted.subscribe({ 'error' }, handler.error) return handler end neovim-0.2.2/busted/outputHandlers/nvim.lua000066400000000000000000000231141320401574200207720ustar00rootroot00000000000000local s = require 'say' local pretty = require 'pl.pretty' local term = require 'term' local colors local isWindows = package.config:sub(1,1) == '\\' if isWindows then colors = setmetatable({}, {__index = function() return function(s) return s end end}) else colors = require 'term.colors' end return function(options) local busted = require 'busted' local handler = require 'busted.outputHandlers.base'() local c = { succ = function(s) return colors.bright(colors.green(s)) end, skip = function(s) return colors.bright(colors.yellow(s)) end, fail = function(s) return colors.bright(colors.magenta(s)) end, errr = function(s) return colors.bright(colors.red(s)) end, test = tostring, file = colors.cyan, time = colors.dim, note = colors.yellow, sect = function(s) return colors.green(colors.dim(s)) end, nmbr = colors.bright, } local repeatSuiteString = '\nRepeating all tests (run %d of %d) . . .\n\n' local randomizeString = c.note('Note: Randomizing test order with a seed of %d.\n') local globalSetup = c.sect('[----------]') .. ' Global test environment setup.\n' local fileStartString = c.sect('[----------]') .. ' Running tests from ' .. c.file('%s') .. '\n' local runString = c.sect('[ RUN ]') .. ' ' .. c.test('%s') .. ': ' local successString = c.succ('OK') .. '\n' local skippedString = c.skip('SKIP') .. '\n' local failureString = c.fail('FAIL') .. '\n' local errorString = c.errr('ERR') .. '\n' local fileEndString = c.sect('[----------]') .. ' '.. c.nmbr('%d') .. ' %s from ' .. c.file('%s') .. ' ' .. c.time('(%.2f ms total)') .. '\n\n' local globalTeardown = c.sect('[----------]') .. ' Global test environment teardown.\n' local suiteEndString = c.sect('[==========]') .. ' ' .. c.nmbr('%d') .. ' %s from ' .. c.nmbr('%d') .. ' test %s ran. ' .. c.time('(%.2f ms total)') .. '\n' local successStatus = c.succ('[ PASSED ]') .. ' ' .. c.nmbr('%d') .. ' %s.\n' local timeString = c.time('%.2f ms') local summaryStrings = { skipped = { header = c.skip('[ SKIPPED ]') .. ' ' .. c.nmbr('%d') .. ' %s, listed below:\n', test = c.skip('[ SKIPPED ]') .. ' %s\n', footer = ' ' .. c.nmbr('%d') .. ' SKIPPED %s\n', }, failure = { header = c.fail('[ FAILED ]') .. ' ' .. c.nmbr('%d') .. ' %s, listed below:\n', test = c.fail('[ FAILED ]') .. ' %s\n', footer = ' ' .. c.nmbr('%d') .. ' FAILED %s\n', }, error = { header = c.errr('[ ERROR ]') .. ' ' .. c.nmbr('%d') .. ' %s, listed below:\n', test = c.errr('[ ERROR ]') .. ' %s\n', footer = ' ' .. c.nmbr('%d') .. ' %s\n', }, } c = nil local fileCount = 0 local fileTestCount = 0 local testCount = 0 local successCount = 0 local skippedCount = 0 local failureCount = 0 local errorCount = 0 local pendingDescription = function(pending) local name = pending.name local string = '' if type(pending.message) == 'string' then string = string .. pending.message .. '\n' elseif pending.message ~= nil then string = string .. pretty.write(pending.message) .. '\n' end return string end local failureDescription = function(failure) local string = failure.randomseed and ('Random seed: ' .. failure.randomseed .. '\n') or '' if type(failure.message) == 'string' then string = string .. failure.message elseif failure.message == nil then string = string .. 'Nil error' else string = string .. pretty.write(failure.message) end string = string .. '\n' if options.verbose and failure.trace and failure.trace.traceback then string = string .. failure.trace.traceback .. '\n' end return string end local getFileLine = function(element) local fileline = '' if element.trace or element.trace.short_src then fileline = colors.cyan(element.trace.short_src) .. ' @ ' .. colors.cyan(element.trace.currentline) .. ': ' end return fileline end local getTestList = function(status, count, list, getDescription) local string = '' local header = summaryStrings[status].header if count > 0 and header then local tests = (count == 1 and 'test' or 'tests') local errors = (count == 1 and 'error' or 'errors') string = header:format(count, status == 'error' and errors or tests) local testString = summaryStrings[status].test if testString then for _, t in ipairs(list) do local fullname = getFileLine(t.element) .. colors.bright(t.name) string = string .. testString:format(fullname) string = string .. getDescription(t) end end end return string end local getSummary = function(status, count) local string = '' local footer = summaryStrings[status].footer if count > 0 and footer then local tests = (count == 1 and 'TEST' or 'TESTS') local errors = (count == 1 and 'ERROR' or 'ERRORS') string = footer:format(count, status == 'error' and errors or tests) end return string end local getSummaryString = function() local tests = (successCount == 1 and 'test' or 'tests') local string = successStatus:format(successCount, tests) string = string .. getTestList('skipped', skippedCount, handler.pendings, pendingDescription) string = string .. getTestList('failure', failureCount, handler.failures, failureDescription) string = string .. getTestList('error', errorCount, handler.errors, failureDescription) string = string .. ((skippedCount + failureCount + errorCount) > 0 and '\n' or '') string = string .. getSummary('skipped', skippedCount) string = string .. getSummary('failure', failureCount) string = string .. getSummary('error', errorCount) return string end handler.suiteReset = function() fileCount = 0 fileTestCount = 0 testCount = 0 successCount = 0 skippedCount = 0 failureCount = 0 errorCount = 0 return nil, true end handler.suiteStart = function(suite, count, total, randomseed) if total > 1 then io.write(repeatSuiteString:format(count, total)) end if randomseed then io.write(randomizeString:format(randomseed)) end io.write(globalSetup) io.flush() return nil, true end local function getElapsedTime(tbl) if tbl.duration then return tbl.duration * 1000 else return tonumber('nan') end end handler.suiteEnd = function(suite, count, total) local elapsedTime_ms = getElapsedTime(suite) local tests = (testCount == 1 and 'test' or 'tests') local files = (fileCount == 1 and 'file' or 'files') io.write(globalTeardown) io.write(suiteEndString:format(testCount, tests, fileCount, files, elapsedTime_ms)) io.write(getSummaryString()) io.flush() return nil, true end handler.fileStart = function(file) fileTestCount = 0 io.write(fileStartString:format(file.name)) io.flush() return nil, true end handler.fileEnd = function(file) local elapsedTime_ms = getElapsedTime(file) local tests = (fileTestCount == 1 and 'test' or 'tests') fileCount = fileCount + 1 io.write(fileEndString:format(fileTestCount, tests, file.name, elapsedTime_ms)) io.flush() return nil, true end handler.testStart = function(element, parent) io.write(runString:format(handler.getFullName(element))) io.flush() return nil, true end handler.testEnd = function(element, parent, status, debug) local elapsedTime_ms = getElapsedTime(element) local string fileTestCount = fileTestCount + 1 testCount = testCount + 1 if status == 'success' then successCount = successCount + 1 string = successString elseif status == 'pending' then skippedCount = skippedCount + 1 string = skippedString elseif status == 'failure' then failureCount = failureCount + 1 string = nil elseif status == 'error' then errorCount = errorCount + 1 string = nil end if string ~= nil then if elapsedTime_ms == elapsedTime_ms then string = timeString:format(elapsedTime_ms) .. ' ' .. string end io.write(string) io.flush() end return nil, true end handler.testFailure = function(element, parent, message, debug) io.write(failureString) io.flush() io.write(failureDescription(handler.failures[#handler.failures])) io.flush() return nil, true end handler.testError = function(element, parent, message, debug) io.write(errorString) io.flush() io.write(failureDescription(handler.errors[#handler.errors])) io.flush() return nil, true end handler.error = function(element, parent, message, debug) if element.descriptor ~= 'it' then io.write(failureDescription(handler.errors[#handler.errors])) io.flush() errorCount = errorCount + 1 end return nil, true end busted.subscribe({ 'suite', 'reset' }, handler.suiteReset) busted.subscribe({ 'suite', 'start' }, handler.suiteStart) busted.subscribe({ 'suite', 'end' }, handler.suiteEnd) busted.subscribe({ 'file', 'start' }, handler.fileStart) busted.subscribe({ 'file', 'end' }, handler.fileEnd) busted.subscribe({ 'test', 'start' }, handler.testStart, { predicate = handler.cancelOnPending }) busted.subscribe({ 'test', 'end' }, handler.testEnd, { predicate = handler.cancelOnPending }) busted.subscribe({ 'failure', 'it' }, handler.testFailure) busted.subscribe({ 'error', 'it' }, handler.testError) busted.subscribe({ 'failure' }, handler.error) busted.subscribe({ 'error' }, handler.error) return handler end neovim-0.2.2/ci/000077500000000000000000000000001320401574200134015ustar00rootroot00000000000000neovim-0.2.2/ci/after_success.sh000077500000000000000000000003701320401574200165710ustar00rootroot00000000000000#!/usr/bin/env bash set -e set -o pipefail if [[ -n "${GCOV}" ]]; then coveralls --gcov "$(which "${GCOV}")" --encoding iso-8859-1 || echo 'coveralls upload failed.' bash <(curl -s https://codecov.io/bash) || echo 'codecov upload failed.' fi neovim-0.2.2/ci/before_cache.sh000077500000000000000000000010611320401574200163230ustar00rootroot00000000000000#!/usr/bin/env bash set -e set -o pipefail CI_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" source "${CI_DIR}/common/suite.sh" # Don't cache pip's log and selfcheck. rm -rf "${HOME}/.cache/pip/log" rm -f "${HOME}/.cache/pip/selfcheck.json" # Update the third-party dependency cache only if the build was successful. if ended_successfully; then rm -rf "${HOME}/.cache/nvim-deps" mv "${DEPS_BUILD_DIR}" "${HOME}/.cache/nvim-deps" touch "${CACHE_MARKER}" echo "Updated third-party dependencies (timestamp: $(stat -c '%y' "${CACHE_MARKER}"))." fi neovim-0.2.2/ci/before_install.sh000077500000000000000000000015341320401574200167330ustar00rootroot00000000000000#!/usr/bin/env bash set -e set -o pipefail if [[ "${CI_TARGET}" == lint ]]; then exit fi if [[ "${TRAVIS_OS_NAME}" == osx ]]; then brew update fi echo 'python info:' ( 2>&1 python --version || true 2>&1 python2 --version || true 2>&1 python3 --version || true 2>&1 pip --version || true 2>&1 pip2 --version || true 2>&1 pip3 --version || true echo 'pyenv versions:' 2>&1 pyenv versions || true ) | sed 's/^/ /' echo "Upgrade Python 2 pip." pip2.7 -q install --user --upgrade pip if [[ "${TRAVIS_OS_NAME}" == osx ]]; then echo "Install Python 3." brew install python3 echo "Upgrade Python 3 pip." pip3 -q install --user --upgrade pip else echo "Upgrade Python 3 pip." # Allow failure. pyenv pip3 on travis is broken: # https://github.com/travis-ci/travis-ci/issues/8363 pip3 -q install --user --upgrade pip || true fi neovim-0.2.2/ci/before_script.sh000077500000000000000000000015151320401574200165700ustar00rootroot00000000000000#!/usr/bin/env bash set -e set -o pipefail if [[ "${CI_TARGET}" == lint ]]; then exit fi CI_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" source "${CI_DIR}/common/build.sh" # Test some of the configuration variables. if [[ -n "${GCOV}" ]] && [[ ! $(type -P "${GCOV}") ]]; then echo "\$GCOV: '${GCOV}' is not executable." exit 1 fi if [[ -n "${LLVM_SYMBOLIZER}" ]] && [[ ! $(type -P "${LLVM_SYMBOLIZER}") ]]; then echo "\$LLVM_SYMBOLIZER: '${LLVM_SYMBOLIZER}' is not executable." exit 1 fi if [[ "${TRAVIS_OS_NAME}" == osx ]]; then # Adds user to a dummy group. # That allows to test changing the group of the file by `os_fchown`. sudo dscl . -create /Groups/chown_test sudo dscl . -append /Groups/chown_test GroupMembership "${USER}" fi # Compile dependencies. build_deps rm -rf "${LOG_DIR}" mkdir -p "${LOG_DIR}" neovim-0.2.2/ci/build.bat000066400000000000000000000042161320401574200151730ustar00rootroot00000000000000:: These are native MinGW builds, but they use the toolchain inside :: MSYS2, this allows using all the dependencies and tools available :: in MSYS2, but we cannot build inside the MSYS2 shell. echo on if "%CONFIGURATION%" == "MINGW_32" ( set ARCH=i686 set BITS=32 ) else ( set ARCH=x86_64 set BITS=64 ) if "%CONFIGURATION%" == "MINGW_64-gcov" ( set USE_GCOV="-DUSE_GCOV=ON" ) :: We cannot have sh.exe in the PATH (MinGW) set PATH=%PATH:C:\Program Files\Git\usr\bin;=% set PATH=C:\msys64\mingw%BITS%\bin;C:\Windows\System32;C:\Windows;%PATH% :: The default cpack in the PATH is not CMake set PATH=C:\Program Files (x86)\CMake\bin\cpack.exe;%PATH% :: Build third-party dependencies C:\msys64\usr\bin\bash -lc "pacman --verbose --noconfirm -Su" || goto :error C:\msys64\usr\bin\bash -lc "pacman --verbose --noconfirm --needed -S mingw-w64-%ARCH%-cmake mingw-w64-%ARCH%-perl mingw-w64-%ARCH%-diffutils mingw-w64-%ARCH%-unibilium gperf" || goto :error :: Setup python (use AppVeyor system python) C:\Python27\python.exe -m pip install neovim || goto :error C:\Python35\python.exe -m pip install neovim || goto :error :: Disambiguate python3 move c:\Python35\python.exe c:\Python35\python3.exe set PATH=C:\Python35;C:\Python27;%PATH% :: Sanity check python -c "import neovim; print(str(neovim))" || goto :error python3 -c "import neovim; print(str(neovim))" || goto :error mkdir .deps cd .deps cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo ..\third-party\ || goto :error mingw32-make VERBOSE=1 || goto :error cd .. :: Build Neovim mkdir build cd build cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUSTED_OUTPUT_TYPE=nvim %USE_GCOV% -DGPERF_PRG="C:\msys64\usr\bin\gperf.exe" .. || goto :error mingw32-make VERBOSE=1 || goto :error bin\nvim --version || goto :error :: Functional tests mingw32-make functionaltest VERBOSE=1 || goto :error if defined USE_GCOV ( C:\msys64\usr\bin\bash -lc "cd /c/projects/neovim; bash <(curl -s https://codecov.io/bash) || echo 'codecov upload failed.'" ) :: Build artifacts cpack -G ZIP -C RelWithDebInfo if defined APPVEYOR_REPO_TAG_NAME cpack -G NSIS -C RelWithDebInfo goto :EOF :error exit /b %errorlevel% neovim-0.2.2/ci/common/000077500000000000000000000000001320401574200146715ustar00rootroot00000000000000neovim-0.2.2/ci/common/build.sh000066400000000000000000000042371320401574200163320ustar00rootroot00000000000000top_make() { ${MAKE_CMD} "$@" } build_make() { top_make -C "${BUILD_DIR}" "$@" } build_deps() { if test "${BUILD_32BIT}" = ON ; then DEPS_CMAKE_FLAGS="${DEPS_CMAKE_FLAGS} ${CMAKE_FLAGS_32BIT}" fi if test "${FUNCTIONALTEST}" = "functionaltest-lua" \ || test "${CLANG_SANITIZER}" = "ASAN_UBSAN" ; then DEPS_CMAKE_FLAGS="${DEPS_CMAKE_FLAGS} -DUSE_BUNDLED_LUA=ON" fi rm -rf "${DEPS_BUILD_DIR}" # If there is a valid cache and we're not forced to recompile, # use cached third-party dependencies. if test -f "${CACHE_MARKER}" && test "${BUILD_NVIM_DEPS}" != "true" ; then local statcmd="stat -c '%y'" if test "${TRAVIS_OS_NAME}" = osx ; then statcmd="stat -f '%Sm'" fi echo "Using third-party dependencies from Travis's cache (last updated: $(${statcmd} "${CACHE_MARKER}"))." mkdir -p "$(dirname "${DEPS_BUILD_DIR}")" mv "${HOME}/.cache/nvim-deps" "${DEPS_BUILD_DIR}" else mkdir -p "${DEPS_BUILD_DIR}" fi # Even if we're using cached dependencies, run CMake and make to # update CMake configuration and update to newer deps versions. cd "${DEPS_BUILD_DIR}" echo "Configuring with '${DEPS_CMAKE_FLAGS}'." CC= cmake ${DEPS_CMAKE_FLAGS} "${TRAVIS_BUILD_DIR}/third-party/" if ! top_make; then exit 1 fi cd "${TRAVIS_BUILD_DIR}" } prepare_build() { if test -n "${CLANG_SANITIZER}" ; then CMAKE_FLAGS="${CMAKE_FLAGS} -DCLANG_${CLANG_SANITIZER}=ON" fi if test "${BUILD_32BIT}" = ON ; then CMAKE_FLAGS="${CMAKE_FLAGS} ${CMAKE_FLAGS_32BIT}" fi mkdir -p "${BUILD_DIR}" cd "${BUILD_DIR}" echo "Configuring with '${CMAKE_FLAGS} $@'." cmake ${CMAKE_FLAGS} "$@" "${TRAVIS_BUILD_DIR}" } build_nvim() { echo "Building nvim." if ! top_make nvim ; then exit 1 fi if test "$CLANG_SANITIZER" != "TSAN" ; then echo "Building libnvim." if ! top_make libnvim ; then exit 1 fi echo "Building nvim-test." if ! top_make nvim-test ; then exit 1 fi fi # Invoke nvim to trigger *San early. if ! (bin/nvim --version && bin/nvim -u NONE -e -c ':qall') ; then asan_check "${LOG_DIR}" exit 1 fi asan_check "${LOG_DIR}" cd "${TRAVIS_BUILD_DIR}" } neovim-0.2.2/ci/common/suite.sh000066400000000000000000000114361320401574200163630ustar00rootroot00000000000000# HACK: get newline for use in strings given that "\n" and $'' do not work. NL="$(printf '\nE')" NL="${NL%E}" FAIL_SUMMARY="" # Test success marker. If END_MARKER file exists, we know that all tests # finished. If FAIL_SUMMARY_FILE exists we know that some tests failed, this # file will contain information about failed tests. Build is considered # successful if tests ended without any of them failing. END_MARKER="$BUILD_DIR/.tests_finished" FAIL_SUMMARY_FILE="$BUILD_DIR/.test_errors" ANSI_CLEAR="\033[0K" travis_fold() { local action="$1" local name="$2" name="$(echo -n "$name" | tr '\n\0' '--' | sed 's/[^A-Za-z0-9]\{1,\}/-/g')" name="$(echo -n "$name" | sed 's/-$//')" echo -en "travis_fold:${action}:${name}\r${ANSI_CLEAR}" } if test "$TRAVIS" != "true" ; then travis_fold() { return 0 } fi enter_suite() { set +x FAILED=0 rm -f "${END_MARKER}" local suite_name="$1" export NVIM_TEST_CURRENT_SUITE="${NVIM_TEST_CURRENT_SUITE}/$suite_name" travis_fold start "${NVIM_TEST_CURRENT_SUITE}" set -x } exit_suite() { set +x if test -f "$NVIM_LOG_FILE" ; then printf "===============================================================================\n" printf "NVIM_LOG_FILE: $NVIM_LOG_FILE\n" cat "$NVIM_LOG_FILE" 2>/dev/null || printf '(empty)' printf "\n" rm -rf "$NVIM_LOG_FILE" fi travis_fold end "${NVIM_TEST_CURRENT_SUITE}" if test $FAILED -ne 0 ; then echo "Suite ${NVIM_TEST_CURRENT_SUITE} failed, summary:" echo "${FAIL_SUMMARY}" fi export NVIM_TEST_CURRENT_SUITE="${NVIM_TEST_CURRENT_SUITE%/*}" if test "$1" != "--continue" ; then exit $FAILED else local saved_failed=$FAILED FAILED=0 return $saved_failed fi } fail() { local test_name="$1" local fail_char="$2" local message="$3" : ${fail_char:=F} : ${message:=Test $test_name failed} local full_msg="$fail_char $NVIM_TEST_CURRENT_SUITE|$test_name :: $message" FAIL_SUMMARY="${FAIL_SUMMARY}${NL}${full_msg}" echo "${full_msg}" >> "${FAIL_SUMMARY_FILE}" echo "Failed: $full_msg" FAILED=1 } run_test() { local cmd="$1" test $# -gt 0 && shift local test_name="$1" : ${test_name:=$cmd} test $# -gt 0 && shift if ! eval "$cmd" ; then fail "${test_name}" "$@" fi } run_test_wd() { local hang_ok= if test "$1" = "--allow-hang" ; then hang_ok=1 shift fi local timeout="$1" test $# -gt 0 && shift local cmd="$1" test $# -gt 0 && shift local restart_cmd="$1" : ${restart_cmd:=true} test $# -gt 0 && shift local test_name="$1" : ${test_name:=$cmd} test $# -gt 0 && shift local output_file="$(mktemp)" local status_file="$(mktemp)" local sid_file="$(mktemp)" local restarts=5 local prev_tmpsize=-1 while test $restarts -gt 0 ; do : > "$status_file" : > "$sid_file" setsid \ env \ output_file="$output_file" \ status_file="$status_file" \ sid_file="$sid_file" \ cmd="$cmd" \ CI_DIR="$CI_DIR" \ sh -c ' . "${CI_DIR}/common/test.sh" ps -o sid= > "$sid_file" ( ret=0 if ! eval "$cmd" 2>&1 ; then ret=1 fi echo "$ret" > "$status_file" ) | tee -a "$output_file" ' while test "$(stat -c "%s" "$status_file")" -eq 0 ; do prev_tmpsize=$tmpsize sleep $timeout tmpsize="$(stat -c "%s" "$output_file")" if test $tempsize -eq $prev_temsize ; then # no output, assuming either hang or exit break fi done restarts=$(( restarts - 1 )) if test "$(stat -c "%s" "$status_file")" -eq 0 ; then # Status file not updated, assuming hang # SID not known, this should not ever happen if test "$(stat -c "%s" "$sid_file")" -eq 0 ; then fail "$test_name" E "Shell did not run" break fi # Kill all processes which belong to one session: should get rid of test # processes as well as sh itself. pkill -KILL -s$(cat "$sid_file") if test $restarts -eq 0 ; then if test -z "$hang_ok" ; then fail "$test_name" E "Test hang up" fi else echo "Test ${test_name} hang up, restarting" eval "$restart_cmd" fi else local new_failed="$(cat "$status_file")" if test "$new_failed" != "0" ; then fail "$test_name" F "Test failed in run_test_wd" fi break fi done rm -f "$output_file" rm -f "$status_file" rm -f "$sid_file" } ended_successfully() { if test -f "${FAIL_SUMMARY_FILE}" ; then echo 'Test failed, complete summary:' cat "${FAIL_SUMMARY_FILE}" return 1 fi if ! test -f "${END_MARKER}" ; then echo 'ended_successfully called before end marker was touched' return 1 fi return 0 } end_tests() { touch "${END_MARKER}" ended_successfully } neovim-0.2.2/ci/common/test.sh000066400000000000000000000104571320401574200162130ustar00rootroot00000000000000. "${CI_DIR}/common/build.sh" . "${CI_DIR}/common/suite.sh" print_core() { local app="$1" local core="$2" if test "$app" = quiet ; then echo "Found core $core" return 0 fi echo "======= Core file $core =======" if test "${TRAVIS_OS_NAME}" = osx ; then lldb -Q -o "bt all" -f "${app}" -c "${core}" else gdb -n -batch -ex 'thread apply all bt full' "${app}" -c "${core}" fi } check_core_dumps() { local del= if test "$1" = "--delete" ; then del=1 shift fi local app="${1:-${BUILD_DIR}/bin/nvim}" if test "${TRAVIS_OS_NAME}" = osx ; then local cores="$(find /cores/ -type f -print)" else local cores="$(find ./ -type f -name 'core.*' -print)" fi if test -z "${cores}" ; then return fi local core for core in $cores; do if test "$del" = "1" ; then print_core "$app" "$core" >&2 rm "$core" else print_core "$app" "$core" fi done if test "$app" != quiet ; then fail 'cores' E 'Core dumps found' fi } check_logs() { # Iterate through each log to remove an useless warning. for log in $(find "${1}" -type f -name "${2}"); do sed -i "${log}" \ -e '/Warning: noted but unhandled ioctl/d' \ -e '/could cause spurious value errors to appear/d' \ -e '/See README_MISSING_SYSCALL_OR_IOCTL for guidance/d' done # Now do it again, but only consider files with size > 0. local err="" for log in $(find "${1}" -type f -name "${2}" -size +0); do cat "${log}" err=1 done if test -n "${err}" ; then fail 'logs' E 'Runtime errors detected.' fi } valgrind_check() { check_logs "${1}" "valgrind-*" } asan_check() { check_logs "${1}" "*san.*" } run_unittests() {( enter_suite unittests ulimit -c unlimited || true if ! build_make unittest ; then fail 'unittests' F 'Unit tests failed' fi check_core_dumps "$(which luajit)" exit_suite )} run_functionaltests() {( enter_suite functionaltests ulimit -c unlimited || true if ! build_make ${FUNCTIONALTEST}; then fail 'functionaltests' F 'Functional tests failed' fi asan_check "${LOG_DIR}" valgrind_check "${LOG_DIR}" check_core_dumps exit_suite )} run_oldtests() {( enter_suite oldtests ulimit -c unlimited || true if ! make -C "${TRAVIS_BUILD_DIR}/src/nvim/testdir"; then reset fail 'oldtests' F 'Legacy tests failed' fi asan_check "${LOG_DIR}" valgrind_check "${LOG_DIR}" check_core_dumps exit_suite )} check_runtime_files() {( set +x local test_name="$1" ; shift local message="$1" ; shift local tst="$1" ; shift cd runtime for file in $(git ls-files "$@") ; do # Check that test is not trying to work with files with spaces/etc # Prefer failing the build over using more robust construct because files # with IFS are not welcome. if ! test -e "$file" ; then fail "$test_name" E \ "It appears that $file is only a part of the file name" fi if ! test "$tst" "$INSTALL_PREFIX/share/nvim/runtime/$file" ; then fail "$test_name" F "$(printf "$message" "$file")" fi done )} install_nvim() {( enter_suite 'install_nvim' if ! build_make install ; then fail 'install' E 'make install failed' exit_suite fi "${INSTALL_PREFIX}/bin/nvim" --version if ! "${INSTALL_PREFIX}/bin/nvim" -u NONE -e -c ':help' -c ':qall' ; then echo "Running ':help' in the installed nvim failed." echo "Maybe the helptags have not been generated properly." fail 'help' F 'Failed running :help' fi # Check that all runtime files were installed check_runtime_files \ 'runtime-install' \ 'It appears that %s is not installed.' \ -e \ '*.vim' '*.ps' '*.dict' '*.py' '*.tutor' # Check that some runtime files are installed and are executables check_runtime_files \ 'not-exe' \ 'It appears that %s is not installed or is not executable.' \ -x \ '*.awk' '*.sh' '*.bat' # Check that generated syntax file has function names, #5060. local genvimsynf=syntax/vim/generated.vim local gpat='syn keyword vimFuncName .*eval' if ! grep -q "$gpat" "${INSTALL_PREFIX}/share/nvim/runtime/$genvimsynf" ; then fail 'funcnames' F "It appears that $genvimsynf does not contain $gpat." fi exit_suite )} csi_clean() { find "${BUILD_DIR}/bin" -name 'test-includes-*' -delete find "${BUILD_DIR}" -name '*test-include*.o' -delete } neovim-0.2.2/ci/install.sh000077500000000000000000000012431320401574200154060ustar00rootroot00000000000000#!/usr/bin/env bash set -e set -o pipefail if [[ "${CI_TARGET}" == lint ]]; then exit fi if [[ "${TRAVIS_OS_NAME}" == osx ]]; then brew install gettext brew reinstall -s libtool fi # Use default CC to avoid compilation problems when installing Python modules. echo "Install neovim module and coveralls for Python 2." CC=cc pip2.7 -q install --user --upgrade neovim cpp-coveralls echo "Install neovim module for Python 3." # Allow failure. pyenv pip3 on travis is broken: # https://github.com/travis-ci/travis-ci/issues/8363 CC=cc pip3 -q install --user --upgrade neovim || true echo "Install neovim RubyGem." gem install --no-document --version ">= 0.2.0" neovim neovim-0.2.2/ci/run_lint.sh000077500000000000000000000011451320401574200155730ustar00rootroot00000000000000#!/usr/bin/env bash set -e set -o pipefail CI_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" source "${CI_DIR}/common/build.sh" source "${CI_DIR}/common/suite.sh" enter_suite 'clint' run_test 'top_make clint-full' clint exit_suite --continue enter_suite 'testlint' run_test 'top_make testlint' testlint exit_suite --continue enter_suite 'lualint' run_test 'top_make lualint' lualint exit_suite --continue enter_suite single-includes CLICOLOR_FORCE=1 run_test_wd \ --allow-hang \ 10s \ 'top_make check-single-includes' \ 'csi_clean' \ single-includes exit_suite --continue end_tests neovim-0.2.2/ci/run_tests.sh000077500000000000000000000011651320401574200157710ustar00rootroot00000000000000#!/usr/bin/env bash set -e set -o pipefail CI_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" source "${CI_DIR}/common/build.sh" source "${CI_DIR}/common/test.sh" source "${CI_DIR}/common/suite.sh" enter_suite build check_core_dumps --delete quiet prepare_build build_nvim exit_suite --continue enter_suite tests if test "$CLANG_SANITIZER" != "TSAN" ; then # Additional threads are only created when the builtin UI starts, which # doesn't happen in the unit/functional tests run_test run_unittests run_test run_functionaltests fi run_test run_oldtests run_test install_nvim exit_suite --continue end_tests neovim-0.2.2/ci/script.sh000077500000000000000000000005621320401574200152470ustar00rootroot00000000000000#!/usr/bin/env bash set -e set -o pipefail # This will pass the environment variables down to a bash process which runs # as $USER, while retaining the environment variables defined and belonging # to secondary groups given above in usermod. if [[ "${TRAVIS_OS_NAME}" == osx ]]; then sudo -E su "${USER}" -c "ci/run_${CI_TARGET}.sh" else ci/run_${CI_TARGET}.sh fi neovim-0.2.2/cmake/000077500000000000000000000000001320401574200140665ustar00rootroot00000000000000neovim-0.2.2/cmake/ConvertPo.cmake000066400000000000000000000013111320401574200170030ustar00rootroot00000000000000string(TOUPPER ${INPUT_ENC} upperInputEnc) string(TOLOWER ${INPUT_ENC} lowerInputEnc) get_filename_component(inputName ${INPUT_FILE} NAME) execute_process( COMMAND ${ICONV_PRG} -f ${INPUT_ENC} -t ${OUTPUT_ENC} ${INPUT_FILE} OUTPUT_VARIABLE trans ERROR_VARIABLE err RESULT_VARIABLE res) if(NOT res EQUAL 0) message(FATAL_ERROR "iconv failed to run correctly: ${err}") endif() string(REPLACE "charset=${lowerInputEnc}" "charset=${OUTPUT_CHARSET}" trans "${trans}") string(REPLACE "charset=${upperInputEnc}" "charset=${OUTPUT_CHARSET}" trans "${trans}") string(REPLACE "# Original translations" "# Generated from ${inputName}, DO NOT EDIT" trans "${trans}") file(WRITE ${OUTPUT_FILE} "${trans}") neovim-0.2.2/cmake/Download.cmake000066400000000000000000000005571320401574200166460ustar00rootroot00000000000000file( DOWNLOAD "${URL}" "${FILE}" STATUS status LOG log ) list(GET status 0 status_code) list(GET status 1 status_string) if(NOT status_code EQUAL 0) if(NOT ALLOW_FAILURE) message(FATAL_ERROR "error: downloading '${URL}' failed status_code: ${status_code} status_string: ${status_string} log: ${log} ") endif() endif() neovim-0.2.2/cmake/FindIconv.cmake000066400000000000000000000006721320401574200167540ustar00rootroot00000000000000# - Try to find iconv # Once done, this will define # # Iconv_FOUND - system has iconv # Iconv_INCLUDE_DIRS - the iconv include directories # Iconv_LIBRARIES - link these to use iconv include(LibFindMacros) find_path(ICONV_INCLUDE_DIR NAMES iconv.h) find_library(ICONV_LIBRARY NAMES iconv) set(Iconv_PROCESS_INCLUDES ICONV_INCLUDE_DIR) if(ICONV_LIBRARY) set(Iconv_PROCESS_LIBS ICONV_LIBRARY) endif() libfind_process(Iconv) neovim-0.2.2/cmake/FindJeMalloc.cmake000066400000000000000000000032131320401574200173560ustar00rootroot00000000000000# - Try to find jemalloc # Once done this will define # JEMALLOC_FOUND - System has jemalloc # JEMALLOC_INCLUDE_DIRS - The jemalloc include directories # JEMALLOC_LIBRARIES - The libraries needed to use jemalloc if(NOT USE_BUNDLED_JEMALLOC) find_package(PkgConfig) if (PKG_CONFIG_FOUND) pkg_check_modules(PC_JEMALLOC QUIET jemalloc) endif() else() set(PC_JEMALLOC_INCLUDEDIR) set(PC_JEMALLOC_INCLUDE_DIRS) set(PC_JEMALLOC_LIBDIR) set(PC_JEMALLOC_LIBRARY_DIRS) set(LIMIT_SEARCH NO_DEFAULT_PATH) endif() set(JEMALLOC_DEFINITIONS ${PC_JEMALLOC_CFLAGS_OTHER}) find_path(JEMALLOC_INCLUDE_DIR jemalloc/jemalloc.h PATHS ${PC_JEMALLOC_INCLUDEDIR} ${PC_JEMALLOC_INCLUDE_DIRS} ${LIMIT_SEARCH}) # If we're asked to use static linkage, add libjemalloc.a as a preferred library name. if(JEMALLOC_USE_STATIC) list(APPEND JEMALLOC_NAMES "${CMAKE_STATIC_LIBRARY_PREFIX}jemalloc${CMAKE_STATIC_LIBRARY_SUFFIX}") elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") list(INSERT JEMALLOC_NAMES 0 "${CMAKE_STATIC_LIBRARY_PREFIX}jemalloc${CMAKE_STATIC_LIBRARY_SUFFIX}") endif() list(APPEND JEMALLOC_NAMES jemalloc) find_library(JEMALLOC_LIBRARY NAMES ${JEMALLOC_NAMES} HINTS ${PC_JEMALLOC_LIBDIR} ${PC_JEMALLOC_LIBRARY_DIRS} ${LIMIT_SEARCH}) set(JEMALLOC_LIBRARIES ${JEMALLOC_LIBRARY}) set(JEMALLOC_INCLUDE_DIRS ${JEMALLOC_INCLUDE_DIR}) include(FindPackageHandleStandardArgs) # handle the QUIETLY and REQUIRED arguments and set JEMALLOC_FOUND to TRUE # if all listed variables are TRUE find_package_handle_standard_args(JeMalloc DEFAULT_MSG JEMALLOC_LIBRARY JEMALLOC_INCLUDE_DIR) mark_as_advanced(JEMALLOC_INCLUDE_DIR JEMALLOC_LIBRARY) neovim-0.2.2/cmake/FindLibIntl.cmake000066400000000000000000000032261320401574200172310ustar00rootroot00000000000000# - Try to find libintl # Once done, this will define # # LibIntl_FOUND - system has libintl # LibIntl_INCLUDE_DIRS - the libintl include directories # LibIntl_LIBRARIES - link these to use libintl include(CheckCSourceCompiles) include(CheckVariableExists) include(LibFindMacros) # Append custom gettext path to CMAKE_PREFIX_PATH # if installed via Mac Hombrew if (CMAKE_HOST_APPLE) find_program(HOMEBREW_PROG brew) if (EXISTS ${HOMEBREW_PROG}) execute_process(COMMAND ${HOMEBREW_PROG} --prefix gettext OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE HOMEBREW_GETTEXT_PREFIX) list(APPEND CMAKE_PREFIX_PATH "${HOMEBREW_GETTEXT_PREFIX}") endif() endif() find_path(LibIntl_INCLUDE_DIR NAMES libintl.h PATH_SUFFIXES gettext ) find_library(LibIntl_LIBRARY NAMES intl libintl.a ) if (LibIntl_INCLUDE_DIR) set(CMAKE_REQUIRED_INCLUDES "${LibIntl_INCLUDE_DIR}") endif() # This is required because some operating systems don't have a separate # libintl--it is built into glibc. So we only need to specify the library # if one was actually found. if (LibIntl_LIBRARY) set(CMAKE_REQUIRED_LIBRARIES "${LibIntl_LIBRARY}") endif() check_c_source_compiles(" #include int main(int argc, char** argv) { gettext(\"foo\"); ngettext(\"foo\", \"bar\", 1); bindtextdomain(\"foo\", \"bar\"); bind_textdomain_codeset(\"foo\", \"bar\"); textdomain(\"foo\"); }" HAVE_WORKING_LIBINTL) if (HAVE_WORKING_LIBINTL) check_variable_exists(_nl_msg_cat_cntr HAVE_NL_MSG_CAT_CNTR) endif() set(LibIntl_PROCESS_INCLUDES LibIntl_INCLUDE_DIR) set(LibIntl_PROCESS_LIBS LibIntl_LIBRARY) libfind_process(LibIntl) neovim-0.2.2/cmake/FindLibTermkey.cmake000066400000000000000000000030471320401574200177440ustar00rootroot00000000000000# - Try to find libtermkey # Once done this will define # LIBTERMKEY_FOUND - System has libtermkey # LIBTERMKEY_INCLUDE_DIRS - The libtermkey include directories # LIBTERMKEY_LIBRARIES - The libraries needed to use libtermkey if(NOT USE_BUNDLED_LIBTERMKEY) find_package(PkgConfig) if (PKG_CONFIG_FOUND) pkg_check_modules(PC_LIBTERMKEY QUIET termkey) endif() else() set(PC_LIBTERMKEY_INCLUDEDIR) set(PC_LIBTERMKEY_INCLUDE_DIRS) set(PC_LIBTERMKEY_LIBDIR) set(PC_LIBTERMKEY_LIBRARY_DIRS) set(LIMIT_SEARCH NO_DEFAULT_PATH) endif() set(LIBTERMKEY_DEFINITIONS ${PC_LIBTERMKEY_CFLAGS_OTHER}) find_path(LIBTERMKEY_INCLUDE_DIR termkey.h PATHS ${PC_LIBTERMKEY_INCLUDEDIR} ${PC_LIBTERMKEY_INCLUDE_DIRS} ${LIMIT_SEARCH}) # If we're asked to use static linkage, add libuv.a as a preferred library name. if(LIBTERMKEY_USE_STATIC) list(APPEND LIBTERMKEY_NAMES "${CMAKE_STATIC_LIBRARY_PREFIX}termkey${CMAKE_STATIC_LIBRARY_SUFFIX}") endif() list(APPEND LIBTERMKEY_NAMES termkey) find_library(LIBTERMKEY_LIBRARY NAMES ${LIBTERMKEY_NAMES} HINTS ${PC_LIBTERMKEY_LIBDIR} ${PC_LIBTERMKEY_LIBRARY_DIRS} ${LIMIT_SEARCH}) set(LIBTERMKEY_LIBRARIES ${LIBTERMKEY_LIBRARY}) set(LIBTERMKEY_INCLUDE_DIRS ${LIBTERMKEY_INCLUDE_DIR}) include(FindPackageHandleStandardArgs) # handle the QUIETLY and REQUIRED arguments and set LIBTERMKEY_FOUND to TRUE # if all listed variables are TRUE find_package_handle_standard_args(LibTermkey DEFAULT_MSG LIBTERMKEY_LIBRARY LIBTERMKEY_INCLUDE_DIR) mark_as_advanced(LIBTERMKEY_INCLUDE_DIR LIBTERMKEY_LIBRARY) neovim-0.2.2/cmake/FindLibUV.cmake000066400000000000000000000056511320401574200166610ustar00rootroot00000000000000# - Try to find libuv # Once done, this will define # # LIBUV_FOUND - system has libuv # LIBUV_INCLUDE_DIRS - the libuv include directories # LIBUV_LIBRARIES - link these to use libuv # # Set the LIBUV_USE_STATIC variable to specify if static libraries should # be preferred to shared ones. if(NOT USE_BUNDLED_LIBUV) find_package(PkgConfig) if (PKG_CONFIG_FOUND) pkg_check_modules(PC_LIBUV QUIET libuv) endif() else() set(PC_LIBUV_INCLUDEDIR) set(PC_LIBUV_INCLUDE_DIRS) set(PC_LIBUV_LIBDIR) set(PC_LIBUV_LIBRARY_DIRS) set(LIMIT_SEARCH NO_DEFAULT_PATH) endif() find_path(LIBUV_INCLUDE_DIR uv.h HINTS ${PC_LIBUV_INCLUDEDIR} ${PC_LIBUV_INCLUDE_DIRS} ${LIMIT_SEARCH}) # If we're asked to use static linkage, add libuv.a as a preferred library name. if(LIBUV_USE_STATIC) list(APPEND LIBUV_NAMES "${CMAKE_STATIC_LIBRARY_PREFIX}uv${CMAKE_STATIC_LIBRARY_SUFFIX}") endif(LIBUV_USE_STATIC) if(MSVC) list(APPEND LIBUV_NAMES libuv) else() list(APPEND LIBUV_NAMES uv) endif() find_library(LIBUV_LIBRARY NAMES ${LIBUV_NAMES} HINTS ${PC_LIBUV_LIBDIR} ${PC_LIBUV_LIBRARY_DIRS} ${LIMIT_SEARCH}) mark_as_advanced(LIBUV_INCLUDE_DIR LIBUV_LIBRARY) if(PC_LIBUV_LIBRARIES) list(REMOVE_ITEM PC_LIBUV_LIBRARIES uv) endif() set(LIBUV_LIBRARIES ${LIBUV_LIBRARY} ${PC_LIBUV_LIBRARIES}) set(LIBUV_INCLUDE_DIRS ${LIBUV_INCLUDE_DIR}) # Deal with the fact that libuv.pc is missing important dependency information. include(CheckLibraryExists) check_library_exists(dl dlopen "dlfcn.h" HAVE_LIBDL) if(HAVE_LIBDL) list(APPEND LIBUV_LIBRARIES dl) endif() check_library_exists(kstat kstat_lookup "kstat.h" HAVE_LIBKSTAT) if(HAVE_LIBKSTAT) list(APPEND LIBUV_LIBRARIES kstat) endif() check_library_exists(kvm kvm_open "kvm.h" HAVE_LIBKVM) if(HAVE_LIBKVM AND NOT CMAKE_SYSTEM_NAME STREQUAL "OpenBSD") list(APPEND LIBUV_LIBRARIES kvm) endif() check_library_exists(nsl gethostbyname "nsl.h" HAVE_LIBNSL) if(HAVE_LIBNSL) list(APPEND LIBUV_LIBRARIES nsl) endif() check_library_exists(perfstat perfstat_cpu "libperfstat.h" HAVE_LIBPERFSTAT) if(HAVE_LIBPERFSTAT) list(APPEND LIBUV_LIBRARIES perfstat) endif() check_library_exists(rt clock_gettime "time.h" HAVE_LIBRT) if(HAVE_LIBRT) list(APPEND LIBUV_LIBRARIES rt) endif() check_library_exists(sendfile sendfile "" HAVE_LIBSENDFILE) if(HAVE_LIBSENDFILE) list(APPEND LIBUV_LIBRARIES sendfile) endif() if(WIN32) # check_library_exists() does not work for Win32 API calls in X86 due to name # mangling calling conventions list(APPEND LIBUV_LIBRARIES iphlpapi) list(APPEND LIBUV_LIBRARIES psapi) list(APPEND LIBUV_LIBRARIES userenv) list(APPEND LIBUV_LIBRARIES ws2_32) endif() include(FindPackageHandleStandardArgs) # handle the QUIETLY and REQUIRED arguments and set LIBUV_FOUND to TRUE # if all listed variables are TRUE find_package_handle_standard_args(LibUV DEFAULT_MSG LIBUV_LIBRARY LIBUV_INCLUDE_DIR) mark_as_advanced(LIBUV_INCLUDE_DIR LIBUV_LIBRARY) neovim-0.2.2/cmake/FindLibVterm.cmake000066400000000000000000000027311320401574200174200ustar00rootroot00000000000000# - Try to find libvterm # Once done this will define # LIBVTERM_FOUND - System has libvterm # LIBVTERM_INCLUDE_DIRS - The libvterm include directories # LIBVTERM_LIBRARIES - The libraries needed to use libvterm if(NOT USE_BUNDLED_LIBVTERM) find_package(PkgConfig) if (PKG_CONFIG_FOUND) pkg_check_modules(PC_LIBVTERM QUIET vterm) endif() else() set(PC_LIBVTERM_INCLUDEDIR) set(PC_LIBVTERM_INCLUDE_DIRS) set(PC_LIBVTERM_LIBDIR) set(PC_LIBVTERM_LIBRARY_DIRS) set(LIMIT_SEARCH NO_DEFAULT_PATH) endif() set(LIBVTERM_DEFINITIONS ${PC_LIBVTERM_CFLAGS_OTHER}) find_path(LIBVTERM_INCLUDE_DIR vterm.h PATHS ${PC_LIBVTERM_INCLUDEDIR} ${PC_LIBVTERM_INCLUDE_DIRS} ${LIMIT_SEARCH}) # If we're asked to use static linkage, add libuv.a as a preferred library name. if(LIBVTERM_USE_STATIC) list(APPEND LIBVTERM_NAMES "${CMAKE_STATIC_LIBRARY_PREFIX}vterm${CMAKE_STATIC_LIBRARY_SUFFIX}") endif() list(APPEND LIBVTERM_NAMES vterm) find_library(LIBVTERM_LIBRARY NAMES ${LIBVTERM_NAMES} HINTS ${PC_LIBVTERM_LIBDIR} ${PC_LIBVTERM_LIBRARY_DIRS} ${LIMIT_SEARCH}) set(LIBVTERM_LIBRARIES ${LIBVTERM_LIBRARY}) set(LIBVTERM_INCLUDE_DIRS ${LIBVTERM_INCLUDE_DIR}) include(FindPackageHandleStandardArgs) # handle the QUIETLY and REQUIRED arguments and set LIBVTERM_FOUND to TRUE # if all listed variables are TRUE find_package_handle_standard_args(LibVterm DEFAULT_MSG LIBVTERM_LIBRARY LIBVTERM_INCLUDE_DIR) mark_as_advanced(LIBVTERM_INCLUDE_DIR LIBVTERM_LIBRARY) neovim-0.2.2/cmake/FindLua.cmake000066400000000000000000000160021320401574200164110ustar00rootroot00000000000000# Distributed under the OSI-approved BSD 3-Clause License. See accompanying # file Copyright.txt or https://cmake.org/licensing for details. #.rst: # FindLua # ------- # # # # Locate Lua library This module defines # # :: # # LUA_FOUND - if false, do not try to link to Lua # LUA_LIBRARIES - both lua and lualib # LUA_INCLUDE_DIR - where to find lua.h # LUA_VERSION_STRING - the version of Lua found # LUA_VERSION_MAJOR - the major version of Lua # LUA_VERSION_MINOR - the minor version of Lua # LUA_VERSION_PATCH - the patch version of Lua # # # # Note that the expected include convention is # # :: # # #include "lua.h" # # and not # # :: # # #include # # This is because, the lua location is not standardized and may exist in # locations other than lua/ unset(_lua_include_subdirs) unset(_lua_library_names) unset(_lua_append_versions) # this is a function only to have all the variables inside go away automatically function(_lua_set_version_vars) set(LUA_VERSIONS5 5.3 5.2 5.1 5.0) if (Lua_FIND_VERSION_EXACT) if (Lua_FIND_VERSION_COUNT GREATER 1) set(_lua_append_versions ${Lua_FIND_VERSION_MAJOR}.${Lua_FIND_VERSION_MINOR}) endif () elseif (Lua_FIND_VERSION) # once there is a different major version supported this should become a loop if (NOT Lua_FIND_VERSION_MAJOR GREATER 5) if (Lua_FIND_VERSION_COUNT EQUAL 1) set(_lua_append_versions ${LUA_VERSIONS5}) else () foreach (subver IN LISTS LUA_VERSIONS5) if (NOT subver VERSION_LESS ${Lua_FIND_VERSION}) list(APPEND _lua_append_versions ${subver}) endif () endforeach () endif () endif () else () # once there is a different major version supported this should become a loop set(_lua_append_versions ${LUA_VERSIONS5}) endif () list(APPEND _lua_include_subdirs "include/lua" "include") foreach (ver IN LISTS _lua_append_versions) string(REGEX MATCH "^([0-9]+)\\.([0-9]+)$" _ver "${ver}") list(APPEND _lua_include_subdirs include/lua${CMAKE_MATCH_1}${CMAKE_MATCH_2} include/lua${CMAKE_MATCH_1}.${CMAKE_MATCH_2} include/lua-${CMAKE_MATCH_1}.${CMAKE_MATCH_2} ) endforeach () set(_lua_include_subdirs "${_lua_include_subdirs}" PARENT_SCOPE) set(_lua_append_versions "${_lua_append_versions}" PARENT_SCOPE) endfunction(_lua_set_version_vars) function(_lua_check_header_version _hdr_file) # At least 5.[012] have different ways to express the version # so all of them need to be tested. Lua 5.2 defines LUA_VERSION # and LUA_RELEASE as joined by the C preprocessor, so avoid those. file(STRINGS "${_hdr_file}" lua_version_strings REGEX "^#define[ \t]+LUA_(RELEASE[ \t]+\"Lua [0-9]|VERSION([ \t]+\"Lua [0-9]|_[MR])).*") string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION_MAJOR[ \t]+\"([0-9])\"[ \t]*;.*" "\\1" LUA_VERSION_MAJOR ";${lua_version_strings};") if (LUA_VERSION_MAJOR MATCHES "^[0-9]+$") string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION_MINOR[ \t]+\"([0-9])\"[ \t]*;.*" "\\1" LUA_VERSION_MINOR ";${lua_version_strings};") string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION_RELEASE[ \t]+\"([0-9])\"[ \t]*;.*" "\\1" LUA_VERSION_PATCH ";${lua_version_strings};") set(LUA_VERSION_STRING "${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}.${LUA_VERSION_PATCH}") else () string(REGEX REPLACE ".*;#define[ \t]+LUA_RELEASE[ \t]+\"Lua ([0-9.]+)\"[ \t]*;.*" "\\1" LUA_VERSION_STRING ";${lua_version_strings};") if (NOT LUA_VERSION_STRING MATCHES "^[0-9.]+$") string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION[ \t]+\"Lua ([0-9.]+)\"[ \t]*;.*" "\\1" LUA_VERSION_STRING ";${lua_version_strings};") endif () string(REGEX REPLACE "^([0-9]+)\\.[0-9.]*$" "\\1" LUA_VERSION_MAJOR "${LUA_VERSION_STRING}") string(REGEX REPLACE "^[0-9]+\\.([0-9]+)[0-9.]*$" "\\1" LUA_VERSION_MINOR "${LUA_VERSION_STRING}") string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]).*" "\\1" LUA_VERSION_PATCH "${LUA_VERSION_STRING}") endif () foreach (ver IN LISTS _lua_append_versions) if (ver STREQUAL "${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}") set(LUA_VERSION_MAJOR ${LUA_VERSION_MAJOR} PARENT_SCOPE) set(LUA_VERSION_MINOR ${LUA_VERSION_MINOR} PARENT_SCOPE) set(LUA_VERSION_PATCH ${LUA_VERSION_PATCH} PARENT_SCOPE) set(LUA_VERSION_STRING ${LUA_VERSION_STRING} PARENT_SCOPE) return() endif () endforeach () endfunction(_lua_check_header_version) _lua_set_version_vars() if (LUA_INCLUDE_DIR AND EXISTS "${LUA_INCLUDE_DIR}/lua.h") _lua_check_header_version("${LUA_INCLUDE_DIR}/lua.h") endif () if (NOT LUA_VERSION_STRING) foreach (subdir IN LISTS _lua_include_subdirs) unset(LUA_INCLUDE_PREFIX CACHE) find_path(LUA_INCLUDE_PREFIX ${subdir}/lua.h HINTS ENV LUA_DIR PATHS ~/Library/Frameworks /Library/Frameworks /sw # Fink /opt/local # DarwinPorts /opt/csw # Blastwave /opt ) if (LUA_INCLUDE_PREFIX) _lua_check_header_version("${LUA_INCLUDE_PREFIX}/${subdir}/lua.h") if (LUA_VERSION_STRING) set(LUA_INCLUDE_DIR "${LUA_INCLUDE_PREFIX}/${subdir}") break() endif () endif () endforeach () endif () unset(_lua_include_subdirs) unset(_lua_append_versions) if (LUA_VERSION_STRING) set(_lua_library_names lua${LUA_VERSION_MAJOR}${LUA_VERSION_MINOR} lua${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR} lua-${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR} lua.${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR} ) endif () find_library(LUA_LIBRARY NAMES ${_lua_library_names} lua HINTS ENV LUA_DIR PATH_SUFFIXES lib PATHS ~/Library/Frameworks /Library/Frameworks /sw /opt/local /opt/csw /opt ) unset(_lua_library_names) if (LUA_LIBRARY) # include the math library for Unix if (UNIX AND NOT APPLE AND NOT BEOS) find_library(LUA_MATH_LIBRARY m) set(LUA_LIBRARIES "${LUA_LIBRARY};${LUA_MATH_LIBRARY}") # include dl library for statically-linked Lua library get_filename_component(LUA_LIB_EXT ${LUA_LIBRARY} EXT) if(LUA_LIB_EXT STREQUAL CMAKE_STATIC_LIBRARY_SUFFIX) list(APPEND LUA_LIBRARIES ${CMAKE_DL_LIBS}) endif() # For Windows and Mac, don't need to explicitly include the math library else () set(LUA_LIBRARIES "${LUA_LIBRARY}") endif () endif () include(FindPackageHandleStandardArgs) # handle the QUIETLY and REQUIRED arguments and set LUA_FOUND to TRUE if # all listed variables are TRUE FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lua REQUIRED_VARS LUA_LIBRARIES LUA_INCLUDE_DIR VERSION_VAR LUA_VERSION_STRING) mark_as_advanced(LUA_INCLUDE_DIR LUA_LIBRARY LUA_MATH_LIBRARY) neovim-0.2.2/cmake/FindLuaJit.cmake000066400000000000000000000032001320401574200170540ustar00rootroot00000000000000# - Try to find luajit # Once done this will define # LUAJIT_FOUND - System has luajit # LUAJIT_INCLUDE_DIRS - The luajit include directories # LUAJIT_LIBRARIES - The libraries needed to use luajit if(NOT USE_BUNDLED_LUAJIT) find_package(PkgConfig) if (PKG_CONFIG_FOUND) pkg_check_modules(PC_LUAJIT QUIET luajit) endif() else() set(PC_LUAJIT_INCLUDEDIR) set(PC_LUAJIT_INCLUDE_DIRS) set(PC_LUAJIT_LIBDIR) set(PC_LUAJIT_LIBRARY_DIRS) set(LIMIT_SEARCH NO_DEFAULT_PATH) endif() set(LUAJIT_DEFINITIONS ${PC_LUAJIT_CFLAGS_OTHER}) find_path(LUAJIT_INCLUDE_DIR luajit.h PATHS ${PC_LUAJIT_INCLUDEDIR} ${PC_LUAJIT_INCLUDE_DIRS} PATH_SUFFIXES luajit-2.0 ${LIMIT_SEARCH}) # If we're asked to use static linkage, add libluajit-5.1.a as a preferred # library name. if(LUAJIT_USE_STATIC) list(APPEND LUAJIT_NAMES "${CMAKE_STATIC_LIBRARY_PREFIX}luajit-5.1${CMAKE_STATIC_LIBRARY_SUFFIX}") endif() if(MSVC) list(APPEND LUAJIT_NAMES lua51) elseif(MINGW) list(APPEND LUAJIT_NAMES libluajit libluajit-5.1) else() list(APPEND LUAJIT_NAMES luajit-5.1) endif() find_library(LUAJIT_LIBRARY NAMES ${LUAJIT_NAMES} PATHS ${PC_LUAJIT_LIBDIR} ${PC_LUAJIT_LIBRARY_DIRS} ${LIMIT_SEARCH}) set(LUAJIT_LIBRARIES ${LUAJIT_LIBRARY}) set(LUAJIT_INCLUDE_DIRS ${LUAJIT_INCLUDE_DIR}) include(FindPackageHandleStandardArgs) # handle the QUIETLY and REQUIRED arguments and set LUAJIT_FOUND to TRUE # if all listed variables are TRUE find_package_handle_standard_args(LuaJit DEFAULT_MSG LUAJIT_LIBRARY LUAJIT_INCLUDE_DIR) mark_as_advanced(LUAJIT_INCLUDE_DIR LUAJIT_LIBRARY) neovim-0.2.2/cmake/FindMsgpack.cmake000066400000000000000000000047361320401574200172700ustar00rootroot00000000000000# - Try to find msgpack # Once done this will define # MSGPACK_FOUND - System has msgpack # MSGPACK_INCLUDE_DIRS - The msgpack include directories # MSGPACK_LIBRARIES - The libraries needed to use msgpack if(NOT USE_BUNDLED_MSGPACK) find_package(PkgConfig) if (PKG_CONFIG_FOUND) pkg_search_module(PC_MSGPACK QUIET msgpackc>=${Msgpack_FIND_VERSION} msgpack>=${Msgpack_FIND_VERSION}) endif() else() set(PC_MSGPACK_INCLUDEDIR) set(PC_MSGPACK_INCLUDE_DIRS) set(PC_MSGPACK_LIBDIR) set(PC_MSGPACK_LIBRARY_DIRS) set(LIMIT_SEARCH NO_DEFAULT_PATH) endif() set(MSGPACK_DEFINITIONS ${PC_MSGPACK_CFLAGS_OTHER}) find_path(MSGPACK_INCLUDE_DIR msgpack/version_master.h HINTS ${PC_MSGPACK_INCLUDEDIR} ${PC_MSGPACK_INCLUDE_DIRS} ${LIMIT_SEARCH}) if(MSGPACK_INCLUDE_DIR) file(READ ${MSGPACK_INCLUDE_DIR}/msgpack/version_master.h msgpack_version_h) string(REGEX REPLACE ".*MSGPACK_VERSION_MAJOR +([0-9]+).*" "\\1" MSGPACK_VERSION_MAJOR "${msgpack_version_h}") string(REGEX REPLACE ".*MSGPACK_VERSION_MINOR +([0-9]+).*" "\\1" MSGPACK_VERSION_MINOR "${msgpack_version_h}") string(REGEX REPLACE ".*MSGPACK_VERSION_REVISION +([0-9]+).*" "\\1" MSGPACK_VERSION_REVISION "${msgpack_version_h}") set(MSGPACK_VERSION_STRING "${MSGPACK_VERSION_MAJOR}.${MSGPACK_VERSION_MINOR}.${MSGPACK_VERSION_REVISION}") else() set(MSGPACK_VERSION_STRING) endif() # If we're asked to use static linkage, add libmsgpack{,c}.a as a preferred library name. if(MSGPACK_USE_STATIC) list(APPEND MSGPACK_NAMES "${CMAKE_STATIC_LIBRARY_PREFIX}msgpackc${CMAKE_STATIC_LIBRARY_SUFFIX}" "${CMAKE_STATIC_LIBRARY_PREFIX}msgpack${CMAKE_STATIC_LIBRARY_SUFFIX}") endif() if(MSVC) # The import library for the msgpack DLL has a different name list(APPEND MSGPACK_NAMES msgpack_import) else() list(APPEND MSGPACK_NAMES msgpackc msgpack) endif() find_library(MSGPACK_LIBRARY NAMES ${MSGPACK_NAMES} # Check each directory for all names to avoid using headers/libraries from # different places. NAMES_PER_DIR HINTS ${PC_MSGPACK_LIBDIR} ${PC_MSGPACK_LIBRARY_DIRS} ${LIMIT_SEARCH}) mark_as_advanced(MSGPACK_INCLUDE_DIR MSGPACK_LIBRARY) set(MSGPACK_LIBRARIES ${MSGPACK_LIBRARY}) set(MSGPACK_INCLUDE_DIRS ${MSGPACK_INCLUDE_DIR}) include(FindPackageHandleStandardArgs) # handle the QUIETLY and REQUIRED arguments and set MSGPACK_FOUND to TRUE # if all listed variables are TRUE find_package_handle_standard_args(Msgpack REQUIRED_VARS MSGPACK_LIBRARY MSGPACK_INCLUDE_DIR VERSION_VAR MSGPACK_VERSION_STRING) neovim-0.2.2/cmake/FindUnibilium.cmake000066400000000000000000000030231320401574200176240ustar00rootroot00000000000000# - Try to find unibilium # Once done this will define # UNIBILIUM_FOUND - System has unibilium # UNIBILIUM_INCLUDE_DIRS - The unibilium include directories # UNIBILIUM_LIBRARIES - The libraries needed to use unibilium if(NOT USE_BUNDLED_UNIBILIUM) find_package(PkgConfig) if (PKG_CONFIG_FOUND) pkg_check_modules(PC_UNIBILIUM QUIET unibilium) endif() else() set(PC_UNIBILIUM_INCLUDEDIR) set(PC_UNIBILIUM_INCLUDE_DIRS) set(PC_UNIBILIUM_LIBDIR) set(PC_UNIBILIUM_LIBRARY_DIRS) set(LIMIT_SEARCH NO_DEFAULT_PATH) endif() set(UNIBILIUM_DEFINITIONS ${PC_UNIBILIUM_CFLAGS_OTHER}) find_path(UNIBILIUM_INCLUDE_DIR unibilium.h PATHS ${PC_UNIBILIUM_INCLUDEDIR} ${PC_UNIBILIUM_INCLUDE_DIRS} ${LIMIT_SEARCH}) # If we're asked to use static linkage, add libunibilium.a as a preferred library name. if(UNIBILIUM_USE_STATIC) list(APPEND UNIBILIUM_NAMES "${CMAKE_STATIC_LIBRARY_PREFIX}unibilium${CMAKE_STATIC_LIBRARY_SUFFIX}") endif() list(APPEND UNIBILIUM_NAMES unibilium) find_library(UNIBILIUM_LIBRARY NAMES ${UNIBILIUM_NAMES} HINTS ${PC_UNIBILIUM_LIBDIR} ${PC_UNIBILIUM_LIBRARY_DIRS} ${LIMIT_SEARCH}) set(UNIBILIUM_LIBRARIES ${UNIBILIUM_LIBRARY}) set(UNIBILIUM_INCLUDE_DIRS ${UNIBILIUM_INCLUDE_DIR}) include(FindPackageHandleStandardArgs) # handle the QUIETLY and REQUIRED arguments and set UNIBILIUM_FOUND to TRUE # if all listed variables are TRUE find_package_handle_standard_args(unibilium DEFAULT_MSG UNIBILIUM_LIBRARY UNIBILIUM_INCLUDE_DIR) mark_as_advanced(UNIBILIUM_INCLUDE_DIR UNIBILIUM_LIBRARY) neovim-0.2.2/cmake/FindWinpty.cmake000066400000000000000000000005041320401574200171620ustar00rootroot00000000000000include(LibFindMacros) find_path(WINPTY_INCLUDE_DIR winpty.h) set(WINPTY_INCLUDE_DIRS ${WINPTY_INCLUDE_DIR}) find_library(WINPTY_LIBRARY winpty) find_program(WINPTY_AGENT_EXE winpty-agent.exe) set(WINPTY_LIBRARIES ${WINPTY_LIBRARY}) find_package_handle_standard_args(Winpty DEFAULT_MSG WINPTY_LIBRARY WINPTY_INCLUDE_DIR) neovim-0.2.2/cmake/GenerateHelptags.cmake.in000066400000000000000000000025211320401574200207170ustar00rootroot00000000000000if(DEFINED ENV{DESTDIR}) file(TO_CMAKE_PATH $ENV{DESTDIR}/@CMAKE_INSTALL_FULL_DATADIR@/nvim/runtime/doc HELPTAGS_WORKING_DIRECTORY) else() file(TO_CMAKE_PATH @CMAKE_INSTALL_FULL_DATADIR@/nvim/runtime/doc HELPTAGS_WORKING_DIRECTORY) endif() message(STATUS "Generating helptags in ${HELPTAGS_WORKING_DIRECTORY}.") if(EXISTS ${HELPTAGS_WORKING_DIRECTORY}/) message(STATUS "${HELPTAGS_WORKING_DIRECTORY} already exists") # If the doc directory already exists, helptags could fail due to duplicate # tags. Tell the user to remove the directory and try again. set(TROUBLESHOOTING "\nRemove \"${HELPTAGS_WORKING_DIRECTORY}\" and try again.") endif() # Workaround for hanging "yes | nvim -c 'helptags ++t .'" # and therefore hanging "yes | make install": # Set INPUT_FILE to an empty file, causing execute_process # to disregard other standard input (such as "yes |"). set(EMPTY_FILE ${CMAKE_CURRENT_BINARY_DIR}/.GenerateHelptags) file(WRITE ${EMPTY_FILE} "") execute_process( COMMAND ${CMAKE_CURRENT_BINARY_DIR}/bin/nvim -u NONE -es -c "helptags ++t ." -c quit WORKING_DIRECTORY ${HELPTAGS_WORKING_DIRECTORY} INPUT_FILE ${EMPTY_FILE} OUTPUT_VARIABLE err ERROR_VARIABLE err RESULT_VARIABLE res) if(NOT res EQUAL 0) message(FATAL_ERROR "Generating helptags failed: ${err} - ${res}${TROUBLESHOOTING}") endif() neovim-0.2.2/cmake/GetCompileFlags.cmake000066400000000000000000000026431320401574200201020ustar00rootroot00000000000000function(get_compile_flags _compile_flags) # Create template akin to CMAKE_C_COMPILE_OBJECT. set(compile_flags " ") # Get C compiler. string(REPLACE "" "${CMAKE_C_COMPILER}" compile_flags "${compile_flags}") # Get flags set by add_definition(). get_directory_property(definitions DIRECTORY "src/nvim" DEFINITIONS) string(REPLACE "" "${definitions}" compile_flags "${compile_flags}") # Get general C flags. string(REPLACE "" "${CMAKE_C_FLAGS}" compile_flags "${compile_flags}") # Get C flags specific to build type. string(TOUPPER "${CMAKE_BUILD_TYPE}" build_type) string(REPLACE "" "${CMAKE_C_FLAGS_${build_type}}" compile_flags "${compile_flags}") # Get include directories. get_directory_property(include_directories_list DIRECTORY "src/nvim" INCLUDE_DIRECTORIES) foreach(include_directory ${include_directories_list}) set(include_directories "${include_directories} -I${include_directory}") endforeach() string(REPLACE "" "${include_directories}" compile_flags "${compile_flags}") # Clean duplicate whitespace. string(REPLACE " " " " compile_flags "${compile_flags}") set(${_compile_flags} "${compile_flags}" PARENT_SCOPE) endfunction() neovim-0.2.2/cmake/GetGitRevisionDescription.cmake000066400000000000000000000114321320401574200221770ustar00rootroot00000000000000# https://github.com/rpavlik/cmake-modules # # - Returns a version string from Git # # These functions force a re-configure on each git commit so that you can # trust the values of the variables in your build system. # # get_git_head_revision( [ ...]) # # Returns the refspec and sha hash of the current head revision # # git_describe( [ ...]) # # Returns the results of git describe on the source tree, and adjusting # the output so that it tests false if an error occurs. # # git_get_exact_tag( [ ...]) # # Returns the results of git describe --exact-match on the source tree, # and adjusting the output so that it tests false if there was no exact # matching tag. # # Requires CMake 2.6 or newer (uses the 'function' command) # # Original Author: # 2009-2010 Ryan Pavlik # http://academic.cleardefinition.com # Iowa State University HCI Graduate Program/VRAC # # Copyright Iowa State University 2009-2010. # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) if(__get_git_revision_description) return() endif() set(__get_git_revision_description YES) # We must run the following at "include" time, not at function call time, # to find the path to this module rather than the path to a calling list file get_filename_component(_gitdescmoddir ${CMAKE_CURRENT_LIST_FILE} PATH) function(get_git_dir _gitdir) # check FORCED_GIT_DIR first if(FORCED_GIT_DIR) set(${_gitdir} ${FORCED_GIT_DIR} PARENT_SCOPE) return() endif() # check GIT_DIR in environment set(GIT_DIR $ENV{GIT_DIR}) if(NOT GIT_DIR) set(GIT_PARENT_DIR ${CMAKE_CURRENT_SOURCE_DIR}) set(GIT_DIR ${GIT_PARENT_DIR}/.git) endif() # .git dir not found, search parent directories while(NOT EXISTS ${GIT_DIR}) set(GIT_PREVIOUS_PARENT ${GIT_PARENT_DIR}) get_filename_component(GIT_PARENT_DIR ${GIT_PARENT_DIR} PATH) if(GIT_PARENT_DIR STREQUAL GIT_PREVIOUS_PARENT) return() endif() set(GIT_DIR ${GIT_PARENT_DIR}/.git) endwhile() # check if this is a submodule if(NOT IS_DIRECTORY ${GIT_DIR}) file(READ ${GIT_DIR} submodule) string(REGEX REPLACE "gitdir: (.*)\n$" "\\1" GIT_DIR_RELATIVE ${submodule}) get_filename_component(SUBMODULE_DIR ${GIT_DIR} PATH) get_filename_component(GIT_DIR ${SUBMODULE_DIR}/${GIT_DIR_RELATIVE} ABSOLUTE) endif() set(${_gitdir} ${GIT_DIR} PARENT_SCOPE) endfunction() function(get_git_head_revision _refspecvar _hashvar) get_git_dir(GIT_DIR) if(NOT GIT_DIR) return() endif() set(GIT_DATA ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/git-data) if(NOT EXISTS ${GIT_DATA}) file(MAKE_DIRECTORY ${GIT_DATA}) endif() if(NOT EXISTS ${GIT_DIR}/HEAD) return() endif() set(HEAD_FILE ${GIT_DATA}/HEAD) configure_file(${GIT_DIR}/HEAD ${HEAD_FILE} COPYONLY) configure_file(${_gitdescmoddir}/GetGitRevisionDescription.cmake.in ${GIT_DATA}/grabRef.cmake @ONLY) include(${GIT_DATA}/grabRef.cmake) set(${_refspecvar} ${HEAD_REF} PARENT_SCOPE) set(${_hashvar} ${HEAD_HASH} PARENT_SCOPE) endfunction() function(git_describe _var) get_git_dir(GIT_DIR) if(NOT GIT_DIR) return() endif() if(NOT GIT_FOUND) find_package(Git QUIET) endif() if(NOT GIT_FOUND) set(${_var} "GIT-NOTFOUND" PARENT_SCOPE) return() endif() get_git_head_revision(refspec hash) if(NOT hash) set(${_var} "HEAD-HASH-NOTFOUND" PARENT_SCOPE) return() endif() execute_process(COMMAND ${GIT_EXECUTABLE} describe ${hash} ${ARGN} WORKING_DIRECTORY ${GIT_DIR} RESULT_VARIABLE res OUTPUT_VARIABLE out ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) if(NOT res EQUAL 0) set(out "${out}-${res}-NOTFOUND") endif() set(${_var} ${out} PARENT_SCOPE) endfunction() function(git_timestamp _var) get_git_dir(GIT_DIR) if(NOT GIT_DIR) return() endif() if(NOT GIT_FOUND) find_package(Git QUIET) endif() if(NOT GIT_FOUND) return() endif() get_git_head_revision(refspec hash) if(NOT hash) set(${_var} "HEAD-HASH-NOTFOUND" PARENT_SCOPE) return() endif() execute_process(COMMAND ${GIT_EXECUTABLE} log -1 --format="%ci" ${hash} ${ARGN} WORKING_DIRECTORY ${GIT_DIR} RESULT_VARIABLE res OUTPUT_VARIABLE out ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) if(res EQUAL 0) string(REGEX REPLACE "[-\" :]" "" out ${out}) string(SUBSTRING ${out} 0 12 out) else() set(out "${out}-${res}-NOTFOUND") endif() set(${_var} ${out} PARENT_SCOPE) endfunction() function(git_get_exact_tag _var) git_describe(out --exact-match ${ARGN}) set(${_var} ${out} PARENT_SCOPE) endfunction() neovim-0.2.2/cmake/GetGitRevisionDescription.cmake.in000066400000000000000000000023011320401574200225770ustar00rootroot00000000000000# # Internal file for GetGitRevisionDescription.cmake # # Requires CMake 2.6 or newer (uses the 'function' command) # # Original Author: # 2009-2010 Ryan Pavlik # http://academic.cleardefinition.com # Iowa State University HCI Graduate Program/VRAC # # Copyright Iowa State University 2009-2010. # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) set(HEAD_HASH) file(READ "@HEAD_FILE@" HEAD_CONTENTS LIMIT 1024) string(STRIP "${HEAD_CONTENTS}" HEAD_CONTENTS) if(HEAD_CONTENTS MATCHES "ref") # named branch string(REPLACE "ref: " "" HEAD_REF "${HEAD_CONTENTS}") if(EXISTS "@GIT_DIR@/${HEAD_REF}") configure_file("@GIT_DIR@/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY) elseif(EXISTS "@GIT_DIR@/logs/${HEAD_REF}") configure_file("@GIT_DIR@/logs/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY) set(HEAD_HASH "${HEAD_REF}") endif() else() # detached HEAD configure_file("@GIT_DIR@/HEAD" "@GIT_DATA@/head-ref" COPYONLY) endif() if(NOT HEAD_HASH) file(READ "@GIT_DATA@/head-ref" HEAD_HASH LIMIT 1024) string(STRIP "${HEAD_HASH}" HEAD_HASH) endif() neovim-0.2.2/cmake/InstallClintErrors.cmake000066400000000000000000000001261320401574200206640ustar00rootroot00000000000000file(GLOB_RECURSE JSON_FILES *.json) file(COPY ${JSON_FILES} DESTINATION "${TARGET}") neovim-0.2.2/cmake/InstallHelpers.cmake000066400000000000000000000115671320401574200200330ustar00rootroot00000000000000# Fix CMAKE_INSTALL_MANDIR on BSD before including GNUInstallDirs. #6771 if(CMAKE_SYSTEM_NAME MATCHES "BSD" AND NOT DEFINED CMAKE_INSTALL_MANDIR) if(DEFINED ENV{MANPREFIX}) set(CMAKE_INSTALL_MANDIR "$ENV{MANPREFIX}/man") elseif(CMAKE_INSTALL_PREFIX MATCHES "^/usr/local$") set(CMAKE_INSTALL_MANDIR "man") endif() endif() # For $CMAKE_INSTALL_{DATAROOT,MAN, ...}DIR include(GNUInstallDirs) # This will create any directories that need to be created in the destination # path with the typical owner, group, and user permissions--independent of the # umask setting. function(create_install_dir_with_perms) cmake_parse_arguments(_install_dir "" "DESTINATION" "DIRECTORY_PERMISSIONS" ${ARGN} ) if(NOT _install_dir_DESTINATION) message(FATAL_ERROR "Must specify DESTINATION") endif() if(NOT _install_dir_DIRECTORY_PERMISSIONS) set(_install_dir_DIRECTORY_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) endif() install(CODE " set(_current_dir \"\${CMAKE_INSTALL_PREFIX}/${_install_dir_DESTINATION}\") set(_dir_permissions \"${_install_dir_DIRECTORY_PERMISSIONS}\") set(_parent_dirs) set(_prev_dir) # Explicitly prepend DESTDIR when using EXISTS. # file(INSTALL ...) implicitly respects DESTDIR, but EXISTS does not. while(NOT EXISTS \$ENV{DESTDIR}\${_current_dir} AND NOT \${_prev_dir} STREQUAL \${_current_dir}) list(APPEND _parent_dirs \${_current_dir}) set(_prev_dir \${_current_dir}) get_filename_component(_current_dir \${_current_dir} PATH) endwhile() if(_parent_dirs) list(REVERSE _parent_dirs) endif() # Create any missing folders with the useful permissions. Note: this uses # a hidden option of CMake, but it's been shown to work with 2.8.11 thru # 3.0.2. foreach(_current_dir \${_parent_dirs}) if(NOT IS_DIRECTORY \${_current_dir}) # file(INSTALL ...) implicitly respects DESTDIR, so there's no need to # prepend it here. file(INSTALL DESTINATION \${_current_dir} TYPE DIRECTORY DIR_PERMISSIONS \${_dir_permissions} FILES \"\") endif() endforeach() ") endfunction() # This is to prevent the user's umask from corrupting the expected permissions # for the parent directories. We want to behave like the install tool here: # preserve what's there already, but create new things with useful permissions. function(install_helper) cmake_parse_arguments(_install_helper "" "DESTINATION;DIRECTORY;RENAME" "FILES;PROGRAMS;TARGETS;DIRECTORY_PERMISSIONS;FILE_PERMISSIONS" ${ARGN} ) if(NOT _install_helper_DESTINATION AND NOT _install_helper_TARGETS) message(FATAL_ERROR "Must specify the DESTINATION path") endif() if(NOT _install_helper_FILES AND NOT _install_helper_DIRECTORY AND NOT _install_helper_PROGRAMS AND NOT _install_helper_TARGETS) message(FATAL_ERROR "Must specify FILES, PROGRAMS, TARGETS, or a DIRECTORY to install") endif() if(NOT _install_helper_DIRECTORY_PERMISSIONS) set(_install_helper_DIRECTORY_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) endif() if(NOT _install_helper_FILE_PERMISSIONS) set(_install_helper_FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ) endif() if(NOT _install_helper_PROGRAM_PERMISSIONS) set(_install_helper_PROGRAM_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) endif() if(_install_helper_RENAME) set(RENAME RENAME ${_install_helper_RENAME}) endif() if(_install_helper_TARGETS) set(_install_helper_DESTINATION "") endif() if(_install_helper_TARGETS) # Ensure the bin area exists with the correct permissions. create_install_dir_with_perms(DESTINATION ${CMAKE_INSTALL_BINDIR}) install( TARGETS ${_install_helper_TARGETS} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) else() create_install_dir_with_perms( DESTINATION ${_install_helper_DESTINATION} DIRECTORY_PERMISSIONS ${_install_helper_DIRECTORY_PERMISSIONS}) endif() if(_install_helper_DIRECTORY) install( DIRECTORY ${_install_helper_DIRECTORY} DESTINATION ${_install_helper_DESTINATION} DIRECTORY_PERMISSIONS ${_install_helper_DIRECTORY_PERMISSIONS} FILE_PERMISSIONS ${_install_helper_FILE_PERMISSIONS}) endif() if(_install_helper_FILES) install( FILES ${_install_helper_FILES} DESTINATION ${_install_helper_DESTINATION} PERMISSIONS ${_install_helper_FILE_PERMISSIONS} ${RENAME}) endif() if(_install_helper_PROGRAMS) install( PROGRAMS ${_install_helper_PROGRAMS} DESTINATION ${_install_helper_DESTINATION} PERMISSIONS ${_install_helper_PROGRAM_PERMISSIONS} ${RENAME}) endif() endfunction() neovim-0.2.2/cmake/LibFindMacros.cmake000066400000000000000000000110601320401574200175420ustar00rootroot00000000000000# Version 1.0 (2013-04-12) # Public Domain, originally written by Lasse Kärkkäinen # Published at http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries # If you improve the script, please modify the forementioned wiki page because # I no longer maintain my scripts (hosted as static files at zi.fi). Feel free # to remove this entire header if you use real version control instead. # Changelog: # 2013-04-12 Added version number (1.0) and this header, no other changes # 2009-10-08 Originally published # Works the same as find_package, but forwards the "REQUIRED" and "QUIET" arguments # used for the current package. For this to work, the first parameter must be the # prefix of the current package, then the prefix of the new package etc, which are # passed to find_package. macro (libfind_package PREFIX) set (LIBFIND_PACKAGE_ARGS ${ARGN}) if (${PREFIX}_FIND_QUIETLY) set (LIBFIND_PACKAGE_ARGS ${LIBFIND_PACKAGE_ARGS} QUIET) endif (${PREFIX}_FIND_QUIETLY) if (${PREFIX}_FIND_REQUIRED) set (LIBFIND_PACKAGE_ARGS ${LIBFIND_PACKAGE_ARGS} REQUIRED) endif (${PREFIX}_FIND_REQUIRED) find_package(${LIBFIND_PACKAGE_ARGS}) endmacro (libfind_package) # CMake developers made the UsePkgConfig system deprecated in the same release (2.6) # where they added pkg_check_modules. Consequently I need to support both in my scripts # to avoid those deprecated warnings. Here's a helper that does just that. # Works identically to pkg_check_modules, except that no checks are needed prior to use. macro (libfind_pkg_check_modules PREFIX PKGNAME) if (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4) include(UsePkgConfig) pkgconfig(${PKGNAME} ${PREFIX}_INCLUDE_DIRS ${PREFIX}_LIBRARY_DIRS ${PREFIX}_LDFLAGS ${PREFIX}_CFLAGS) else (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4) find_package(PkgConfig) if (PKG_CONFIG_FOUND) pkg_check_modules(${PREFIX} ${PKGNAME}) endif (PKG_CONFIG_FOUND) endif (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4) endmacro (libfind_pkg_check_modules) # Do the final processing once the paths have been detected. # If include dirs are needed, ${PREFIX}_PROCESS_INCLUDES should be set to contain # all the variables, each of which contain one include directory. # Ditto for ${PREFIX}_PROCESS_LIBS and library files. # Will set ${PREFIX}_FOUND, ${PREFIX}_INCLUDE_DIRS and ${PREFIX}_LIBRARIES. # Also handles errors in case library detection was required, etc. macro (libfind_process PREFIX) # Skip processing if already processed during this run if (NOT ${PREFIX}_FOUND) # Start with the assumption that the library was found set (${PREFIX}_FOUND TRUE) # Process all includes and set _FOUND to false if any are missing foreach (i ${${PREFIX}_PROCESS_INCLUDES}) if (${i}) set (${PREFIX}_INCLUDE_DIRS ${${PREFIX}_INCLUDE_DIRS} ${${i}}) mark_as_advanced(${i}) else (${i}) set (${PREFIX}_FOUND FALSE) endif (${i}) endforeach (i) # Process all libraries and set _FOUND to false if any are missing foreach (i ${${PREFIX}_PROCESS_LIBS}) if (${i}) set (${PREFIX}_LIBRARIES ${${PREFIX}_LIBRARIES} ${${i}}) mark_as_advanced(${i}) else (${i}) set (${PREFIX}_FOUND FALSE) endif (${i}) endforeach (i) # Print message and/or exit on fatal error if (${PREFIX}_FOUND) if (NOT ${PREFIX}_FIND_QUIETLY) message (STATUS "Found ${PREFIX} ${${PREFIX}_VERSION}") endif (NOT ${PREFIX}_FIND_QUIETLY) else (${PREFIX}_FOUND) if (${PREFIX}_FIND_REQUIRED) foreach (i ${${PREFIX}_PROCESS_INCLUDES} ${${PREFIX}_PROCESS_LIBS}) message("${i}=${${i}}") endforeach (i) message (FATAL_ERROR "Required library ${PREFIX} NOT FOUND.\nInstall the library (dev version) and try again. If the library is already installed, use ccmake to set the missing variables manually.") endif (${PREFIX}_FIND_REQUIRED) endif (${PREFIX}_FOUND) endif (NOT ${PREFIX}_FOUND) endmacro (libfind_process) macro(libfind_library PREFIX basename) set(TMP "") if(MSVC80) set(TMP -vc80) endif(MSVC80) if(MSVC90) set(TMP -vc90) endif(MSVC90) set(${PREFIX}_LIBNAMES ${basename}${TMP}) if(${ARGC} GREATER 2) set(${PREFIX}_LIBNAMES ${basename}${TMP}-${ARGV2}) string(REGEX REPLACE "\\." "_" TMP ${${PREFIX}_LIBNAMES}) set(${PREFIX}_LIBNAMES ${${PREFIX}_LIBNAMES} ${TMP}) endif(${ARGC} GREATER 2) find_library(${PREFIX}_LIBRARY NAMES ${${PREFIX}_LIBNAMES} PATHS ${${PREFIX}_PKGCONF_LIBRARY_DIRS} ) endmacro(libfind_library) neovim-0.2.2/cmake/LuaHelpers.cmake000066400000000000000000000021461320401574200171370ustar00rootroot00000000000000# # Functions to help checking for a Lua interpreter # # Check if a module is available in Lua function(check_lua_module LUA_PRG_PATH MODULE RESULT_VAR) execute_process(COMMAND ${LUA_PRG_PATH} -e "require('${MODULE}')" RESULT_VARIABLE module_missing ERROR_QUIET) if(module_missing) set(${RESULT_VAR} False PARENT_SCOPE) else() set(${RESULT_VAR} True PARENT_SCOPE) endif() endfunction() # Check Lua interpreter for dependencies function(check_lua_deps LUA_PRG_PATH MODULES RESULT_VAR) # Check if the lua interpreter at the given path # satisfies all Neovim dependencies message(STATUS "Checking Lua interpreter ${LUA_PRG_PATH}") if(NOT EXISTS ${LUA_PRG_PATH}) message(STATUS "[${LUA_PRG_PATH}] file not found") endif() foreach(module ${MODULES}) check_lua_module(${LUA_PRG_PATH} ${module} has_module) if(NOT has_module) message(STATUS "[${LUA_PRG_PATH}] The '${module}' lua package is required for building Neovim") set(${RESULT_VAR} False PARENT_SCOPE) return() endif() endforeach() set(${RESULT_VAR} True PARENT_SCOPE) endfunction() neovim-0.2.2/cmake/PreventInTreeBuilds.cmake000066400000000000000000000015471320401574200207740ustar00rootroot00000000000000function(PreventInTreeBuilds) get_filename_component(srcdir "${CMAKE_SOURCE_DIR}" REALPATH) get_filename_component(bindir "${CMAKE_BINARY_DIR}" REALPATH) if("${srcdir}" STREQUAL "${bindir}") message("") message("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!") message("Neovim doesn't support in-tree builds. It's recommended that you") message("use a build/ subdirectory:") message(" mkdir build") message(" cd build") message(" cmake ..") message("") message("Make sure to cleanup some CMake artifacts from this failed build") message("with:") message(" rm -rf CMakeFiles CMakeCache.txt") message("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!") message("") message(FATAL_ERROR "Stopping build.") endif() endfunction() PreventInTreeBuilds() neovim-0.2.2/cmake/RunLuacheck.cmake000066400000000000000000000012141320401574200172720ustar00rootroot00000000000000set(LUACHECK_ARGS -q "${LUAFILES_DIR}") if(DEFINED IGNORE_PATTERN) list(APPEND LUACHECK_ARGS --exclude-files "${LUAFILES_DIR}/${IGNORE_PATTERN}") endif() if(DEFINED CHECK_PATTERN) list(APPEND LUACHECK_ARGS --include-files "${LUAFILES_DIR}/${CHECK_PATTERN}") endif() if(DEFINED READ_GLOBALS) list(APPEND LUACHECK_ARGS --read-globals "${READ_GLOBALS}") endif() execute_process( COMMAND "${LUACHECK_PRG}" ${LUACHECK_ARGS} WORKING_DIRECTORY "${LUAFILES_DIR}" ERROR_VARIABLE err RESULT_VARIABLE res ) if(NOT res EQUAL 0) message(STATUS "Output to stderr:\n${err}") message(FATAL_ERROR "Linting tests failed with error: ${res}.") endif() neovim-0.2.2/cmake/RunMsgfmt.cmake000066400000000000000000000003531320401574200170130ustar00rootroot00000000000000set(ENV{OLD_PO_FILE_INPUT} yes) execute_process( COMMAND ${MSGFMT_PRG} -o ${MO_FILE} ${PO_FILE} ERROR_VARIABLE err RESULT_VARIABLE res) if(NOT res EQUAL 0) message(FATAL_ERROR "msgfmt failed to run correctly: ${err}") endif() neovim-0.2.2/cmake/RunMsgmerge.cmake000066400000000000000000000004751320401574200173310ustar00rootroot00000000000000set(ENV{OLD_PO_FILE_INPUT} yes) set(ENV{OLD_PO_FILE_OUTPUT} yes) execute_process( COMMAND ${MSGMERGE_PRG} -q --update --backup=none --sort-by-file ${PO_FILE} ${POT_FILE} ERROR_VARIABLE err RESULT_VARIABLE res) if(NOT res EQUAL 0) message(FATAL_ERROR "msgmerge failed to run correctly: ${err}") endif() neovim-0.2.2/cmake/RunTests.cmake000066400000000000000000000031661320401574200166650ustar00rootroot00000000000000# Set LC_ALL to meet expectations of some locale-sensitive tests. set(ENV{LC_ALL} "en_US.UTF-8") set(ENV{VIMRUNTIME} ${WORKING_DIR}/runtime) set(ENV{NVIM_RPLUGIN_MANIFEST} ${WORKING_DIR}/Xtest_rplugin_manifest) set(ENV{XDG_CONFIG_HOME} ${WORKING_DIR}/Xtest_xdg/config) set(ENV{XDG_DATA_HOME} ${WORKING_DIR}/Xtest_xdg/share) if(NOT DEFINED ENV{NVIM_LOG_FILE}) set(ENV{NVIM_LOG_FILE} ${WORKING_DIR}/.nvimlog) endif() if(NVIM_PRG) set(ENV{NVIM_PRG} "${NVIM_PRG}") endif() if(DEFINED ENV{TEST_FILE}) set(TEST_PATH "$ENV{TEST_FILE}") else() set(TEST_PATH "${TEST_DIR}/${TEST_TYPE}") endif() if(BUSTED_OUTPUT_TYPE STREQUAL junit) set(EXTRA_ARGS OUTPUT_FILE ${BUILD_DIR}/${TEST_TYPE}test-junit.xml) endif() if(DEFINED ENV{TEST_TAG}) set(TEST_TAG "--tags=$ENV{TEST_TAG}") endif() if(DEFINED ENV{TEST_FILTER}) set(TEST_TAG "--filter=$ENV{TEST_FILTER}") endif() execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${WORKING_DIR}/Xtest-tmpdir) set(ENV{TMPDIR} ${WORKING_DIR}/Xtest-tmpdir) set(ENV{SYSTEM_NAME} ${SYSTEM_NAME}) execute_process( COMMAND ${BUSTED_PRG} ${TEST_TAG} ${TEST_FILTER} -v -o ${BUSTED_OUTPUT_TYPE} --lua=${LUA_PRG} --lazy --helper=${TEST_DIR}/${TEST_TYPE}/preload.lua --lpath=${BUILD_DIR}/?.lua ${TEST_PATH} WORKING_DIRECTORY ${WORKING_DIR} ERROR_VARIABLE err RESULT_VARIABLE res ${EXTRA_ARGS}) file(REMOVE ${WORKING_DIR}/Xtest_rplugin_manifest) file(REMOVE_RECURSE ${WORKING_DIR}/Xtest_xdg) file(REMOVE_RECURSE ${WORKING_DIR}/Xtest-tmpdir) if(NOT res EQUAL 0) message(STATUS "Output to stderr:\n${err}") message(FATAL_ERROR "Running ${TEST_TYPE} tests failed with error: ${res}.") endif() neovim-0.2.2/cmake/RunXgettext.cmake000066400000000000000000000006001320401574200173650ustar00rootroot00000000000000set(ENV{OLD_PO_FILE_INPUT} yes) set(ENV{OLD_PO_FILE_OUTPUT} yes) list(SORT SOURCES) execute_process( COMMAND ${XGETTEXT_PRG} -o ${POT_FILE} --default-domain=nvim --add-comments --keyword=_ --keyword=N_ -D ${SEARCH_DIR} ${SOURCES} ERROR_VARIABLE err RESULT_VARIABLE res) if(NOT res EQUAL 0) message(FATAL_ERROR "xgettext failed to run correctly: ${err}") endif() neovim-0.2.2/cmake/WindowsDllCopy.cmake000066400000000000000000000017471320401574200200220ustar00rootroot00000000000000# In Windows we need to find dependency DLLs and install them along with our # binaries. This script uses the following variables: # # - BINARY: The binary file whose dependencies need to be installed # - DST: The destination path # - CMAKE_PREFIX_PATH: A list of directories to search for dependencies if(NOT DEFINED BINARY) message(FATAL_ERROR "Missing required argument -DBINARY=") endif() if(NOT DEFINED DST) message(FATAL_ERROR "Missing required arguments -DDST=") endif() if(NOT DEFINED CMAKE_PREFIX_PATH) message(FATAL_ERROR "Missing required arguments -DCMAKE_PREFIX_PATH=") endif() include(GetPrerequisites) get_prerequisites(${BINARY} DLLS 1 1 "" "${CMAKE_PREFIX_PATH}") foreach(DLL_NAME ${DLLS}) find_program(DLL_PATH ${DLL_NAME}) if(NOT DLL_PATH) message(FATAL_ERROR "Unable to find dependency ${DLL_NAME}") endif() message("Copying ${DLL_NAME} to ${DST}") execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${DLL_PATH} ${DST}) unset(DLL_PATH CACHE) endforeach() neovim-0.2.2/cmake/i386-linux-gnu.toolchain.cmake000066400000000000000000000002761320401574200214710ustar00rootroot00000000000000set(CMAKE_SYSTEM_PROCESSOR i386) set(CMAKE_SYSTEM_NAME Linux) set(CMAKE_SYSTEM_VERSION gnu) if(NOT ${CMAKE_C_COMPILER}) set(CMAKE_C_COMPILER gcc) endif() set(CMAKE_C_COMPILER_ARG1 "-m32") neovim-0.2.2/cmake/mingw32-w64-cross-travis.toolchain.cmake000066400000000000000000000031601320401574200234100ustar00rootroot00000000000000# # Mingw-w64 cross compiler toolchain # # - The usual CMAKE variables will point to the cross compiler # - HOST_EXE_LINKER, HOST_C_COMPILER, HOST_EXE_LINKER_FLAGS, # HOST_C_FLAGS point to a host compiler # set(MINGW_TRIPLET i686-w64-mingw32) # For x86_64 use #set(MINGW_TRIPLET x86_64-w64-mingw32) # The location of your toolchain sys-root set(MINGW_PREFIX_PATH /opt/mingw32/${MINGW_TRIPLET}/) # or sometimes like this #set(MINGW_PREFIX_PATH /usr/${MINGW_TRIPLET}/sys-root) # the name of the target operating system set(CMAKE_SYSTEM_NAME Windows) # which compilers to use for C and C++ set(CMAKE_C_COMPILER ${MINGW_TRIPLET}-gcc) set(CMAKE_CXX_COMPILER ${MINGW_TRIPLET}-g++) set(CMAKE_RC_COMPILER ${MINGW_TRIPLET}-windres) set(CMAKE_C_COMPILER ${MINGW_TRIPLET}-gcc) set(CMAKE_CXX_COMPILER ${MINGW_TRIPLET}-g++) set(CMAKE_RC_COMPILER ${MINGW_TRIPLET}-windres) # Where is the target environment located set(CMAKE_FIND_ROOT_PATH "${MINGW_PREFIX_PATH}/mingw") # adjust the default behaviour of the FIND_XXX() commands: # search headers and libraries in the target environment, search # programs in the host environment set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) set(CROSS_TARGET ${MINGW_TRIPLET}) # We need a host compiler too - assuming mildly sane Unix # defaults here set(HOST_C_COMPILER cc) set(HOST_EXE_LINKER ld) if (MINGW_TRIPLET MATCHES "^x86_64") set(HOST_C_FLAGS) set(HOST_EXE_LINKER_FLAGS) else() # In 32 bits systems have the HOST compiler generate 32 bits binaries set(HOST_C_FLAGS -m32) set(HOST_EXE_LINKER_FLAGS -m32) endif() neovim-0.2.2/codecov.yml000066400000000000000000000005471320401574200151610ustar00rootroot00000000000000codecov: notify: require_ci_to_pass: yes ci: - appveyor - travis - !neovim-qb.szakmeister.net coverage: precision: 2 round: down range: "70...100" status: project: yes patch: yes changes: no parsers: gcov: branch_detection: conditional: yes loop: yes method: no macro: no comment: off neovim-0.2.2/config/000077500000000000000000000000001320401574200142535ustar00rootroot00000000000000neovim-0.2.2/config/CMakeLists.txt000066400000000000000000000117211320401574200170150ustar00rootroot00000000000000include(CheckTypeSize) include(CheckSymbolExists) include(CheckFunctionExists) include(CheckIncludeFiles) include(CheckCSourceRuns) include(CheckCSourceCompiles) check_type_size("int" SIZEOF_INT) check_type_size("long" SIZEOF_LONG) check_type_size("intmax_t" SIZEOF_INTMAX_T) check_type_size("size_t" SIZEOF_SIZE_T) check_type_size("long long" SIZEOF_LONG_LONG) check_type_size("void *" SIZEOF_VOID_PTR) check_symbol_exists(_NSGetEnviron crt_externs.h HAVE__NSGETENVIRON) # Headers check_include_files(iconv.h HAVE_ICONV_H) check_include_files(langinfo.h HAVE_LANGINFO_H) check_include_files(locale.h HAVE_LOCALE_H) check_include_files(pwd.h HAVE_PWD_H) check_include_files(strings.h HAVE_STRINGS_H) check_include_files(sys/wait.h HAVE_SYS_WAIT_H) if(NOT HAVE_SYS_WAIT_H AND UNIX) # See if_cscope.c message(SEND_ERROR "header sys/wait.h is required for Unix") endif() check_include_files(sys/utsname.h HAVE_SYS_UTSNAME_H) check_include_files(termios.h HAVE_TERMIOS_H) check_include_files(utime.h HAVE_UTIME_H) check_include_files(sys/uio.h HAVE_SYS_UIO_H) # Functions check_function_exists(fseeko HAVE_FSEEKO) check_function_exists(getpwent HAVE_GETPWENT) check_function_exists(getpwnam HAVE_GETPWNAM) check_function_exists(getpwuid HAVE_GETPWUID) check_function_exists(uv_translate_sys_error HAVE_UV_TRANSLATE_SYS_ERROR) check_function_exists(readv HAVE_READV) if(Iconv_FOUND) set(HAVE_ICONV 1) endif() if(JEMALLOC_FOUND) set(HAVE_JEMALLOC 1) endif() check_function_exists(_putenv_s HAVE_PUTENV_S) if(WIN32 AND NOT HAVE_PUTENV_S) message(SEND_ERROR "_putenv_s() function not found on your system.") endif() check_function_exists(opendir HAVE_OPENDIR) check_function_exists(readlink HAVE_READLINK) check_function_exists(setenv HAVE_SETENV) if(UNIX AND NOT HAVE_SETENV) message(SEND_ERROR "setenv() function not found on your system.") endif() check_function_exists(unsetenv HAVE_UNSETENV) check_function_exists(setpgid HAVE_SETPGID) check_function_exists(setsid HAVE_SETSID) check_function_exists(sigaction HAVE_SIGACTION) check_function_exists(strcasecmp HAVE_STRCASECMP) check_function_exists(strncasecmp HAVE_STRNCASECMP) check_function_exists(utime HAVE_UTIME) check_function_exists(utimes HAVE_UTIMES) # Symbols check_symbol_exists(FD_CLOEXEC "fcntl.h" HAVE_FD_CLOEXEC) if(HAVE_LANGINFO_H) check_symbol_exists(CODESET "langinfo.h" HAVE_NL_LANGINFO_CODESET) endif() check_include_files("endian.h" HAVE_ENDIAN_H) check_include_files("sys/endian.h" HAVE_SYS_ENDIAN_H) set(ENDIAN_INCLUDE_FILE "endian.h") if(HAVE_SYS_ENDIAN_H AND NOT HAVE_ENDIAN_H) set(ENDIAN_INCLUDE_FILE "sys/endian.h") endif() set(SI "#include \n") set(MS "int main(int argc,char**argv)\n{\n uint64_t i=0x0102030405060708ULL;") set(ME "}") check_c_source_compiles(" #define _BSD_SOURCE 1 #define _DEFAULT_SOURCE 1 ${SI} #include <${ENDIAN_INCLUDE_FILE}> #ifndef be64toh # error No be64toh macros #endif ${MS} uint64_t j = be64toh(i); return (j == 0); // j must not be zero ${ME}" HAVE_BE64TOH_MACROS) if(NOT "${HAVE_BE64TOH_MACROS}") check_function_exists(be64toh HAVE_BE64TOH_FUNC) endif() if("${HAVE_BE64TOH_MACROS}" OR "${HAVE_BE64TOH_FUNC}") set(HAVE_BE64TOH 1) endif() if (NOT "${HAVE_BE64TOH}") if (NOT "${CMAKE_CROSSCOMPILING}") # It is safe to make ORDER_BIG_ENDIAN not defined if # - HAVE_BE64TOH is true. In this case be64toh will be used unconditionally in # any case and ORDER_BIG_ENDIAN will not be examined. # - CMAKE_CROSSCOMPILING *and* HAVE_BE64TOH are both false. In this case # be64toh function which uses cycle and arithmetic operations is used which # will work regardless of endianess. Function is sub-optimal though. check_c_source_runs(" ${SI} ${MS} char *s = (char *) &i; return ( s[0] == 0x01 && s[1] == 0x02 && s[2] == 0x03 && s[3] == 0x04 && s[4] == 0x05 && s[5] == 0x06 && s[6] == 0x07 && s[7] == 0x08) ? 0 : 1; ${ME}" ORDER_BIG_ENDIAN) endif() endif() # generate configuration header and update include directories configure_file ( "${PROJECT_SOURCE_DIR}/config/config.h.in" "${PROJECT_BINARY_DIR}/config/auto/config.h" ) # generate version definitions configure_file ( "${PROJECT_SOURCE_DIR}/config/versiondef.h.in" "${PROJECT_BINARY_DIR}/config/auto/versiondef.h" ) # generate pathdef.c find_program(WHOAMI_PROG whoami) find_program(HOSTNAME_PROG hostname) if (DEFINED ENV{USERNAME}) set(USERNAME $ENV{USERNAME}) elseif (NOT DEFINED USERNAME AND EXISTS ${WHOAMI_PROG}) execute_process(COMMAND ${WHOAMI_PROG} OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE USERNAME) endif() if (DEFINED ENV{HOSTNAME}) set(HOSTNAME $ENV{HOSTNAME}) elseif (EXISTS ${HOSTNAME_PROG}) execute_process(COMMAND ${HOSTNAME_PROG} OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE HOSTNAME) endif() configure_file ( "${PROJECT_SOURCE_DIR}/config/pathdef.c.in" "${PROJECT_BINARY_DIR}/config/auto/pathdef.c" ESCAPE_QUOTES) neovim-0.2.2/config/config.h.in000066400000000000000000000032401320401574200162750ustar00rootroot00000000000000#ifndef AUTO_CONFIG_H #define AUTO_CONFIG_H #cmakedefine DEBUG #define SIZEOF_INT @SIZEOF_INT@ #define SIZEOF_LONG @SIZEOF_LONG@ #if @SIZEOF_VOID_PTR@ == 8 #define ARCH_64 #elif @SIZEOF_VOID_PTR@ == 4 #define ARCH_32 #endif #define PROJECT_NAME "@PROJECT_NAME@" #define LOCALE_INSTALL_DIR "@CMAKE_INSTALL_FULL_LOCALEDIR@" #cmakedefine HAVE__NSGETENVIRON #cmakedefine HAVE_FD_CLOEXEC #cmakedefine HAVE_FSEEKO #cmakedefine HAVE_GETPWENT #cmakedefine HAVE_GETPWNAM #cmakedefine HAVE_GETPWUID #cmakedefine HAVE_ICONV #cmakedefine HAVE_ICONV_H #cmakedefine HAVE_LANGINFO_H #cmakedefine HAVE_LOCALE_H #cmakedefine HAVE_NL_LANGINFO_CODESET #cmakedefine HAVE_NL_MSG_CAT_CNTR #cmakedefine HAVE_PUTENV_S #cmakedefine HAVE_PWD_H #cmakedefine HAVE_READLINK #cmakedefine HAVE_UV_TRANSLATE_SYS_ERROR // TODO: add proper cmake check // #define HAVE_SELINUX 1 #cmakedefine HAVE_SETENV #cmakedefine HAVE_UNSETENV #cmakedefine HAVE_SETPGID #cmakedefine HAVE_SETSID #cmakedefine HAVE_SIGACTION #cmakedefine HAVE_STRCASECMP #cmakedefine HAVE_STRINGS_H #cmakedefine HAVE_STRNCASECMP #cmakedefine HAVE_SYS_UTSNAME_H #cmakedefine HAVE_SYS_WAIT_H #cmakedefine HAVE_TERMIOS_H #cmakedefine HAVE_UTIME #cmakedefine HAVE_UTIME_H #cmakedefine HAVE_UTIMES #cmakedefine HAVE_WORKING_LIBINTL #cmakedefine UNIX #cmakedefine USE_FNAME_CASE #cmakedefine HAVE_SYS_UIO_H #ifdef HAVE_SYS_UIO_H #cmakedefine HAVE_READV # ifndef HAVE_READV # undef HAVE_SYS_UIO_H # endif #endif #cmakedefine FEAT_TUI #ifndef UNIT_TESTING #cmakedefine HAVE_JEMALLOC #endif #cmakedefine HAVE_BE64TOH #cmakedefine ORDER_BIG_ENDIAN #define ENDIAN_INCLUDE_FILE <@ENDIAN_INCLUDE_FILE@> #cmakedefine HAVE_EXECINFO_BACKTRACE #endif // AUTO_CONFIG_H neovim-0.2.2/config/pathdef.c.in000066400000000000000000000003661320401574200164440ustar00rootroot00000000000000#include "${PROJECT_SOURCE_DIR}/src/nvim/vim.h" char *default_vim_dir = "${CMAKE_INSTALL_FULL_DATAROOTDIR}/nvim"; char *default_vimruntime_dir = ""; char_u *compiled_user = (char_u *)"${USERNAME}"; char_u *compiled_sys = (char_u *)"${HOSTNAME}"; neovim-0.2.2/config/versiondef.h.in000066400000000000000000000011321320401574200171720ustar00rootroot00000000000000#ifndef AUTO_VERSIONDEF_H #define AUTO_VERSIONDEF_H #define NVIM_VERSION_MAJOR @NVIM_VERSION_MAJOR@ #define NVIM_VERSION_MINOR @NVIM_VERSION_MINOR@ #define NVIM_VERSION_PATCH @NVIM_VERSION_PATCH@ #define NVIM_VERSION_PRERELEASE "@NVIM_VERSION_PRERELEASE@" #cmakedefine NVIM_VERSION_MEDIUM "@NVIM_VERSION_MEDIUM@" #define NVIM_API_LEVEL @NVIM_API_LEVEL@ #define NVIM_API_LEVEL_COMPAT @NVIM_API_LEVEL_COMPAT@ #define NVIM_API_PRERELEASE @NVIM_API_PRERELEASE@ #define NVIM_VERSION_CFLAGS "@NVIM_VERSION_CFLAGS@" #define NVIM_VERSION_BUILD_TYPE "@NVIM_VERSION_BUILD_TYPE@" #endif // AUTO_VERSIONDEF_H neovim-0.2.2/contrib/000077500000000000000000000000001320401574200144465ustar00rootroot00000000000000neovim-0.2.2/contrib/YouCompleteMe/000077500000000000000000000000001320401574200171755ustar00rootroot00000000000000neovim-0.2.2/contrib/YouCompleteMe/README.md000066400000000000000000000013371320401574200204600ustar00rootroot00000000000000# YouCompleteMe Integration ## What is this? This provides the code necessary to configure vim's YCM plugin to provide C semantic support (completion, go-to-definition, etc) for developers working on the Neovim project. ## Installation ### Step 1 Install [YouCompleteMe](https://github.com/Valloric/YouCompleteMe). ### Step 2 ```bash cp contrib/YouCompleteMe/ycm_extra_conf.py .ycm_extra_conf.py echo .ycm_extra_conf.py >> .git/info/exclude make ``` Tip: to improve source code navigation, add something like this to your nvim configuration: ```vim au FileType c,cpp nnoremap :YcmCompleter GoTo ``` And use `ctrl+]` when the cursor is positioned in a symbol to quickly jump to a definition or declaration. neovim-0.2.2/contrib/YouCompleteMe/ycm_extra_conf.py000066400000000000000000000042561320401574200225560ustar00rootroot00000000000000# .ycm_extra_conf.py for nvim source code. import os import ycm_core def DirectoryOfThisScript(): return os.path.dirname(os.path.abspath(__file__)) def GetDatabase(): compilation_database_folder = os.path.join(DirectoryOfThisScript(), 'build') if os.path.exists(compilation_database_folder): return ycm_core.CompilationDatabase(compilation_database_folder) return None def GetCompilationInfoForFile(filename): database = GetDatabase() if not database: return None return database.GetCompilationInfoForFile(filename) # It seems YCM does not resolve directories correctly. This function will # adjust paths in the compiler flags to be absolute def FixDirectories(args, compiler_working_dir): def adjust_path(path): return os.path.abspath(os.path.join(compiler_working_dir, path)) adjust_next_arg = False new_args = [] for arg in args: if adjust_next_arg: arg = adjust_path(arg) adjust_next_arg = False else: for dir_flag in ['-I', '-isystem', '-o', '-c']: if arg.startswith(dir_flag): if arg != dir_flag: # flag and path are concatenated in same arg path = arg[len(dir_flag):] new_path = adjust_path(path) arg = '{0}{1}'.format(dir_flag, new_path) else: # path is specified in next argument adjust_next_arg = True new_args.append(arg) return new_args def FlagsForFile(filename): compilation_info = GetCompilationInfoForFile(filename) if not compilation_info: return None # Add flags not needed for clang-the-binary, # but needed for libclang-the-library (YCM uses this last one). flags = FixDirectories((list(compilation_info.compiler_flags_) if compilation_info.compiler_flags_ else []), compilation_info.compiler_working_dir_) extra_flags = ['-Wno-newline-eof'] return { 'flags': flags + extra_flags, 'do_cache': True } neovim-0.2.2/contrib/doxygen/000077500000000000000000000000001320401574200161235ustar00rootroot00000000000000neovim-0.2.2/contrib/doxygen/customdoxygen.css000066400000000000000000000263241320401574200215540ustar00rootroot00000000000000 /* * Title, should be H1 */ .title { font-family: 'Lato', sans-serif; font-size: 2em; margin: 0.67em 0 0; } dt { font-weight: bold; } div.multicol { -moz-column-gap: 1em; -webkit-column-gap: 1em; -moz-column-count: 3; -webkit-column-count: 3; } div.qindex, div.navtab { background-color: #EBEFF6; border: 1px solid #A3B4D7; text-align: center; } div.line { font-family: monospace, fixed; min-height: 13px; line-height: 1.0; text-wrap: unrestricted; white-space: -moz-pre-wrap; /* Moz */ white-space: -pre-wrap; /* Opera 4-6 */ white-space: -o-pre-wrap; /* Opera 7 */ white-space: pre-wrap; /* CSS3 */ word-wrap: break-word; /* IE 5.5+ */ text-indent: -53px; padding-left: 53px; padding-bottom: 0px; margin: 0px; } span.lineno { padding-right: 4px; text-align: right; border-right: 2px solid #0F0; white-space: pre; } /* @group Code Colorization */ span.keyword { color: #008000 } span.keywordtype { color: #604020 } span.keywordflow { color: #e08000 } span.comment { color: #800000 } span.preprocessor { color: #806020 } span.stringliteral { color: #002080 } span.charliteral { color: #008080 } span.vhdldigit { color: #ff00ff } span.vhdlchar { color: #000000 } span.vhdlkeyword { color: #700070 } span.vhdllogic { color: #ff0000 } blockquote { background-color: #F7F8FB; border-left: 2px solid #9CAFD4; margin: 0 24px 0 4px; padding: 0 12px 0 16px; } /* @end */ hr { height: 0px; border: none; display: none; } dl { padding: 0 0 0 10px; } /* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug */ dl.section { margin-left: 0px; padding-left: 0px; } dl.note { margin-left:-7px; padding-left: 3px; border-left:4px solid; border-color: #D0C000; } dl.warning, dl.attention { margin-left:-7px; padding-left: 3px; border-left:4px solid; border-color: #FF0000; } dl.pre, dl.post, dl.invariant { margin-left:-7px; padding-left: 3px; border-left:4px solid; border-color: #00D000; } dl.deprecated { margin-left:-7px; padding-left: 3px; border-left:4px solid; border-color: #505050; } dl.todo { margin-left:-7px; padding-left: 3px; border-left:4px solid; border-color: #00C0E0; } dl.test { margin-left:-7px; padding-left: 3px; border-left:4px solid; border-color: #3030E0; } dl.bug { margin-left:-7px; padding-left: 3px; border-left:4px solid; border-color: #C08050; } dl.section dd { margin-bottom: 6px; } /* tooltip related style info */ .ttc { position: absolute; display: none; } #powerTip { cursor: default; white-space: nowrap; background-color: white; border: 1px solid gray; border-radius: 4px 4px 4px 4px; box-shadow: 1px 1px 7px gray; display: none; font-size: smaller; max-width: 80%; opacity: 0.9; padding: 1ex 1em 1em; position: absolute; z-index: 2147483647; } #powerTip div.ttdoc { color: grey; font-style: italic; } #powerTip div.ttname a { font-weight: bold; } #powerTip div.ttname { font-weight: bold; } #powerTip div.ttdeci { color: #006318; } #powerTip div { margin: 0px; padding: 0px; font: 12px/16px Roboto,sans-serif; } #powerTip:before, #powerTip:after { content: ""; position: absolute; margin: 0px; } #powerTip.n:after, #powerTip.n:before, #powerTip.s:after, #powerTip.s:before, #powerTip.w:after, #powerTip.w:before, #powerTip.e:after, #powerTip.e:before, #powerTip.ne:after, #powerTip.ne:before, #powerTip.se:after, #powerTip.se:before, #powerTip.nw:after, #powerTip.nw:before, #powerTip.sw:after, #powerTip.sw:before { border: solid transparent; content: " "; height: 0; width: 0; position: absolute; } #powerTip.n:after, #powerTip.s:after, #powerTip.w:after, #powerTip.e:after, #powerTip.nw:after, #powerTip.ne:after, #powerTip.sw:after, #powerTip.se:after { border-color: rgba(255, 255, 255, 0); } #powerTip.n:before, #powerTip.s:before, #powerTip.w:before, #powerTip.e:before, #powerTip.nw:before, #powerTip.ne:before, #powerTip.sw:before, #powerTip.se:before { border-color: rgba(128, 128, 128, 0); } #powerTip.n:after, #powerTip.n:before, #powerTip.ne:after, #powerTip.ne:before, #powerTip.nw:after, #powerTip.nw:before { top: 100%; } #powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after { border-top-color: #ffffff; border-width: 10px; margin: 0px -10px; } #powerTip.n:before { border-top-color: #808080; border-width: 11px; margin: 0px -11px; } #powerTip.n:after, #powerTip.n:before { left: 50%; } #powerTip.nw:after, #powerTip.nw:before { right: 14px; } #powerTip.ne:after, #powerTip.ne:before { left: 14px; } #powerTip.s:after, #powerTip.s:before, #powerTip.se:after, #powerTip.se:before, #powerTip.sw:after, #powerTip.sw:before { bottom: 100%; } #powerTip.s:after, #powerTip.se:after, #powerTip.sw:after { border-bottom-color: #ffffff; border-width: 10px; margin: 0px -10px; } #powerTip.s:before, #powerTip.se:before, #powerTip.sw:before { border-bottom-color: #808080; border-width: 11px; margin: 0px -11px; } #powerTip.s:after, #powerTip.s:before { left: 50%; } #powerTip.sw:after, #powerTip.sw:before { right: 14px; } #powerTip.se:after, #powerTip.se:before { left: 14px; } #powerTip.e:after, #powerTip.e:before { left: 100%; } #powerTip.e:after { border-left-color: #ffffff; border-width: 10px; top: 50%; margin-top: -10px; } #powerTip.e:before { border-left-color: #808080; border-width: 11px; top: 50%; margin-top: -11px; } #powerTip.w:after, #powerTip.w:before { right: 100%; } #powerTip.w:after { border-right-color: #ffffff; border-width: 10px; top: 50%; margin-top: -10px; } #powerTip.w:before { border-right-color: #808080; border-width: 11px; top: 50%; margin-top: -11px; } /* * Centered container for all content */ div.contents, div.header > *, ul.tablist, .navpath ul { margin:0 15px; } @media (min-width: 568px) { div.contents, div.header > *, ul.tablist, .navpath ul { margin: 0 auto; width: 90%; max-width: 1200px; } } /* * padding inside content */ div.contents > * { padding-top: 8px; padding-bottom: 8px; } @media (min-width: 568px) { div.contents > h2, div.contents > div.textblock, div.contents > div.memitem, div.contents > table.memberdecls h2, div.contents > p { padding-top: 30px; } } div.contents h2 { margin-top: 0px; } div.summary { display: none; } /* * Tabs * * Based on doxygen tabs.css */ .tabs, .tabs2, .tabs3 { width: 100%; background-color: #f4f4f4; border-top: solid 1px #ececec; } .tablist { margin: 0; padding: 0; display: table; } .tablist li { float: left; display: table-cell; line-height: 36px; list-style: none; } .tablist a { display: block; padding: 0 30px 0 0; } .tabs3 .tablist a { padding: 0 20px 0 0; } .tablist li.current a { color: #54a23d; } /* * Navpath */ .navpath ul { padding:20px 0px; } .navpath li { list-style-type:none; padding-right: 10px; float:left; } .navpath li.navelem a { padding-left: 10px; } .navpath li.navelem:before { content: "/"; color: #777; } /* * Member * * Styles for detailed member documentation */ .memitem { border-top: solid 1px #c9c9c9; } .memname { font-weight: bold; font-family: monospace; } td.memname { color: #54a23d; } .memname td { vertical-align: bottom; } .memproto, dl.reflist dt { font-weight: bold; } .memdoc, dl.reflist dd { } /* * Parameters */ .paramkey { text-align: right; } .paramtype { white-space: nowrap; } .paramname { color: #aa0e0e; white-space: nowrap; } .paramname em { font-style: normal; } .params, .retval, .exception, .tparams { margin-left: 0px; padding-left: 0px; } .params td { padding-right: 1em; padding-bottom: 0.5em; } .params .paramname, .retval .paramname { font-weight: bold; vertical-align: top; } .params .paramtype { font-style: italic; vertical-align: top; } /* * Inline Label etc. */ table.mlabels { border-spacing: 0px; } td.mlabels-left { width: 100%; padding: 0px; } td.mlabels-right { vertical-align: bottom; padding: 0px; white-space: nowrap; } span.mlabels { margin-left: 8px; } /* * Member Descriptions */ table.memberdecls { font-family: monospace; border-spacing: 0px; padding: 0px; } .memSeparator { line-height: 1px; margin: 0px; padding: 0 0 0.2em 0; } .memItemLeft, .memTemplItemLeft { white-space: nowrap; } .memItemRight { width: 100%; } .memTemplParams { color: #4665A2; white-space: nowrap; font-size: 80%; } /* * Fieldtable (Enums) */ .fieldtable td, .fieldtable th { padding: 0 1em 0.2em 0; } .fieldtable td.fieldtype, .fieldtable td.fieldname { white-space: nowrap; vertical-align: top; } /* * Directory */ .directory table { border-collapse:collapse; } .directory td { margin: 0px; padding: 0px; vertical-align: top; } .directory td.entry { white-space: nowrap; padding-right: 6px; padding-top: 3px; } .directory td.entry a { outline:none; } .directory td.entry a img { border: none; } .directory td.desc { width: 100%; padding-left: 6px; padding-right: 6px; padding-top: 3px; } .directory tr.even { padding-left: 6px; } .directory img { vertical-align: -30%; } .directory .levels { white-space: nowrap; width: 100%; text-align: right; } .directory .levels span { cursor: pointer; padding-left: 2px; padding-right: 2px; color: #3c92d1; } .arrow { color: #9CAFD4; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; cursor: pointer; font-size: 80%; display: inline-block; width: 16px; height: 22px; } .icon { font-family: Arial, Helvetica; font-weight: bold; font-size: 12px; height: 14px; width: 16px; display: inline-block; background-color: #54a23d; color: white; text-align: center; border-radius: 4px; margin-left: 2px; margin-right: 2px; } .icona { width: 24px; height: 22px; display: inline-block; } .iconfopen { width: 24px; height: 18px; margin-bottom: 4px; background-image:url('ftv2folderopen.png'); background-position: 0px 0px; background-repeat: repeat-y; vertical-align:top; display: inline-block; } .iconfclosed { width: 24px; height: 18px; margin-bottom: 4px; background-image:url('ftv2folderclosed.png'); background-position: 0px 0px; background-repeat: repeat-y; vertical-align:top; display: inline-block; } .icondoc { width: 24px; height: 18px; margin-bottom: 4px; background-image:url('ftv2doc.png'); background-position: 0px -1px; background-repeat: repeat-y; vertical-align:top; display: inline-block; } /* * Data Structure Index * * Hardcoded style attribute */ .contents > table[style] { margin: 20px auto !important; } /* * Search Box */ #MSearchBox { right: 4%; } @media print { #top { display: none; } #side-nav { display: none; } #nav-path { display: none; } body { overflow:visible; } h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } .summary { display: none; } .memitem { page-break-inside: avoid; } #doc-content { margin-left:0 !important; height:auto !important; width:auto !important; overflow:inherit; display:inline; } } neovim-0.2.2/contrib/doxygen/extra.css000066400000000000000000000275021320401574200177660ustar00rootroot00000000000000/*! normalize.css v3.0.0 | MIT License | git.io/normalize */ /** * 1. Set default font family to sans-serif. * 2. Prevent iOS text size adjust after orientation change, without disabling * user zoom. */ html { font-family: sans-serif; /* 1 */ -ms-text-size-adjust: 100%; /* 2 */ -webkit-text-size-adjust: 100%; /* 2 */ } /** * Remove default margin. */ body { margin: 0; } /* HTML5 display definitions ========================================================================== */ /** * Correct `block` display not defined in IE 8/9. */ article, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section, summary { display: block; } /** * 1. Correct `inline-block` display not defined in IE 8/9. * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. */ audio, canvas, progress, video { display: inline-block; /* 1 */ vertical-align: baseline; /* 2 */ } /** * Prevent modern browsers from displaying `audio` without controls. * Remove excess height in iOS 5 devices. */ audio:not([controls]) { display: none; height: 0; } /** * Address `[hidden]` styling not present in IE 8/9. * Hide the `template` element in IE, Safari, and Firefox < 22. */ [hidden], template { display: none; } /* Links ========================================================================== */ /** * Remove the gray background color from active links in IE 10. */ a { background: transparent; } /** * Improve readability when focused and also mouse hovered in all browsers. */ a:active, a:hover { outline: 0; } /* Text-level semantics ========================================================================== */ /** * Address styling not present in IE 8/9, Safari 5, and Chrome. */ abbr[title] { border-bottom: 1px dotted; } /** * Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome. */ b, strong { font-weight: bold; } /** * Address styling not present in Safari 5 and Chrome. */ dfn { font-style: italic; } /** * Address variable `h1` font-size and margin within `section` and `article` * contexts in Firefox 4+, Safari 5, and Chrome. */ h1 { font-size: 2em; margin: 0.67em 0; } /** * Address styling not present in IE 8/9. */ mark { background: #ff0; color: #000; } /** * Address inconsistent and variable font size in all browsers. */ small { font-size: 80%; } /** * Prevent `sub` and `sup` affecting `line-height` in all browsers. */ sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; } sup { top: -0.5em; } sub { bottom: -0.25em; } /* Embedded content ========================================================================== */ /** * Remove border when inside `a` element in IE 8/9. */ img { border: 0; } /** * Correct overflow displayed oddly in IE 9. */ svg:not(:root) { overflow: hidden; } /* Grouping content ========================================================================== */ /** * Address margin not present in IE 8/9 and Safari 5. */ figure { margin: 1em 40px; } /** * Address differences between Firefox and other browsers. */ hr { -moz-box-sizing: content-box; box-sizing: content-box; height: 0; } /** * Contain overflow in all browsers. */ pre { overflow: auto; } /** * Address odd `em`-unit font size rendering in all browsers. */ code, kbd, pre, samp { font-family: monospace, monospace; font-size: 1em; } /* Forms ========================================================================== */ /** * Known limitation: by default, Chrome and Safari on OS X allow very limited * styling of `select`, unless a `border` property is set. */ /** * 1. Correct color not being inherited. * Known issue: affects color of disabled elements. * 2. Correct font properties not being inherited. * 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome. */ button, input, optgroup, select, textarea { color: inherit; /* 1 */ font: inherit; /* 2 */ margin: 0; /* 3 */ } /** * Address `overflow` set to `hidden` in IE 8/9/10. */ button { overflow: visible; } /** * Address inconsistent `text-transform` inheritance for `button` and `select`. * All other form control elements do not inherit `text-transform` values. * Correct `button` style inheritance in Firefox, IE 8+, and Opera * Correct `select` style inheritance in Firefox. */ button, select { text-transform: none; } /** * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` * and `video` controls. * 2. Correct inability to style clickable `input` types in iOS. * 3. Improve usability and consistency of cursor style between image-type * `input` and others. */ button, html input[type="button"], /* 1 */ input[type="reset"], input[type="submit"] { -webkit-appearance: button; /* 2 */ cursor: pointer; /* 3 */ } /** * Re-set default cursor for disabled elements. */ button[disabled], html input[disabled] { cursor: default; } /** * Remove inner padding and border in Firefox 4+. */ button::-moz-focus-inner, input::-moz-focus-inner { border: 0; padding: 0; } /** * Address Firefox 4+ setting `line-height` on `input` using `!important` in * the UA stylesheet. */ input { line-height: normal; } /** * It's recommended that you don't attempt to style these elements. * Firefox's implementation doesn't respect box-sizing, padding, or width. * * 1. Address box sizing set to `content-box` in IE 8/9/10. * 2. Remove excess padding in IE 8/9/10. */ input[type="checkbox"], input[type="radio"] { box-sizing: border-box; /* 1 */ padding: 0; /* 2 */ } /** * Fix the cursor style for Chrome's increment/decrement buttons. For certain * `font-size` values of the `input`, it causes the cursor style of the * decrement button to change from `default` to `text`. */ input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { height: auto; } /** * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome. * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome * (include `-moz` to future-proof). */ input[type="search"] { -webkit-appearance: textfield; /* 1 */ -moz-box-sizing: content-box; -webkit-box-sizing: content-box; /* 2 */ box-sizing: content-box; } /** * Remove inner padding and search cancel button in Safari and Chrome on OS X. * Safari (but not Chrome) clips the cancel button when the search input has * padding (and `textfield` appearance). */ input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; } /** * Define consistent border, margin, and padding. */ fieldset { border: 1px solid #c0c0c0; margin: 0 2px; padding: 0.35em 0.625em 0.75em; } /** * 1. Correct `color` not being inherited in IE 8/9. * 2. Remove padding so people aren't caught out if they zero out fieldsets. */ legend { border: 0; /* 1 */ padding: 0; /* 2 */ } /** * Remove default vertical scrollbar in IE 8/9. */ textarea { overflow: auto; } /** * Don't inherit the `font-weight` (applied by a rule above). * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. */ optgroup { font-weight: bold; } /* Tables ========================================================================== */ /** * Remove most spacing between table cells. */ table { border-collapse: collapse; border-spacing: 0; } td, th { padding: 0; } /* neovim.io/css/main.css */ * { -moz-box-sizing: border-box; box-sizing: border-box; } body { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; line-height: 1.4; color: #444; background-color: #fbfbfb; } @media (min-width: 568px) { body { font-size: 17px; } } a { color: #3c92d1; text-decoration: none; } h1, h2, h3 { font-family: 'Lato', sans-serif; } h2 { font-size: 24px; font-weight: 400; color: #54a23d; margin-bottom: 0; } @media (min-width: 568px) { h2 { font-size: 30px; } } h3 { /* color: #54a23d; */ } blockquote { border-left: 5px solid #eeeeee; margin-left: 0; padding-left: 15px; } /* * Content container * * Centered container for all content */ .container { margin: 0 15px; } @media (min-width: 568px) { .container { margin: 0 auto; width: 90%; max-width: 1200px; } } /* * Navbar * * Logo and navigation at the top of the page */ .navbar { padding: 12px 0; } @media (min-width: 568px) { .navbar { padding-top: 30px; padding-bottom: 30px; } } .logo { width: 120px; position: relative; top: 4px; } @media (min-width: 568px) { .logo { width: 180px; } } .site-nav { display: none; } @media (min-width: 568px) { .site-nav { display: block; float: right; } .site-nav ul { list-style: none; } .site-nav li { display: inline-block; margin-top: 5px; margin-left: 20px; font-size: 18px; font-family: 'Lato', sans-serif; } } /* * Masthead * * Big intro billboard */ .masthead { border-top: solid 1px #ececec; border-bottom: solid 1px #ececec; text-align: center; padding: 20px 12px; } @media (min-width: 568px) { .masthead { padding-top: 40px; padding-bottom: 40px; } } .masthead .container { } @media (min-width: 568px) { .masthead .container { width: 568px; margin: 0 auto; } } .masthead h1 { font-size: 20px; font-weight: 400; } @media (min-width: 568px) { .masthead h1 { font-size: 40px; margin-bottom: 50px; } } .masthead .lead { font-weight: 900; color: #54a23d; font-family: 'Lato', sans-serif; font-size: 16px; font-weight: 900; } @media (min-width: 568px) { .masthead .lead { font-size: 26px; } } /* * Columns * * Two columns utilizing the golden ratio */ .col-wide, .col-narrow { display: block; } @media (min-width: 568px) { .col-wide { display: table-cell; width: 61.8%; vertical-align: top; } .col-narrow { display: table-cell; width: 38.2%; padding-left: 6%; vertical-align: top; } } /* * Front page * * Big section blocks for the front page */ .front-section { padding: 8px 0; } @media (min-width: 568px) { .front-section { padding-top: 30px; padding-bottom: 30px; display: table; width: 100%; } .front-section h2:first-child { margin-top: 0; } } .front-section.shaded { background-color: #f4f4f4; } /* * FAQs * * Formatted as a definition list */ .faqs dt { font-weight: 700; } .faqs dd { color: #777; font-size: 15px; margin-left: 0; margin-bottom: 20px; } /* * Buttons * * Fun to click */ .btn { display: inline-block; text-align: center; vertical-align: middle; background-color: #3c92d1; color: #fff; font-family: 'Lato', sans-serif; border-radius: 4px; padding: 15px 30px; } .btn:hover { background-color: #3889c4; } .btn.full-width { width: 100%; } /* * Sponsors * * Callout-style box */ .sponsors { background-color: #f5f5f5; padding: 5px 20px; border-radius: 4px; margin-top: 10px; } .sponsors h3 { color: #54a23d; } .first-level-sponsor { margin-bottom: 20px; } .first-level-sponsor img { max-width: 100%; } .second-level-sponsors { width: 100%; } .second-level-sponsors td { width: 50%; padding: 12px 0; text-align: center; vertical-align: middle; } .second-level-sponsors img { width: 80%; } @media (min-width: 568px) { .second-level-sponsor img { width: auto; } } /* * Footer * * Links, legalese, etc. */ footer .container { border-top: solid 1px #ececec; padding: 20px 0 50px; font-size: 12px; color: #777; } @media (min-width: 568px) { footer .container { font-size: 14px; display: table; } } footer a { color: #444; } /* * Misc * * Odds 'n ends */ .light { color: #777; } .light a { color: #444; } .small { font-size: 70%; } /* * Newsletter CSS */ .newsletter h1 { margin-bottom: 0px; } neovim-0.2.2/contrib/doxygen/footer.html000066400000000000000000000012071320401574200203070ustar00rootroot00000000000000
$generatedby Doxygen $doxygenversion
neovim-0.2.2/contrib/doxygen/header.html000066400000000000000000000025071320401574200202450ustar00rootroot00000000000000 $projectname: $title $title $treeview $search $mathjax $extrastylesheet