1
mirror of https://github.com/neovim/neovim.git synced 2024-12-31 17:13:26 -07:00
Commit Graph

259 Commits

Author SHA1 Message Date
Justin M. Keyes
ae2401621a
ci/build.ps1: Respect CMAKE_BUILD_TYPE if provided 2019-04-09 00:17:07 +02:00
Justin M. Keyes
89515304e4 os/env: use libuv v1.12 getenv/setenv API
- Minimum required libuv is now v1.12
- Because `uv_os_getenv` requires allocating, we must manage a map
  (`envmap` in `env.c`) to maintain the old behavior of `os_getenv` .
- free() map-items after removal. khash.h does not make copies of
  anything, so even its keys must be memory-managed by the caller.

closes 
closes 
2019-02-27 23:29:07 +01:00
Justin M. Keyes
4397bf5785 build/CMakeLists.txt: group related logic
- Group CMAKE_BUILD_TYPE-related logic together.
- Print the MIN_LOG_LEVEL message (in the build-log) next to the
  CMAKE_BUILD_TYPE message.
2019-02-16 00:38:20 +01:00
Justin M. Keyes
f2c6164b04 build: -Wmissing-prototypes
ref 

Though I don't see a strong benefit, it isn't too much of a burden, and
maybe avoids confusion in some cases.
2019-02-04 04:00:20 +01:00
Justin M. Keyes
4386814b04 build: set compiler options in one place
- add_definitions() is preferred to CMAKE_C_FLAGS.
2019-02-04 02:57:18 +01:00
James McCoy
c2343180d7
Remove support for using jemalloc instead of the system allocator
There was never any investigation done to determine whether using
jemalloc was actually a net benefit for nvim.  It has been a portability
limitation and adds another factor to consider when triaging issues.
2019-01-19 18:09:52 -05:00
Justin M. Keyes
fc4ca5bdd8 CMake: Feature-detect __builtin_{add,sub}_overflow 2019-01-09 10:41:17 +01:00
Justin M. Keyes
a70fde1b45 build: enable -Wshadow
Note about shada.c:
- shada_read_next_item_start was intentionally shadowing `unpacked` and
  `i` because many of the macros (e.g. ADDITIONAL_KEY) implicitly
  depended on those variable names.
- Macros were changed to parameterize `unpacked` (but not `i`). Macros
  like CLEAR_GA_AND_ERROR_OUT do control-flow (goto), so any other
  approach is messy.
2019-01-02 21:06:37 +01:00
Björn Linse
c778c2e107 multigrid: API version bump 2018-12-31 16:24:07 +01:00
Justin M. Keyes
a2ce40fae3 version bump 2018-12-31 01:06:17 +01:00
Justin M. Keyes
4dd3fc4ca9 NVIM v0.3.2
Besides the "visible" improvements, this release features numerous
internal improvements to the UI/screen code and test infrastructure.

Numerous patches were merged from Vim, which are not mentioned below.

FEATURES:

07ad5d71ab clipboard: Support custom VimL functions 
725da1feeb  win/TUI: Improve terminal/console support
7a8dadbedb  startup: Use $XDG_CONFIG_DIRS/nvim/sysinit.vim if it exists
feec926633  support <cmd> mapping in more places
0653ed63a5  diff/highlight: Show underline for low-priority CursorLine
bddcbbb571 signs: Add "numhl" argument 
05f9c7c2f7 clipboard: support Wayland ()
14ae394532  TUI: add support for undercurl and underline color
4fa3492a6f  man.vim: soft (dynamic) wrap 

API:

8b39e4ec79  API: implement object namespaces
b1aaa0a881 API: Implement nvim_win_set_buf() 
8de87c7b1c  API: virtual text annotations (nvim_buf_set_virtual_text)
2b9fc9a13f  API: add nvim_buf_is_loaded()
    API: buf_get_lines, buf_line_count handle unloaded buffers
88f77c28e5 API: nvim_buf_get_offset_for_line
94841e5eae API/UI:  ext_newgrid, ext_hlstate
    (use line-based rather than char-based updates)

UI

b5cfac0894  TUI: use BCE again more often, (smoother resizes/scrolling)
77b5e9ae25  screen: add missing status redraw when redraw_later(CLEAR) was used
5f15788dc3 TUI: clip invalid regions on resize (), fixes 
c936ae0f36  TUI: improvements for scrolling and clearing
f20427451e  UI: disable clearing almost everywhere
f4b2b66661  TUI: always use safe cursor movement after resize
d36afafc8d  ui_options: also send when starting or from OptionSet
67f80d485c TUI: Avoid reset_cursor_color in old VTE 
e55ebae373  don't erase screen on `:hi Normal` during startup
c5790d9189  TUI: Hint wrapped lines to terminals.

FIXES:

231de72539 RPC: turn errors from async calls into notifications
907ad921bc TUI: Restore terminal title via "title stacking" ()
cb76a8a95f genappimage: Unset $ARGV0 at invocation 
b48efd9ba7  TUI: FreeBSD: Improve support for BSD vt console
c16529afa5 TUI: Konsole 18.07.70 supports DECSCUSR ()
aec096fc5b os/lang: use the correct LC_NUMERIC also for OS X
5fee0be915 provider: improve error message ()
3c42d7a10a TUI: alacritty supports set_cursor_color 
7bff9a5de8 TUI: Alacritty supports DECSCUSR ()
57acfceabe macOS: infer primary language if $LANG is empty 
bc132ae123 runtime/syntax: Fix highlighting of augroup contents ()
715fdfee1e  VimL/confirm(): Show dialog even if :silent
799d9c3215 clipboard: Prefer xclip ()
6dae7776ed provider/nodejs: fix npm,yarn detection
16bc1e9c17  channel: avoid buffering output when only terminal and no callbacks are active
72fecad1ff  Fix crash in lang_init() on macOS if lang_region = NULL
d581398779 ruby: detect rbenv shims for other versions ()
e568ac7a68  third-party/unibilium: Fix parsing of extended capability entries
c4c74c3883 jobstart(): Fix hang on non-executable cwd 
1cf50cbfd9 provider/nodejs: Simultaneously query npm and yarn 
6c496db4b7 undo: Fix infinite loop if undo_read_byte returns EOF 
f8f83579ff  'swapfile: always show dialog'

CHANGES:

c236e80cf3  --embed: wait for UI unless --headless
180b50dddc  python: 'neovim' module was renamed to 'pynvim'
2000b6a64a  VimL: Remove legacy aliases "v:errmsg", "v:shell_error", "v:this_session"
deb18a050e defaults: background=dark  ()
c1187d4af0 defaults: win: 'shellpipe' for cmd.exe ()
2018-12-31 01:06:17 +01:00
Justin M. Keyes
221f6fffad runtime/lua/vim/compat.lua
ref 
Introduce the `vim.compat` module, to help environments with system Lua
5.2+ run the build/tests. Include the module implicitly in all tests.

ref 
legacy `vim` module:
    beep
    buffer
    command
    dict
    eval
    firstline
    lastline
    line
    list
    open
    type
    window
2018-12-20 11:57:30 +01:00
James McCoy
b14b2883e9
cmake: Update comment on why CMP0059 is still set to OLD 2018-12-01 17:56:03 -05:00
James McCoy
bb94895d52
Unset CMAKE_REQUIRED_* after they're done being used
As of CMake 3.12, check_include_files() also link the check executable
against the libraries listed in CMAKE_REQUIRED_LIBRARIES.  Therefore we
should unset the CMAKE_REQUIRED_* variables after each respective use to
avoid them unnecessarily bleeding into other checks.
2018-12-01 15:28:33 -05:00
Justin M. Keyes
5320eb57df build: relax find_package() version spec
We need a way to say "Lua 5.1.x" is required.
"5.1 EXACT" does not match 5.1.5, so it's useless.

https://github.com/neovim/neovim/pull/9197#discussion_r230962070
2018-11-06 01:48:49 +01:00
Justin M. Keyes
377694681c build: dependencies: specify minimum versions 2018-11-04 12:11:37 +01:00
Justin M. Keyes
f95e0ae926
build: adjust some messages () 2018-10-06 18:45:34 +02:00
Peter Hodge
ae52170a52 cmake: bump API version 2018-07-25 14:09:04 +10:00
zhou13
c8e7a447c5 build: Enable LTO (Link Time Optimization) 2018-07-23 03:22:14 +02:00
Justin M. Keyes
f5d7123f6c version bump 2018-07-19 21:53:21 +02:00
Justin M. Keyes
cd94dd6bb2 NVIM v0.3.1
FEATURES:
07499a842b  man.vim: C highlighting for EXAMPLES section
07f82ad1be  TUI: urxvt: also send xterm focus-reporting seqs
40911e435e  API: emit nvim_buf_lines_event from :terminal
c46997aa87  fillchars: Add "eob" flag

FIXES:
74d19f685f  startup: avoid blank stdin buffer if other files were opened
4874214139  Only waitpid() for processes that we care about
cd6e7e8cf3  Check all child processes for exit in SIGCHLD handler
c230ef24a2  channel.c: Prevent channel_destroy_early() from freeing uninitialized rpc stuff
0ed8b12a07  transstr_buf: fix length comparison
d241f278d3  TUI: Fix standout mode
9afed40ea6  man.vim: fix for mandoc
e889640048  provider/node: npm --loglevel silent
1cbc830189  API: nvim_win_set_cursor: set curswant
bf6048e81d  checkhealth: Python: fix VIRTUAL_ENV check
3cc3506965  checkhealth: node.js: also search yarn

CHANGES:
b7514493a0  defaults: shortmess+=F
12481781a0  highlight: high-priority CursorLine if fg is set.
01570f1ff3  terminal: handle &confirm and :confirm on unloading
56065bbdc6  screen: truncate showmode messages
bf2460e2f9  buffer: fix copying :setlocal options
c1c14faad9  Ex mode: always "improved" (gQ)
050f3975f6  options: remove 'maxcombine` option (always 6)

INTERNAL:
463da84806  screen: use UTF-8 representation
2018-07-18 13:44:59 +02:00
Justin M. Keyes
6294a807d3
Merge win: cmake: Improvements for building with IDEs 2018-06-20 02:19:42 +02:00
James McCoy
a26fd8a888
cmake: Prefer add_definitions() for setting preprocessor defines 2018-06-18 08:01:16 -04:00
James McCoy
23c9e3ec1e
Raise minimum CMake version to 2.8.12 and remove compat code
2.8.12 is supported by our main CI targets and [repology] confirms that
this is broadly supported.

[repology]: https://repology.org/metapackage/cmake/information
2018-06-18 08:00:30 -04:00
James McCoy
25435a4bad
cmake: Consolidate enabling of "undefined symbol" errors 2018-06-18 07:58:18 -04:00
James McCoy
33952c48bc
cmake: Explicitly declare C as the project language
There's a mix of CXX and C related variables being set/referenced in our
CMake files.  Since we only use C, use an explicit language list of "C"
instead of the implicit "C CXX" and replace all uses of CXX variables
with their C counterparts
2018-06-18 07:58:18 -04:00
James McCoy
4938ee08e8
cmake: Check for GNU compiler, not Linux, to set -D_GNU_SOURCE
The Debian hurd-i386 [build] failed (partly) due to -D_GNU_SOURCE not be
defined:

    [215/286] /usr/bin/cc -DINCLUDE_GENERATED_DECLARATIONS -Iconfig -I../src -Isrc/nvim/auto -Iinclude -I/usr/include/luajit-2.1 -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -DDISABLE_LOG -Wdate-time -D_FORTIFY_SOURCE=2 -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -O2 -g  -DMIN_LOG_LEVEL=3 -Og -g   -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=auto -Wno-array-bounds -MD -MT src/nvim/CMakeFiles/nvim.dir/os/pty_process_unix.c.o -MF src/nvim/CMakeFiles/nvim.dir/os/pty_process_unix.c.o.d -o src/nvim/CMakeFiles/nvim.dir/os/pty_process_unix.c.o   -c ../src/nvim/os/pty_process_unix.c
    ../src/nvim/os/pty_process_unix.c: In function 'pty_process_tty_name':
    ../src/nvim/os/pty_process_unix.c:121:10: warning: implicit declaration of function 'ptsname'; did you mean 'ttyname'? [-Wimplicit-function-declaration]
       return ptsname(ptyproc->tty_fd);

Hurd is obviously not Linux, but it is using a GNU compiler and glibc so
it needs -D_GNU_SOURCE for the ptsname() definition to be visible.

[build]: https://buildd.debian.org/status/fetch.php?pkg=neovim&arch=hurd-i386&ver=0.3.0-2&stamp=1528981349&raw=0
2018-06-18 07:58:18 -04:00
b-r-o-c-k
7097aba6be cmake: Organize targets into folders
Enabling CMake's USE_FOLDERS option and adding the FOLDER property to
targets allows some IDEs to list the targets in an organized
hierarchy of folders.
2018-06-17 07:54:39 -05:00
Justin M. Keyes
fa2ad305e3 version bump 2018-06-11 10:58:54 +02:00
Justin M. Keyes
44c6deb91a NVIM v0.3.0
FEATURES:
3cc7ebf810  built-in VimL expression parser
6a7c904648  implement <Cmd> key to invoke command in any mode
b8363283fa  'startup: treat stdin as text instead of commands'
58b210e114 :digraphs : highlight with hl-SpecialKey 
7a13611ba2  'startup: Let `-s -` read from stdin'
1e71978cf0 events: VimSuspend, VimResume 
1e7d5e8cdf  'stdpath()'
f96d99ad11  server: introduce --listen
e8c39f72fd  insert-mode: interpret unmapped META as ESC
98e7112390 msg: do not scroll entire screen ()
f72630b784  let negative 'writedelay' show all redraws
5d2dd2ebe2 win: has("wsl") on Windows Subsystem for Linux 
a4f6cec7a3 cmdline: CmdlineEnter and CmdlineLeave autocommands ()
207b7ca4bc  channels: support buffered output and bytes sockets/stdio

API:
f85cbea725  API: buffer updates
418abfc9d0  API: list information about all channels/jobs.
36b2e3f743  API: nvim_get_commands
273d2cd5d5  API: Make nvim_set_option() update `:verbose set …`
8d40b3617c  API: more reliable/descriptive VimL errors
ebb1acb3c0  API: nvim_call_dict_function
9f994bb699  API: nvim_list_uis
34057045be  API/UI: forward option updates to UIs
911b1e49ab  API: improve nvim_command_output

WINDOWS OS:
9cefd83cc7 ,  build/win: support MSVC
ee4e1fd8ec win: Fix reading content from stdin ()

TUI:
ffb8904913  TUI: add support for mouse release events in urxvt
8d5a46e77b  TUI: implement "standout" attribute
60716371e9 TUI: support TERM=konsole-256color
67848c0b91  TUI: report TUI info with -V3 ('verbose' >= 3)
3d0ee17c91 TUI/rxvt: enable focus-reporting
d109f5645b  TUI: 'term' option: reflect effective terminal behavior

FIXES:
ed6a113804  'job-control: avoid kill-timer race'
4e02f1ab87  'jobs: separate process-group'
451c48a092 terminal: flush vterm output buffer on pty output 
5d6732ff09 :checkhealth fixes 
53f11dcfc7  'Fix errors reported by PVS'
d05712fbe7 inccommand: pause :terminal redraws ()
51af911a27 inccommand: do not execute trailing commands 
84359a467f terminal: resize to the max dimensions ()
d49c1dda8b  Make vim_fgets() return the same values as in Vim
60e96a45b4 screen: winhl=Normal:Background should not override syntax ()
0c59ac1a2c  'shada: Also save numbered marks'
ba87a2cde7 cscope: ignore EINTR while reading the prompt ()
b1412dc412  ':terminal Enter/Leave should not increment jumplist'
3a5721e91b TUI: libtermkey: force CSI driver for mouse input 
6ff13d78b7  TUI: faster startup
1c6e956079  TUI: fix resize-related segfaults
a58c9094db  TUI: always hide cursor when flushing, never flush buffers during unibilium output
303e1df13f  TUI: disable BCE almost always
249bdb07dd  mark: Make sure that jumplist item will not have zero lnum
6f41ce0260  macOS: Set $LANG based on the system locale
a043899ba2  'Retry fgets on EINTR'

CHANGES:
ad60927d09  default to 'nofsync'
f3f1970597  defaults: 'fillchars'
a6052c7307  defaults: sidescroll=1
b69fa866db  defaults: enable cscopeverbose
7c4bb23ff3 defaults: do :filetype stuff unless explicitly "off"
2aa308c685  'Apply :lmap in macros'
8ce6393048 terminal: Leave 'relativenumber' alone ()
e46534b423  refactor: Remove maxmem, maxmemtot options
131aad953c win: defaults: 'shellcmdflag', 'shellxquote' 
c57d315963  jobwait(): return -2 on interrupt also with timeout
6452831cf9 clipboard: macOS: fallback to tmux if pbcopy is broken 
300d3651e2  Make 'langnoremap' apply directly after a map
ada1956206  'lua/executor: Remove lightuserdata'

INTERNAL:
de0a9548f7  internal statistics for list impl
dee78a4095  rewrite internal list impl
2018-06-11 00:46:49 +02:00
Justin M. Keyes
f72f638f97 doc: job/channel, misc
doc: termios defaults. ref 
doc: :help shell-powershell
doc: provider: Python minimum version is 2.7, 3.4
doc: remove :!start special-case. 
doc: mention  change which accepts empty Array for Dictionary parameter
doc: <Cmd> pseudokey
doc: lmap change 
doc: -s, -es
2018-06-11 00:08:27 +02:00
b-r-o-c-k
61890382eb deps: Build bundled dependencies automatically for IDEs
Environment variables are used to detect when the project is being built
from within Clion or Visual Studio, so that the build process can be
simplified by automatically building the bundled dependencies for them.
2018-06-10 09:57:12 -05:00
b-r-o-c-k
d87e5d7016 build/msvc: Add libiconv to bundled dependencies 2018-06-09 20:50:02 -05:00
Justin M. Keyes
b7032cf1e3 win: enable DYNAMIC_ICONV 2018-06-06 00:58:58 +02:00
Justin M. Keyes
21c9db1861 build/CMake: find_package(… REQUIRED)
"Always use `find_package` with `REQUIRED`."

- We make an exception for LuaJit (not REQUIRED): the `nvim-test` target
  is included only if we can find LuaJit.

This is partially a cargo-cult (reference below), but it uncovered at
least one problem: `find_package(LibIntl REQUIRED)` fails on my vanilla
ubuntu 16.04 system.

ref: https://schneide.blog/2017/11/06/4-tips-for-better-cmake/

> optional dependencies is nice, but skipping on REQUIRED is not the way
> you want to do it. In the worst case, some of your features will just
> not work if those packages are not found, with no explanation
> whatsoever. Instead, use explicit feature-toggles (e.g. using option())
> that either skip the find_package call or use it with REQUIRED, so the
> user will know that another lib is needed for this feature.
2018-06-06 00:58:57 +02:00
Björn Linse
6da4548f0e api: list information about all channels/jobs.
Fire autocmd when channel opens or its info changes.
Add a way for API clients can describe themselves.
2018-05-23 18:18:16 +02:00
Jan Edmund Lazo
7e9afca990 win/package: move gui shim to its runtime folder ()
Close 

gui shim is for nvim-qt only.
2018-05-20 08:27:52 +02:00
Justin M. Keyes
ef4feab0e7
version: rename "0.2.3" to "0.3.0" ()
0.2.1 was a big release, it should have been renamed to 0.3.0.
0.2.3 also has significant changes, so rename it.
2018-04-13 22:15:52 +02:00
Justin M. Keyes
cb5cde6e2b
build/CMake: use CMake-2.8.7-compatible list-check ()
Tested with:
    make CMAKE_EXTRA_FLAGS='-DLANGUAGES="en_GB;ja;sk"'

closes 
2018-04-02 12:40:31 +02:00
Marty E. Plummer
362346f563 build/CMake: LANGUAGES config option
Signed-off-by: Marty E. Plummer <hanetzer@startmail.com>
2018-03-31 10:59:45 +02:00
Justin M. Keyes
9a0147754c build: respect $DEPS_BUILD_DIR
Without this, the CI_TARGET=lint travis job cant't find the cached deps
(in $HOME/nvim-deps), nor can it update the cache.
2018-03-11 15:38:18 +01:00
b-r-o-c-k
01fc02beee build/msvc: Add missing WIN32 macro
MSVC predefines `_WIN32`, but not `WIN32`. Also, some unnecessary includes have been removed.
2018-03-04 17:44:23 -06:00
Justin M. Keyes
4b81f627c6 build/gcc: disable -Warray-bounds entirely
We need to disable -Warray-bounds locally for kbtree.h, but we can't
because _Pragma("GCC diagnostic pop") is broken in GCC 5.x+.

So this commit disables -Warray-bounds entirely (for GCC only).

GCC bug:
"_Pragma diagnostic 'ignored' in macro with strict-overflow not
suppressing warning fully with -Werror"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66099

ref https://github.com/neovim/neovim/pull/7083#issuecomment-326323599
closes 
2018-02-19 22:14:34 +01:00
James McCoy
86ee92f2a2
cmake: Set TEST_LIBNVIM_PATH to empty string when not unit testing 2018-02-02 07:28:56 -05:00
James McCoy
41a91af5cf cmake: Use generator expression to determine libnvim-test path
Prior to CMake 2.8.12, generator expressions could only be used in
custom commands so the path to libnvim-test in test/config/paths.lua was
set by inspecting the target's LOCATION property.  Post 2.8.12, the
file(GENERATE) command exists to handle this, but it can't interpolate
normal CMake variables.

In order to bridge the gap while < 2.8.12 is supported, use
configure_file() to create paths.lua.gen with the
$<TARGET_FILE:nvim-test> generator expression and then generate the
final paths.lua file.

Closes 
2018-01-22 14:16:31 -05:00
ZyX
6a1557f2f4 eval/typval: Log list actions
New logging is guarded by cmake LOG_LIST_ACTIONS define. To make it more
efficient it is allocated as a linked list with chunks of length
2^(7+chunk_num); that uses basically the same idea as behind increasing kvec
length (make appending O(1) (amortized)), but reduces constant by not bothering
to move memory around what realloc() would surely do: it is not like we need
random access to log entries here to justify usage of a single continuous memory
block.
2018-01-14 01:33:18 +03:00
ZyX
fe3a58273e cmake: Fix api/version test failure 2017-11-19 22:24:26 +03:00
Justin M. Keyes
d6f9d1df04 version bump 2017-11-18 12:46:38 +01:00
Justin M. Keyes
6d2c30daf3 NVIM v0.2.2
FEATURES:
a6de144c3e 'viewoptions': add "curdir" flag 
b6a603fe51 node.js remote-plugin support 
f5d4da0144 :checkhealth : validate 'runtimepath' 

FIXES:
e6beb60da5 :terminal : fix crash on resize 
f19e5d6530 work around gnome-terminal memory leak 
07931ed1c8 'guicursor': use DECSCUSR for xterm-likes 
f185c739bc 'os_open: UV_EINVAL on NULL filename' 
e8af34dc63 win: provider: Detect(): return *.cmd path 
eacd788cf5 :checkhealth : fix check for npm and yarn 
a43a573ad5 health.vim: normalize slashes for script path 
69e3308771 cmake: install runtime/rgb.txt
d0b05e3c36 runtime: syntax error in `runtime/syntax/tex.vim` 
55d8967147 tutor: some fixes 

CHANGES:
9837a9c401 remove legacy alias to `v:count` 
c5f001a46a runtime: revert netrw update 
67e4529292 defaults: scrollback=10000 
881f9e42d1 process_close(): uv_unref() detached processes 
2017-11-18 12:39:14 +01:00
Justin M. Keyes
c46d6f8da2 version bump 2017-11-08 01:25:06 +01:00