diff options
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/autoload/health/nvim.vim | 2 | ||||
-rw-r--r-- | runtime/autoload/health/provider.vim | 23 | ||||
-rw-r--r-- | runtime/autoload/man.vim | 4 | ||||
-rw-r--r-- | runtime/autoload/provider/node.vim | 2 | ||||
-rw-r--r-- | runtime/doc/api.txt | 44 | ||||
-rw-r--r-- | runtime/doc/channel.txt | 4 | ||||
-rw-r--r-- | runtime/doc/develop.txt | 6 | ||||
-rw-r--r-- | runtime/doc/vim_diff.txt | 1 | ||||
-rw-r--r-- | runtime/plugin/health.vim | 9 |
9 files changed, 39 insertions, 56 deletions
diff --git a/runtime/autoload/health/nvim.vim b/runtime/autoload/health/nvim.vim index 58033f0405..017c047ef4 100644 --- a/runtime/autoload/health/nvim.vim +++ b/runtime/autoload/health/nvim.vim @@ -174,7 +174,7 @@ function! s:check_terminal() abort \ .(empty(kbs_entry) ? '? (not found)' : kdch1_entry)) endif for env_var in ['XTERM_VERSION', 'VTE_VERSION', 'TERM_PROGRAM', 'COLORTERM', 'SSH_TTY'] - if !exists('$'.env_var) + if exists('$'.env_var) call health#report_info(printf("$%s='%s'", env_var, eval('$'.env_var))) endif endfor diff --git a/runtime/autoload/health/provider.vim b/runtime/autoload/health/provider.vim index 39e592c471..d1239db605 100644 --- a/runtime/autoload/health/provider.vim +++ b/runtime/autoload/health/provider.vim @@ -370,27 +370,16 @@ function! s:check_python(version) abort let python_bin = '' endif - " Check if $VIRTUAL_ENV is active - let virtualenv_inactive = 0 - + " Check if $VIRTUAL_ENV is valid. if exists('$VIRTUAL_ENV') - if !empty(pyenv) - let pyenv_prefix = resolve(s:trim(s:system([pyenv, 'prefix']))) - if $VIRTUAL_ENV != pyenv_prefix - let virtualenv_inactive = 1 - endif - elseif !empty(pyname) && exepath(pyname) !~# '^'.$VIRTUAL_ENV.'/' - let virtualenv_inactive = 1 + if !empty(pyname) && $VIRTUAL_ENV !=# matchstr(exepath(pyname), '^\V'.$VIRTUAL_ENV) + call health#report_warn( + \ '$VIRTUAL_ENV exists but appears to be inactive. ' + \ . 'This could lead to unexpected results.', + \ [ 'If you are using Zsh, see: http://vi.stackexchange.com/a/7654' ]) endif endif - if virtualenv_inactive - call health#report_warn( - \ '$VIRTUAL_ENV exists but appears to be inactive. ' - \ . 'This could lead to unexpected results.', - \ [ 'If you are using Zsh, see: http://vi.stackexchange.com/a/7654/5229' ]) - endif - " Diagnostic output call health#report_info('Executable: ' . (empty(python_bin) ? 'Not found' : python_bin)) if len(python_multiple) diff --git a/runtime/autoload/man.vim b/runtime/autoload/man.vim index dd71ede680..af5c4dbd60 100644 --- a/runtime/autoload/man.vim +++ b/runtime/autoload/man.vim @@ -65,9 +65,9 @@ function! man#open_page(count, count1, mods, ...) abort try set eventignore+=BufReadCmd if a:mods !~# 'tab' && s:find_man() - execute 'silent edit' fnameescape(bufname) + execute 'silent keepalt edit' fnameescape(bufname) else - execute 'silent' a:mods 'split' fnameescape(bufname) + execute 'silent keepalt' a:mods 'split' fnameescape(bufname) endif finally set eventignore-=BufReadCmd diff --git a/runtime/autoload/provider/node.vim b/runtime/autoload/provider/node.vim index adcc926074..3dde18022e 100644 --- a/runtime/autoload/provider/node.vim +++ b/runtime/autoload/provider/node.vim @@ -114,7 +114,7 @@ let s:err = '' let s:prog = provider#node#Detect() if empty(s:prog) - let s:err = 'Cannot find the "neovim" node package. Try :CheckHealth' + let s:err = 'Cannot find the "neovim" node package. Try :checkhealth' endif call remote#host#RegisterPlugin('node-provider', 'node', []) diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index 6c2a3a8632..fd6918de43 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -512,27 +512,27 @@ nvim_parse_expression({expr}, {flags}, {highlight}) [start_col, end_col)). Return:~ - AST: top-level dictionary holds keys "error": Dictionary - with error, present only if parser saw some error. - Contains the following keys: "message": String, error - message in printf format, translated. Must contain exactly - one "%.*s". "arg": String, error message argument. "len": - Amount of bytes successfully parsed. With flags equal to - "" that should be equal to the length of expr string. - @note: “Sucessfully parsed” here means “participated in - AST creation”, not “till the first error”. "ast": AST, - either nil or a dictionary with these keys: "type": node - type, one of the value names from ExprASTNodeType - stringified without "kExprNode" prefix. "start": a pair - [line, column] describing where node is “started” where - "line" is always 0 (will not be 0 if you will be using - nvim_parse_viml() on e.g. ":let", but that is not present - yet). Both elements are Integers. "len": “length” of the - node. This and "start" are there for debugging purposes - primary (debugging parser and providing debug - information). "children": a list of nodes described in - top/"ast". There always is zero, one or two children, key - will not be present if node has no children. Maximum + AST: top-level dictionary with these keys: "error": + Dictionary with error, present only if parser saw some + error. Contains the following keys: "message": String, + error message in printf format, translated. Must contain + exactly one "%.*s". "arg": String, error message argument. + "len": Amount of bytes successfully parsed. With flags + equal to "" that should be equal to the length of expr + string. @note: “Sucessfully parsed” here means + “participated in AST creation”, not “till the first + error”. "ast": AST, either nil or a dictionary with these + keys: "type": node type, one of the value names from + ExprASTNodeType stringified without "kExprNode" prefix. + "start": a pair [line, column] describing where node is + “started” where "line" is always 0 (will not be 0 if you + will be using nvim_parse_viml() on e.g. ":let", but that + is not present yet). Both elements are Integers. "len": + “length” of the node. This and "start" are there for + debugging purposes primary (debugging parser and providing + debug information). "children": a list of nodes described + in top/"ast". There always is zero, one or two children, + key will not be present if node has no children. Maximum number of children may be found in node_maxchildren array. Local values (present only for certain nodes): "scope": a single Integer, specifies scope for "Option" and @@ -1047,4 +1047,4 @@ nvim_ui_try_resize({width}, {height}) *nvim_ui_try_resize()* nvim_ui_set_option({name}, {value}) *nvim_ui_set_option()* TODO: Documentation - vim:tw=78:ts=8:ft=help:norl:
\ No newline at end of file + vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/channel.txt b/runtime/doc/channel.txt index c4f7eb1ff1..eb2bac6fce 100644 --- a/runtime/doc/channel.txt +++ b/runtime/doc/channel.txt @@ -4,9 +4,9 @@ NVIM REFERENCE MANUAL by Thiago de Arruda -Nvim's facilities for async io *channel* +Nvim asynchronous IO *channel* - Type <M-]> to see the table of contents. + Type |gO| to see the table of contents. ============================================================================== 1. Introduction *channel-intro* diff --git a/runtime/doc/develop.txt b/runtime/doc/develop.txt index 36826e2479..4e77f40035 100644 --- a/runtime/doc/develop.txt +++ b/runtime/doc/develop.txt @@ -270,9 +270,9 @@ External UIs are expected to implement these common features: - Send the "super" key (Windows key, Apple key) as a |<D-| chord. Implementation ~ -- Options can be monitored for changes by the |OptionSet| autocmd. E.g. if the - user sets the 'guifont' option, this autocmd notifies channel 42: > - autocmd OptionSet guifont call rpcnotify(42, 'option-changed', 'guifont', &guifont) +- UI-related options ('guifont', 'ambiwidth', …) are published in the + "option_set" |ui-global| event. The event is triggered when the UI first + connects to Nvim and whenever an option is changed by the user or a plugin. vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt index 7061f01316..9643777975 100644 --- a/runtime/doc/vim_diff.txt +++ b/runtime/doc/vim_diff.txt @@ -70,6 +70,7 @@ Providers Ruby plugins |provider-ruby| Shared data |shada| Embedded terminal |terminal| +VimL parser |nvim_parse_expression()| XDG base directories |xdg| USER EXPERIENCE ~ diff --git a/runtime/plugin/health.vim b/runtime/plugin/health.vim index e3482cb0fe..66ae8fb239 100644 --- a/runtime/plugin/health.vim +++ b/runtime/plugin/health.vim @@ -1,8 +1 @@ -function! s:complete(lead, _line, _pos) abort - return sort(filter(map(globpath(&runtimepath, 'autoload/health/*', 1, 1), - \ 'fnamemodify(v:val, ":t:r")'), - \ 'empty(a:lead) || v:val[:strlen(a:lead)-1] ==# a:lead')) -endfunction - -command! -nargs=* -complete=customlist,s:complete CheckHealth - \ call health#check([<f-args>]) +autocmd CmdUndefined CheckHealth checkhealth |