Commit Graph

1491 Commits

Author SHA1 Message Date
Björn Linse
d407a48665 getchar: implement <Cmd> key to invoke command in any mode 2018-03-23 14:01:49 +01:00
b-r-o-c-k
c49dac7cd3 build: Fix CMake target dependency problem
nvim was being ran before its runtime dependencies were copied.
2018-03-18 12:51:39 -05:00
Justin M. Keyes
0093c25dd3 doc: nodejs 2018-03-15 04:59:18 +01:00
chemzqm
338664e96c node/provider: support g:node_host_prog #8135 2018-03-15 04:55:48 +01:00
Daniel Hahler
1d5eec2c62 health/provider: python: warning with correct host prog (#8049)
I have `g:python3_host_prog` set to the system Python, where a package
is also installed to provide the "neovim" module.

`:checkhealth provider` however displays a warning for this:

> Your virtualenv is not set up optimally.

This is because /usr/bin/python is not in /home/user/.pyenv.

I think this warning should not get displayed if host_prog_var exists.

It goes back to the initial commit (20447ba09), and is maybe only
missing the `!` there as with the previous commit.

Full output:
```
  - INFO: pyenv: /home/user/.pyenv/libexec/pyenv
  - INFO: pyenv root: /home/user/.pyenv
  - INFO: Using: g:python3_host_prog = "/usr/bin/python"
  - WARNING: Your virtualenv is not set up optimally (/usr/bin/python is not in /home/user/.pyenv).
    - ADVICE:
      - Create a virtualenv specifically for Neovim and use `g:python3_host_prog`.  This will avoid the need to install Neovim's Python module in each virtualenv.
  - WARNING: $VIRTUAL_ENV exists but appears to be inactive. This could lead to unexpected results.
    - ADVICE:
      - If you are using Zsh, see: http://vi.stackexchange.com/a/7654
  - INFO: Executable: /usr/bin/python
  - INFO: Python3 version: 3.6.4
  - INFO: python-neovim version: 0.2.1
  - OK: Latest python-neovim is installed: 0.2.1
```
2018-03-04 20:04:52 +01:00
Björn Linse
e18177692a screen.c: make negative 'writedelay' show all redraws
Currently writedelay shows the sequence of characters that are sent to
the UI/TUI module. Here nvim has already applied an optimization: when
attempting to put a char in a screen cell, if the same char already was
there with the same attributes, UI output is disabled. When debugging
redrawing it it sometimes more useful to inspect the redraw stream one
step earlier, what region of the screen nvim actually is recomputing
from buffer contents (win_line) and from evaluating statusline
expressions.

Take the popupmenu as an example. When closing the popupmenu (in the
TUI), currently 'writedelay' looks like vim only is redrawing the region
which the pum covered. This is not what happens internally: vim redraws
the entire screen, even if only outputs the changed region.

This commit allows negative values of 'writedelay', which causes a delay
for all redrawn characters, even if the character already was displayed
by the UI before.
2018-02-24 09:10:00 +01:00
Matthieu Coudron
384a39479a 'fillchars': fix defaults logic; handle ambiwidth=double #7986
Update tests.
2018-02-23 00:48:35 +01:00
Justin M. Keyes
0c930c2969 defaults: 'fillchars'
Most fonts should have these by now. Both are a significant visual
improvement.

- Vertical connecting bar `│` is used by tmux, pstree, Windows 7 cmd.exe
  and nvim-qt.exe.
- Middle dot `·` works on Windows 7 cmd.exe, nvim-qt.exe.

For reference: tmux uses these chars to draw lines: │ ├ ─
2018-02-23 00:48:35 +01:00
Daniel Hahler
4696a5a10e health.vim: minor cleanup (#8046) 2018-02-22 02:42:08 +01:00
Daniel Hahler
830b5819a0 health/provider: check Python also with loaded_var (#8047)
`g:loaded_python3_provider` gets set when the autoload file is sourced,
but this might error out, e.g. with deoplete:

    [deoplete] Failed to load python3 host. You can try to see what happened by starting nvim with $NVIM_PYTHON_LOG_FILE set and opening the generated log file. Also, the host stderr is available in messages.
    [deoplete] function remote#define#FunctionBootstrap[1]..remote#host#Require[10]..provider#pythonx#Require[13]..provider#Poll, line 14
    [deoplete] deoplete requires Python3 support("+python3").
    [deoplete] deoplete failed to load. Try the :UpdateRemotePlugins command and restart Neovim.  See also :checkhealth.

It refers to `:checkhealth` from there explicitly, which would then
(without this patch) say that Python 3 is disabled.

This patch changes the reported info to include that it might have been
disabled due to some error, and keeps on going.
2018-02-22 02:38:00 +01:00
Daniel Hahler
1eb4aff57a checkhealth: python: do not report pythonx_errs twice (#8045)
They get reported unconditionally as errors below.
2018-02-22 02:37:23 +01:00
Daniel Hahler
c8074e3792 runtime/autoload/health/*.vim: fix vint warning (#8048) 2018-02-22 02:30:39 +01:00
James McCoy
6bbec71fde
Merge pull request #8019 from jamessan/invalid-provider-stderr
Improve error handling and reduce duplication of providers' #Require()
2018-02-19 20:10:10 -05:00
Justin M. Keyes
06b7561e78
build: remove contents of build/runtime/doc/* surgically (#8024)
Only remove the directory contents. If the directory itself is removed,
then `sudo make install` creates a root-owned …/doc/ directory. That
breaks the next non-root build.

This was an accident of 0b1904d835.

Note: the following does not work, because it misses renamed help files
(which would no longer be in the build-tree definition)

    COMMAND ${CMAKE_COMMAND} -E remove ${BUILDDOCFILES} ${GENERATED_HELP_TAGS}
2018-02-19 21:10:16 +01:00
Shougo
00665d3c70 vim-patch:8.0.1493: completion items cannot be annotated (#8003)
Problem:    Completion items cannot be annotated.
Solution:   Add a "user_data" entry to the completion item. (Ben Jackson,
            coses vim/vim#2608, closes vim/vim#2508)

9b56a57cda
2018-02-18 23:56:59 +01:00
Justin M. Keyes
eccd60aaf4 runtime/doc: modeline is mandatory in help docs
see Vim 8.0.0650 e9134421ab
2018-02-18 22:17:47 +01:00
James McCoy
3af3515e74 Add provider#Poll() to handle starting and polling the provider 2018-02-16 14:08:12 -05:00
James McCoy
6fbb8d6739 provider: Safely access job.stderr in #Require
If `jobstart()` fails, then the subsequent `rpcrequest()` will throw due
to an invalid channel id.  This causes `job.stderr` not to exist, so we
throw another exception when trying to dump the job's stderr.

    Error detected while processing function remote#define#AutocmdBootstrap[1]..remote#host#Require[10]..provider#pythonx#Require:
    line 22:
    E716: Key not present in Dictionary: stderr

This obfuscates the actual problem.
2018-02-16 13:33:23 -05:00
James McCoy
48dc1f3f90 provider: ruby: Use stderr_buffered to collect stderr 2018-02-16 13:33:07 -05:00
Nimit Bhardwaj
e9134421ab vim-patch-8.0.0649 and vim-patch-8.0.0650: autocmd open help 2 times 2018-02-17 00:02:16 +05:30
Björn Linse
6e5cb0debd ui: refactor ui options 2018-02-13 20:48:51 +01:00
Justin M. Keyes
e15f2b4b96 vim-patch:8.0.0906: don't recognize Couchbase files
Problem:    Don't recognize Couchbase files.
Solution:   Add filetype detection. (Eugene Ciurana, closes vim/vim#1951)

d9bc8a801a
2018-02-11 19:03:27 +01:00
Justin M. Keyes
9baf60c617 vim-patch:8.0.0894: there is no test for runtime filetype detection
Problem:    There is no test for runtime filetype detection.
Solution:   Test a list of filetypes from patterns.

0a0217abfa
2018-02-11 19:03:26 +01:00
Justin M. Keyes
16a4168364 vim-patch:8.0.0613: the conf filetype is used before ftdetect from packages
Problem:    The conf filetype detection is done before ftdetect scripts from
            packages that are added later.
Solution:   Add the FALLBACK argument to :setfiletype. (closes vim/vim#1679,
            closes vim/vim#1693)

3e54569b17
2018-02-11 19:03:26 +01:00
Justin M. Keyes
bbdb074aec vim-patch:8.0.0721: :argedit can only have one argument
Problem:    :argedit can only have one argument.
Solution:   Allow for multiple arguments. (Christian Brabandt)
90305c66a8
2018-02-11 15:29:19 +01:00
Justin M. Keyes
c8356e1151 vim-patch:8.0.0440: not enough test coverage in Insert mode
[Nvim note: test_override() omitted]

Problem:    Not enough test coverage in Insert mode.
Solution:   Add lots of tests.  Add test_override(). (Christian Brabandt,
            closes vim/vim#1521)
eb992cb90f
2018-02-11 15:27:55 +01:00
Justin M. Keyes
a265334406 defaults: sidescroll=1
ref #6289
2018-02-09 02:15:25 +01:00
Marco Hinz
dc53629587 macOS: Use pbpaste to detect a working clipboard (#7983)
`pbcopy` writes to the clipboard, it should not be used to sanity-check the clipboard.
2018-02-08 00:27:54 +01:00
Justin M. Keyes
709a87d194 Merge #7463 'incsearch + hlsearch highlight all' 2018-02-01 23:25:55 +01:00
nate
dfcd09dc22 vim-patch:8.0.0672: synconcealed() changes too often #7887
Problem:    Third item of synconcealed() changes too often. (Dominique Pelle)
Solution:   Reset the sequence number at the start of each line.
cc0750dc6e

closes #7589
2018-02-01 02:12:21 +01:00
Justin M. Keyes
6452831cf9 clipboard: macOS: fallback to tmux if pbcopy is broken #7940
On some versions of macOS, pbcopy doesn't work in tmux <2.6
https://superuser.com/q/231130
Fallback to tmux in that case.

Add a healthcheck for this scenario.
2018-01-31 11:37:05 +01:00
Mahmoud Al-Qudsi
5d2dd2ebe2 win: has("wsl") on Windows Subsystem for Linux #7330
Per CMAKE docs, CMAKE_HOST_SYSTEM_VERSION is the result of `uname -r`:
https://cmake.org/cmake/help/v3.4/variable/CMAKE_HOST_SYSTEM_VERSION.html?highlight=uname

    A numeric version string for the system. On systems that support
    uname, this variable is set to the output of uname -r. On other
    systems this is set to major-minor version numbers.

On Windows it is something like "6.1", so it won't match ".*-Microsoft".

Closes #7329
2018-01-30 21:12:49 +01:00
KunMing Xie
2569fabf04 vim-patch:8.0.0427: 'makeencoding' missing from the options window (#7907)
Problem:    'makeencoding' missing from the options window.
Solution:   Add the entry.
ad4187e6fc
2018-01-28 22:53:53 +01:00
Ömer Sinan Ağacan
cd973be11b vim-patch:8.0.1250
Problem:    'hlsearch' highlighting not removed after incsearch (lacygoill)
Solution:   Redraw all windows. Start search at the end of the match.  Improve
            how CTRL-G works with incremental search. Add tests. (Christian
            Brabandt, Hirohito Higashi, haya14busa, closes vim/vim#2267)

f8f8b2eadb
2018-01-26 18:39:20 +03:00
Ömer Sinan Ağacan
41394d8236 vim-patch:8.0.1238
Problem:    Incremental search only shows one match.
Solution:   When 'incsearch' and and 'hlsearch' are both set highlight all
            matches. (haya14busa, closes vim/vim#2198)

2e51d9a097
2018-01-26 18:39:20 +03:00
KunMing Xie
8b1f7d8774 vim-patch:8.0.0431 (#7908)
vim-patch:8.0.0431: 'cinoptions' cannot set indent for extern block
Problem:    'cinoptions' cannot set indent for extern block.
Solution:   Add the "E" flag in 'cinoptions'. (Hirohito Higashi)
7720ba8599
2018-01-25 11:26:47 +01:00
Justin M. Keyes
3308b76339
Merge #7890 'vim-patch: various' 2018-01-22 23:13:54 +01:00
Marco Hinz
dbcdd29139
man.vim: use correct offset in presence of modifier commands
The argument expansion for :Man depends on the number of arguments given to it
starting at the command itself. But user completion functions always provide the
entire command-line which can include modifier commands like :tab, :vert, etc.
leading to a wrong number of arguments.

Prune all arguments up to :Man.

Fixes #7872.
2018-01-22 17:05:52 +01:00
Justin M. Keyes
154822933e vim-patch:8.0.0659: no test for conceal mode
Problem:    No test for conceal mode.
Solution:   Add a conceal mode test. (Dominique Pelle, closes vim/vim#1783)

4d785895d1
2018-01-21 18:42:45 +01:00
Justin M. Keyes
53749e1749 defaults: enable 'cscopeverbose', and deprecate it 2018-01-21 13:18:05 +01:00
Justin M. Keyes
e2eff5269f doc: if_cscop: cleanup 2018-01-21 12:41:35 +01:00
Justin M. Keyes
eb4aab7173 ui: forward 'linespace' option #7883
ref #7520
2018-01-21 09:39:12 +01:00
Justin M. Keyes
94f4469638 man.vim: infer $MANPAGER invocation in more cases
This should handle most cases where Nvim was invoked as $MANPAGER.

Ultimately the stakes are low: :quit will prompt if there are unsaved
changes.

fix #7873
2018-01-19 02:05:23 +01:00
zandrmartin
8fc437ef43 runtime: UpdateRemotePlugins: allow bar (#7865) 2018-01-17 20:50:17 +01:00
Justin M. Keyes
c06995b34d
Merge #7858 'vim-patch: spell-related patches' 2018-01-16 02:14:41 +01:00
Justin M. Keyes
2b1bcd446b runtime: include en.utf-8.spl
Install en.utf-8.spl by default.

- Allows spell-related tests to run.
- Avoids download prompt for spelllang=en users
2018-01-15 23:58:52 +01:00
Justin M. Keyes
f8f7f9d5f5 vim-patch:8.0.0151,3,4 #7389
vim-patch:8.0.0151
Problem:    To pass buffer content to system() and systemlist() one has to
            first create a string or list.
Solution:   Allow passing a buffer number. (LemonBoy,
            closes vim/vim#1240)
12c4492dd3

vim-patch:8.0.0153
Problem:    system() test fails on MS-Windows.
Solution:   Deal when extra space and CR.
9d9c356517

vim-patch:8.0.0154
Problem:    system() test fails on OS/X.
Solution:   Deal with leading spaces.
31f19ce0a0
2018-01-15 23:50:40 +01:00
Felipe Morales
7dd3910f47 tutor: don't resize (#7854) 2018-01-15 21:59:37 +01:00
Filip Szymański
423d7af3df man.lua: avoid float conversion on lua 5.3 (#7851)
Error detected while processing function man#open_page[58]..<SNR>54_put_page:
    line    8:
    E5105: Error while calling lua chunk: /usr/share/nvim/runtime/lua/man.lua:165: Vim(let):E805: Using a Float as a Number
2018-01-15 20:14:27 +01:00
Justin M. Keyes
a8ad6b4d51 cmake: install *.lua files 2018-01-09 11:37:49 +01:00