Commit Graph

167 Commits

Author SHA1 Message Date
Justin M. Keyes
c5f5f427c6 api: api_info()['version']
API level is disconnected from NVIM version. The API metadata holds the
current API level, and the lowest backwards-compatible level supported
by this instance.

Release 0.1.6 is the first release that reports the Nvim version and API
level.

    metadata['version'] = {
      major: 0,
      minor: 1,
      patch: 6,
      api_level: 1,
      api_compatible: 0,
      api_prerelease: false,
    }

The API level may remain unchanged across Nvim releases if the API has
not changed.

When changing the API,
    - set NVIM_API_PRERELEASE to true
    - increment NVIM_API_LEVEL (at most once per Nvim version)
    - adjust NVIM_API_LEVEL_COMPAT if backwards-compatibility was broken

api_level_0.mpack was generated from Nvim 0.1.5 with:
    nvim --api-info
2016-10-28 14:33:13 +02:00
Rui Abreu Ferreira
f25797f869 api: Nvim version, API level #5386
The API level is disconnected from the NVIM version. The API metadata
holds the current API level, and the lowest backwards-compatible level
supported by this instance.

Release 0.1.6 will be the first release reporting the Nvim version and
API level.

    metadata['version'] = {
      major: 0,
      minor: 1,
      patch: 6,
      prerelease: true,
      api_level: 1,
      api_compatible: 0,
    }

The API level may remain unchanged across Neovim releases if the API has
not changed.

When changing the API the CMake variable NVIM_API_PRERELEASE is set to
true, and  NVIM_API_CURRENT/NVIM_API_COMPATIBILITY are incremented
accordingly.

The functional tests check the API table against fixtures of past
versions of Neovim. It compares all the functions in the old table with
the new one, it does ignore some metadata attributes that do not alter
the function signature or were removed since 0.1.5.  Currently the only
fixture is 0.mpack, generated from Neovim 0.1.5 with nvim --api-info.
2016-10-26 14:23:50 +02:00
James McCoy
885db120fa Merge pull request #5456 from jamessan/char-sign-conversion
Enable CI testing of unsigned char and fix fallout
2016-10-15 15:29:13 -04:00
John Szakmeister
53eddb881c build: prevent in-tree builds for the time being, as it's not supported 2016-10-11 20:20:31 -04:00
James McCoy
cb03517fd3
ci: Force unsigned char usage for the 32bit build
Since C leaves whether char is signed or unsigned up to the implementer,
there are different defaults on different architectures.

Forcing unsigned char for one of our CI builds should help catch these
issues moving forward.
2016-10-09 21:12:45 -04:00
Rui Abreu Ferreira
4c9e5676cd Disable use of jemalloc in OpenBSD
Works around #3434, turning off the use of jemalloc in OpenBSD.
2016-09-10 18:43:04 +01:00
Björn Linse
7e2348f2b1 eval: use gperf to generate the hash of builtin functions
make api functions highlighted as builtins in vim.vim
2016-08-31 21:57:04 +02:00
Rui Abreu Ferreira
9ce81f7b2b functionaltest: Create lua helper for os.tmpname()
In Windows Lua's os.tmpname() returns relative paths starting with \s,
prepend them with $TEMP to generate a valid path.

In OS X os.tmpname() returns paths in '/tmp' but they should be in
'/private/tmp'. We cannot use os_name() for platform detection because
some tests use tempname() before nvim is spawned, instead use one of the
following:

1. Set SYSTEM_NAME environment variable before calling the tests, it
   is set from CMAKE_SYSTEM_NAME(i.e. uname -s or 'Windows')
2. Call uname -s
3. Assume windows
2016-08-31 11:32:28 +01:00
Rui Abreu Ferreira
bed61041a0 third-party: Build busted in Windows
Busted now builds on Windows, remove the check. In Windows the binary
is called busted.bat.
2016-08-26 08:09:56 +01:00
Justin M. Keyes
ad43480952 version bump 2016-08-22 00:28:47 -04:00
Justin M. Keyes
5b8255e251 NVIM v0.1.5
Features:
    c7d84c5550 PR #4980 Full `:ruby` support!
    c74ce334f2 PR #4624 timers: timer_start(), timer_stop()
    b8e6f04e69 PR #5205 `:CheckHealth` command

    47a15d0256 PR #4865 file: Add buffered reading and writing
        *Much* faster shada file reading (important for startup time).

    71b3e20d0f PR #4723 jobstart() learned 'rpc'
        jobs and RPC channel IDs share the same "namespace".
        jobstart() can starts RPC channels, which allows scripts to handle
        'stderr' on a RPC channel, like a typical non-RPC job.
        jobpid()/jobstop() work on RPC "jobs".
        Deprecates rpcstart().

    4dc4efc36f PR #4449 man.vim rewrite
        `:Man` command is enabled by default.
        New features: completion, window handling, better parsing, and more.

    8a4e5b4bc2 PR #4697 capture() function (renamed to execute())
        Supports nesting, including nested :redir.

    ae6db26b09 PR #5050 'rplugin manifest: default to XDG dir'
    a1682281f4 PR #5214 Restore ":browse oldfiles".
    1f7304b846 Better handling of mouse-clicks on concealed chars.
    5ea4d58a1b PR #5026 terminal: Ensure b:term_title always has a value
    c002310787 tui: Assume 256 colors in most cases.
    a2ecbc2cc0 PR #4929 Always resize the :terminal
    a59330d6fc PR #4925 api_info()
    a160590e40 PR #4813 allow setting cwd in jobstart(), termopen()
    74f6460181 PR #4633: support "special" highlight (undercurl)
    5a5ef1c222 PR #3450 mouse: Implement horizontal scroll.

Windows support:
    All PRs now build on Appveyor targeting win32 and win64!
    Numerous fixes!

Fixes:
    e9061117a5 PR #4646 Prevent data loss for process output streams
    7fa1baf44e PR #4798 'process.c: Fix block in teardown'
    c10fe010f1 Prevent endless loop in printdigraph(). (#5215)
    add41dca98 PR #5192 timers: Avoid crash after processing events
    006f9c0c9c PR #5195 Set the default value for 'packpath'
    6da7d6890c PR #5025 Restore double click
    d622e9c416 readfile(): Less-disruptive readonly check.
        Fixes an issue where nvim unnecessarily "touched" open files.
    fe6ec75725 PR #4964 Handle very long $XDG_DATA_DIRS.
    895f712df8 option: Do not expand options in XDG vars.
    1d8a076157 server_init: Handle server_address_new() failure.
    be531aba77 PR #5042 Fix v:register for clipboard=unnamed,unnamedplus
    204f557a11 PR #4984 'Trigger TabNewEntered with <CTRL-W>T'
    1e93e24f5e PR #4851 synIDattr(): Return RRGGBB value for `fg#`.

Changes:
    acc5d08b37 PR #4690 'termguicolors' option enables "true color".
        NVIM_TUI_ENABLE_TRUE_COLOR is now ignored.
2016-08-21 22:14:28 -04:00
Rui Abreu Ferreira
25ec29d4e1 Windows: Fix functionaltest fixtures 2016-08-07 21:57:29 +01:00
Josh Triplett
fc98d2d96d Pass busted the path to the detected Lua interpreter
Otherwise, busted may run a different interpreter than the one we
detected, without the capabilities we expect.  (For instance, we might
have detected the luajit interpreter, but busted might run the lua
interpreter, without the ffi module.)
2016-07-13 00:37:50 -07:00
Nicolai Skogheim
c475e3f8d1 cmake: remove unused includes (#4947) 2016-06-22 22:46:21 -04:00
Florian Walch
abe47d5f64 CMake: Search all possibly usable Lua executables. (#4858) 2016-06-03 12:21:29 -04:00
Rui Abreu Ferreira
46aac2a09a Windows: Don't build the TUI is systems where it is not supported
The TUI can be enabled/disabled at build time with -DFEAT_TUI, default is ON for
UNIX, and OFF for non UNIX. When off, Neovim prints a message to stderr, along
with a list of the server endpoints.
2016-05-27 23:43:40 +01:00
Rui Abreu Ferreira
d5c89b1896 cmake: Allow building without Luajit
By default Neovim searched a Luajit instalation and linked against
the luajit library.

In practice Neovim only requires luajit to run the unit tests. All other
targets only require lua and the correct lua modules. This commit:

1. Remove the strict dependency on Luajit
2. Makes the unittest target depend on the lua 'ffi' module.
   If the module is not available the target is not enabled
   and a message is displayed.
2016-05-19 17:55:19 +01:00
Dimitri Merejkowsky
2582754bdd Fix running tests from Ninja 2016-05-17 23:23:32 +02:00
Justin M. Keyes
7925ffc872 version bump 2016-04-24 21:58:07 -04:00
Justin M. Keyes
4dcd19d9bc NVIM v0.1.4
Features:
  5ebffaa :tcd for tab-local working directory (like :lcd, but for tabs)
  d835c03 remote/define.vim: support remote function "range"
  007d573 json_encode/json_decode (with sophisticated error detection) #4131
  b50afb4 clipboard: support "lemonade" tool

Fixes:
  cc1beec eval.c: Fix heap corruption error. #4592
  4043725 mbyte.c: Fix invalid memory access in utfc_ptr2char_len #4574
  4eb5827 Enable syntax/filetype by default. #4558

Changes:
  5c6592f v:windowid is writeable (useful for GUIs) #4608
2016-04-24 21:46:34 -04:00
Thiago de Arruda
c18d5917e3 Update lua client to 0.0.1-24
The new version of the lua client uses libmpack as a backend, and some test
scripts had to be updated to reflect that.
2016-04-13 09:21:32 -03:00
Justin M. Keyes
e605faaa2f version bump 2016-04-08 17:26:07 -04:00
Justin M. Keyes
f4f80a238b NVIM v0.1.3
Features:
  f2ae5a9 Add TextYankPost and TextDeletePost autocmds
  44b2cef bufhl: new mechanism for plugins to add highlights to a buffer
  39c3842 Make set{qf,loc}list() take {title}
  77a7ca4 'shortmess': Add "F" flag. #4446
  99d4c8c keymap: Support <D-...> (super/command key).

Fixes:
  14c9b30 terminal.c: temporary fix for incorrect paste handling

Notable changes:
  50e129f defaults: Enable syntax and filetype plugins.
  4e39eee upgrade libvterm (improves terminal reflow)
2016-04-07 22:04:21 -04:00
Justin M. Keyes
d9ecd06627 build: Specify old behavior for POLICY CMP0059.
This is needed as long as we support cmake older than 2.8.12. When we
bump the minimum version to 2.8.12, we can use target_compile_options()
and add_compile_options() instead.

Closes #4389
2016-03-09 10:25:45 -05:00
Thiago de Arruda
646ab30858 Add Lua 5.1 as a third party dep
Also add a functionaltest-lua target to run the functional tests using the lua
interpreter and corresponding helper to top-level Makefile
2016-03-07 14:38:39 -03:00
Justin M. Keyes
0c2ba7554f Merge pull request #3900 from ZyX-I/inf-nan-string
Make it possible to eval() all floating-point values dumped by string()
2016-02-28 11:48:54 -05:00
ZyX
92d4dfdca5 ci: Disable -Wc11-extensions on FreeBSD
Closes #4363.
2016-02-28 06:58:47 +03:00
Jun T
1a15cf84c2 build: install *.mo into the "standard" directory
Change POROJECT_NAME to 'nvim', and use it as the gettext
domain name. The *.mo files, previously installed as
$runtime/lang/xx/LC_MESSAGES/nvim.mo, are now installed as
$prefix/locale/xx/LC_MESSAGES/nvim.mo.
2016-02-23 13:39:56 +09:00
Florian Walch
e7615ddc22 CMake: Add #include in _FORTIFY_SOURCE check. #4214
Some toolchains apparently set _FORTIFY_SOURCE=2 in internal header
files. Include <string.h> (which in turn should include such internal
header files) before checking the value of _FORTIFY_SOURCE to catch
that.

Fixes #4183.
2016-02-10 00:17:55 +01:00
Justin M. Keyes
cb5ee26540 Merge pull request #4094 from justinmk/_GNU_SOURCE
cmake: Linux: define _GNU_SOURCE.
2016-02-09 00:34:14 -05:00
Justin M. Keyes
d402841b54 version bump 2016-02-09 00:21:54 -05:00
Justin M. Keyes
b33c777493 NVIM v0.1.2
Features:
  ef66249 tabline: Add %[] atom to the tabline, for random commands on click
  f338ea7 job control: implement jobpid() to get PID of job
  d0d5d17 job control: add 'detach' option to jobstart
  7ad3f07 Add support for binary numbers

Fixes:
  291495a regexp_nfa.c: Speed up find_match_text()
  317d5ca input: Do not set high-bit; preserve ALT modifier.
  3b7c409 shell: Unquote &shell* options before using them

Notable changes:
  49b06a8 encoding: Always use "utf-8" as default for &encoding
  79a6983 ui: revert "gui_running" hack

Other changes:
  b4b4536 version: semver.org compliance
  c6aa716 reproducible builds: Stop using __{DATE,TIME}__
  46bd3c0 clipboard: Check $DISPLAY. Prefer xsel. #4150
  f6ecd12 job control: don't kill PTY processes on exit
  49f0417 clipboard: Detach clipboard helper, so contents is kept after nvim exit
  38435e8 python: Add missing I/O methods to RedirectStream
  d26b01d eval: Use better error messages when failing to dump values
  62d137c Remove swapsync.
2016-02-09 00:01:18 -05:00
James McCoy
2be51f5e85 cmake: msgpack: Add more thorough version check
In 33bc332, version constraints were added to pkg_search_module(), but
that only affects the set of directories searched by
find_library()/find_path().

Once the header directory is found, parse the version from
version_master.h so it can be checked by the find_package() call in the
root CMakeLists.txt.
2016-02-05 19:46:53 -05:00
Justin M. Keyes
b5f6f43095 cmake: Linux: define _GNU_SOURCE.
Closes #4042
2016-01-24 21:18:44 -05:00
Rui Abreu Ferreira
1eaa2227e9 CMake: Defer setting CACHE CMAKE_BUILD_TYPE.
The Visual Studio CMake generator fails to configure if
CACHE CMAKE_BUILD_TYPE is set before CMAKE_BUILD_TYPE.
2016-01-18 09:18:18 -05:00
Rui Abreu Ferreira
f5ae5fa799 MSVC+CMake: avoid get_target_property. #4004
When using the Visual Studio generator don't use get_target_property for
custom command, because it returns unexpanded VS variables (e.g.
$(Configuration)) within the result as part of the LOCATION path.

The single case where this is a problem is for getting the output path for
nvim-test, instead we use a path here.
2016-01-17 22:59:55 -05:00
Rui Abreu Ferreira
54a1fb77e7 MinGW: don't use -fstack-protector
Mingw-w64 fails to link when using -fstack-protector flags, disabled the
flag check for non Unix system.
2016-01-13 23:09:27 -05:00
Rui Abreu Ferreira
1ce329e7dd Fix build output paths for Visual Studio generator
The Visual Studio cmake generator creates subdirectories inside
the build path for different build configuration. But this breaks some of our
cmake scripts, like the help tags installer, that assume the targets are
built in that location. Updated CMakeLists.txt to remove extra paths.
2016-01-10 14:16:30 -05:00
Justin M. Keyes
73b8c89518 Merge pull request #2667 from equalsraf/tb-min-log
cmake: Pass MIN_LOG_LEVEL as compiler definition
2016-01-10 12:21:52 -05:00
Rui Abreu Ferreira
72d03cc961 cmake: Pass -DMIN_LOG_LEVEL as compiler definition
- Check if MIN_LOG_LEVEL value is a number 0-3, default to
  INFO (1) or ignore it in Release mode
- When TRAVIS_CI_BUILD is ON the default is DEBUG (0)
- Add local.mk.example
2016-01-10 17:06:53 +00:00
Rui Abreu Ferreira
fd10729bc8 CMake: Add CPack settings to CMakeLists.txt 2016-01-10 09:50:35 -05:00
Justin M. Keyes
b4b4536339 version: semver.org compliance
We use `git describe` to stamp pre-release versions (dev builds). But
`git describe` uses the result of the most-recent tag (the current
_release_ version)--so we must munge it with the _next_ (i.e.
unreleased) version.

Also fix non-git builds: do not invoke git_describe(NVIM_VERSION_MEDIUM)
if we're not in a git tree, else it gets the dummy value
"HEAD-HASH-NOTFOUND".

Example :version output in non-git build:
  NVIM 0.1.2-dev

Example :version output in git build:
  NVIM v0.1.2-176-g9c3c2b5
2016-01-08 01:09:22 -05:00
Rui Abreu Ferreira
bd529ea3f3 MinGW: libuv needs -D_WIN32_WINNT=0x0600
Without this compilation fails due to a missing symbol: SRWLOCK in libuv
headers. _WIN32_WINNT defines the Windows header version that is to be used,
and it seems libuv requires this version. See

    b471b33da8
2016-01-04 19:51:09 -05:00
Rui Abreu Ferreira
8be2ab11de Fix CMakeLists.txt search paths for cross compile 2015-12-15 13:53:46 -05:00
Michael Reed
7be12edd38 Remove "Commit:" field from --version output
If nvim is built from a non-tagged commit, the truncated commit hash is
already appended to the main version string (e.g., "NVIM v0.1.0-83-g959f260 ..."),
making the "Commit:" field redundant.

Regarding the truncated hash length: we don't have nearly enough commits
to worry about collisions, and probably won't ever, so the default
length should be fine.
2015-12-05 16:15:32 -05:00
Justin M. Keyes
4a1c36e953 Nvim 0.1.1
- shada/msgpack editor plugin #3270
- VimL Dict notifications #3603
    - Note: API for this feature may change.
- :profile dump, :profile stop #2427
- :oldfiles! #3611
- TermOpen, TermClose events #3653
- fix: shada/viminfo: Do not save unlisted and quickfix buffers #3581
2015-12-05 14:56:37 -05:00
Marco Hinz
818f926eb0 Tests: add luacheck for linting tests
Source: https://github.com/mpeterv/luacheck
Docs:   http://luacheck.readthedocs.org/en/0.12.0/index.html

Run via "make testlint".
2015-11-23 13:57:21 +01:00
Justin M. Keyes
d0401b04a4 build: Use git describe for version strings.
When building in a git repo:
  - If HEAD corresponds to an annotated tag, (i.e. git_get_exact_tag()
    returns truthy) the current build is considered a "release" build:
    NVIM_VERSION_MEDIUM is directly assigned the tagged version name,
    and NVIM_VERSION_* defines are ignored.
  - If HEAD is not a tagged release, then NVIM_VERSION_MEDIUM is
    directly assigned the result of `git describe`.

If git (or the repo) is not available:
  - The NVIM_VERSION_* defines are used to define NVIM_VERSION_MEDIUM.

Sample outputs for `nvim --version` and `nvim +version`:

    Building with git @ non-tagged commit e66df14:
      NVIM v0.1.0-1-ge66df14 (compiled Nov  1 2015 19:10:30)
      Commit: e66df148f9401be17adab324a6e41d927aae20b3

    Building with git @ v0.1.1 tag:
      NVIM v0.1.1 (compiled Nov  1 2015 19:03:52)
      [no "Commit:" line]

    Building this commit _not_ in a git repo:
      NVIM 0.1.0-dev (compiled Nov  1 2015 19:16:11)
      [no "Commit:" line]
2015-11-01 21:31:29 -05:00
Justin M. Keyes
c4826c3003 Nvim 0.1.0 2015-11-01 16:16:38 -05:00
Justin M. Keyes
4a0c0fd321 Nvim 0.1.0 2015-11-01 14:23:40 -05:00