Commit Graph

269 Commits

Author SHA1 Message Date
Justin M. Keyes
81c3fa6c9d doc 2019-09-09 09:53:19 -07:00
Justin M. Keyes
976c6667e1 paste: one undo-block per stream
- All "chunks" in a paste-stream should form a single undo-block. Side
  effect of 7a85792884 was to create an undo-block for each chunk.
- Also: remove old :redraw force logic, irrelevant after 7a85792884.
2019-09-02 02:27:13 +02:00
Justin M. Keyes
b6192a9920 API: nvim_paste: add crlf parameter 2019-08-30 08:33:14 +02:00
Justin M. Keyes
eacc70fb3e API: nvim_paste 2019-08-27 22:13:45 +02:00
Björn Linse
c0993ed343 lua: support getting UTF-32 and UTF-16 sizes of replaced text 2019-08-06 20:24:36 +02:00
Björn Linse
b0e26199ec lua: add {old_byte_size} to on_lines buffer change event 2019-08-06 17:01:47 +02:00
Björn Linse
ef3e32d57e api/window: add style="minimal" flag to nvim_open_win() 2019-07-07 20:52:15 +02:00
Justin M. Keyes
04e2ba85b1
doc [ci skip] #10129
- document lua vim.loop #10123
2019-06-10 15:53:42 +02:00
Björn Linse
b684bd05b5 lua: docs and tests for vim.schedule 2019-06-05 10:46:22 +02:00
Björn Linse
f5c56f03bb api: allow nvim_buf_attach from lua using callbacks 2019-06-04 13:45:20 +02:00
KillTheMule
52215f5752 doc/API: document indexing behavior #10058
close #10058
2019-05-26 16:15:20 +02:00
Justin M. Keyes
4769deb36a
doc #10017
- gen_vimdoc.py: fancy "bullet"
- rework `:help channel-callback`
- rename `:help buffered` to `:help channel-buffered`
2019-05-25 10:00:41 +02:00
Justin M. Keyes
f35d233e07 API/nvim_set_keymap: minor cleanup
ref #9924
2019-05-12 13:04:48 +02:00
Yilin Yang
fbf2c414ad API: nvim_set_keymap, nvim_del_keymap #9924
closes #9136

- Treat empty {rhs} like <Nop>

- getchar.c: Pull "repl. MapArg termcodes" into func
  The "preprocessing code" surrounding the replace_termcodes calls needs
  to invoke replace_termcodes, and also check if RHS is equal to "<Nop>".
  To reduce code duplication, factor this out into a helper function.

  Also add an rhs_is_noop flag to MapArguments; buf_do_map_explicit
  expects an empty {rhs} string for "<Nop>", but also needs to distinguish
  that from something like ":map lhs<cr>" where no {rhs} was provided.

- getchar.c: Use allocated buffer for rhs in MapArgs
  Since the MAXMAPLEN limit does not apply to the RHS of a mapping (or
  else an RHS that calls a really long autoload function from a plugin
  would be incorrectly rejected as being too long), use an allocated
  buffer for RHS rather than a static buffer of length MAXMAPLEN + 1.

- Mappings LHS and RHS can contain literal space characters, newlines, etc.

- getchar.c: replace_termcodes in str_to_mapargs
  It makes sense to do this; str_to_mapargs is, intuitively, supposed to
  take a "raw" command string and parse it into a totally "do_map-ready"
  struct.

- api/vim.c: Update lhs, rhs len after replace_termcodes
  Fixes a bug in which replace_termcodes changes the length of lhs or rhs,
  but the later search through the mappings/abbreviations hashtables
  still uses the old length value. This would cause the search to fail
  erroneously and throw 'E31: No such mapping' errors or 'E24: No such
  abbreviation' errors.

- getchar: Create new map_arguments struct
  So that a string of map arguments can be parsed into a more useful, more
  portable data structure.

- getchar.c: Add buf_do_map function
  Exactly the same as the old do_map, but replace the hardcoded references
  to the global `buf_T* curbuf` with a function parameter so that we can
  invoke it from nvim_buf_set_keymap.

- Remove gettext calls in do_map error handling
2019-05-12 11:44:48 +02:00
Justin M. Keyes
a0f775c4d3 doc 2019-05-11 23:42:55 +02:00
Justin M. Keyes
c11e618133 gen_vimdoc.py: support <pre> preformatted text [ci skip] 2019-05-01 00:18:49 +02:00
Justin M. Keyes
afd947e0c3 doc [ci skip]
ref #9886
2019-05-01 00:18:43 +02:00
Justin M. Keyes
c1887f465d gen_vimdoc.py: skip "Parameters" header if all excluded 2019-04-22 21:24:46 +02:00
Justin M. Keyes
eabe7d95f8 doc: UI 2019-04-22 20:56:16 +02:00
Justin M. Keyes
4d97abe805 doc 2019-04-22 20:56:16 +02:00
Justin M. Keyes
27cd1e07ed doc [ci skip]
- README.md: Removed waffle.io because that service is shutting down.
2019-04-08 03:42:21 +02:00
Justin M. Keyes
127e13f53e doc, lint 2019-03-26 22:56:09 +01:00
Justin M. Keyes
bec4066033 gen_vimdoc.py: render nested lists, etc [ci skip]
- render_node() is now the main rendering function: it traverses a node
  and builds the Vim help text recursively.
- render_para() is weird and ugly, it is the entry-point for rendering
  the help text for one docstring'd function.
2019-03-26 21:33:06 +01:00
Aman
8698830cbd doc #9751
closes #9750
2019-03-20 12:44:06 +01:00
Marco Hinz
86992a7bb1
api: numerous small fixes 2019-03-16 15:02:56 +01:00
Marco Hinz
27c4b6b9bd
api: update doc 2019-03-16 12:35:59 +01:00
Björn Linse
dec3e027d9 docs: adjust the generated nvim_open_win docs
The format here is not meant to be ideal, just a backstop until
auto-generation has been fixed.
2019-03-12 17:17:58 +01:00
Björn Linse
f9d3e69cc9 docs: update generated API docs 2019-03-12 17:17:58 +01:00
Björn Linse
4ab0dcc4a9 docs: floating windows introduction 2019-03-12 17:17:58 +01:00
Justin M. Keyes
7e6980a161
doc [ci skip] (#9553) 2019-01-27 15:06:11 +01:00
Justin M. Keyes
cd64f5abd4 gen_api_vimdoc.py: Do not wrap on hyphens, long words
- Any long symbol is intentional and should never be hardwrapped.
- Vim help tags are often hyphenated, and hardwrapping on hyphens breaks
  the Vim help syntax parser.
2019-01-26 20:38:14 +01:00
Justin M. Keyes
c70c8b607f doc [ci skip] #9478
- Lua
- developer guidelines
- MAINTAIN.md
- TUI: cleanup
- TUI: mention Windows terminfo builtins
- cleanup if_pyth, redirect python-bindeval tag

Helped-by: Björn Linse <bjorn.linse@gmail.com>
Helped-by: erw7 <erw7.github@gmail.com>
2019-01-26 20:38:14 +01:00
Chen Mulong
09f6b1f2cb
Fix api doc nvim_buf_lines_event example
when send_buffer=true, the first nvim_buf_lines_event will come with
lastline=-1 instead of 0.
2019-01-22 11:43:44 +08:00
Justin M. Keyes
4ba8266ab1 doc
- CMake features
2018-12-30 21:09:39 +01:00
Justin M. Keyes
857a7312d0
doc (#9288)
- misc
- doc: `:help config`. closes #9329
- cleanup test/README.md
2018-12-09 01:31:34 +01:00
Björn Linse
8b42249cdd RPC: turn errors from async calls into notifications
Previously, nvim sent a response with invalid request id (UINT64_MAX).
In functionaltests, catch unexpected error notifications in after_each().
2018-12-03 10:42:00 +01:00
Justin M. Keyes
30857030e8 doc
- develop.txt is for design/guidelines; architecture/concepts should
  live elsewhere (currently src/nvim/README.md)
- move dev-jargon to intro.txt
- replace https://neovim.io/community (deprecated) with
  https://neovim.io/#chat
- <Cmd> avoids CmdlineEnter/Leave
  https://github.com/vim/vim/issues/2889
2018-11-28 03:48:06 +01:00
Justin M. Keyes
b96730bc3b doc: API 2018-11-05 22:45:49 +01:00
Justin M. Keyes
72b1ce7f30 doc: fix/remove broken tag references 2018-11-05 22:45:48 +01:00
Justin M. Keyes
b11f5aa119 doc: xdg, MAINTAIN.md, channel-id, job control
- tutor: emphasize K
2018-10-11 19:32:31 +02:00
Justin M. Keyes
add2a62398 runtime/doc: fix broken links found by make html 2018-08-25 16:38:24 +02:00
Peter Hodge
ea2e8f4f10 DOC: regenerate api docs 2018-07-25 15:07:13 +10:00
Justin M. Keyes
1999919c31 doc 2018-07-18 13:38:06 +02:00
Justin M. Keyes
feaefdfba2 doc: API 2018-06-11 00:20:39 +02:00
Justin M. Keyes
f72f638f97 doc: job/channel, misc #7783
doc: termios defaults. ref #6992
doc: :help shell-powershell
doc: provider: Python minimum version is 2.7, 3.4
doc: remove :!start special-case. #5844
doc: mention #7917 change which accepts empty Array for Dictionary parameter
doc: <Cmd> pseudokey
doc: lmap change #5658
doc: -s, -es
2018-06-11 00:08:27 +02:00
Justin M. Keyes
c7e6bb2467 doc: API: api-buffer-updates
- move to api.txt
- rewrite
2018-06-08 10:19:46 +02:00
Björn Linse
6e5cb0debd ui: refactor ui options 2018-02-13 20:48:51 +01:00
Justin M. Keyes
fe60fa9faa doc
vim-patch:8.0.1206: no autocmd for entering or leaving the command line
(commit a4f6cec7a3)

NA patches:
vim-patch:8.0.0320: warning for unused variable with small build
2017-12-26 03:58:28 +01:00
Justin M. Keyes
ad9c2d3cb9 doc
closes #7622
2017-12-10 17:13:22 +01:00
Justin M. Keyes
dc232b74fb doc: hack to avoid doxygen bug
Use `@cond <something>` to obscure a section from doxygen.

doxygen thinks kvec_withinit_t() is a function. That adds noise to the
generated API documentation, and also prevents the following function
from being noticed.
2017-12-10 17:13:22 +01:00
Justin M. Keyes
280943d9b9 doc: API (generated) 2017-11-06 04:51:34 +01:00
Justin M. Keyes
842a54a1bb doc 2017-11-06 01:56:04 +01:00
Björn Linse
f640ae0d6e docs: breakout ui.txt from msgpack_rpc.txt 2017-10-26 20:29:10 +02:00
Justin M. Keyes
7068370560 help, man.vim: change "outline" map to gO (#7405) 2017-10-21 02:33:58 +02:00
Justin M. Keyes
b13070ec01 doc/api: nvim_out_write() and friends
References #7178
2017-08-18 21:43:57 +02:00
Justin M. Keyes
0b88bf256d doc: api.txt; deprecate <special> 2017-07-08 16:34:35 +02:00
Björn Linse
e82cb5de4a api: add metadata for ui events 2017-05-10 17:36:31 +02:00
Justin M. Keyes
62ab040fa4 doc: api 2017-05-01 18:52:56 +02:00
Justin M. Keyes
45ef3d9d0c doc: Replace hardcoded TOCs with <M-]> advice. 2017-05-01 17:48:06 +02:00
Justin M. Keyes
6bc6d94ec8 doc: api-contract, CONTRIBUTING.md 2017-04-19 13:48:12 +02:00
Justin M. Keyes
82c67768fa doc: Replace "For Vim ... Last change ..." headers (#6328) 2017-03-21 17:08:19 +01:00
Justin M. Keyes
985bc6c6e0 doc/api.txt: Merge with api-funcs.txt
It's important that users have a single, easy-to-remember place for
reading about the API. So this commit changes gen_api_vimdoc.py so that
the generated section is appended to api.txt instead of creating
a separate document.

Also remove the section numbering and ToC: it's a maintenance cost, and
it will be unnecessary when #5169 is integrated.
2017-03-01 23:14:45 +01:00
Justin M. Keyes
e427cdf2d4 doc/api: Closes #1842 2016-10-31 16:16:37 +01:00
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
Björn Linse
1c22cab2fd api: consistently use nvim_ prefix and update documentation 2016-08-31 21:57:06 +02:00
Justin M. Keyes
cc6edfe357 doc: remove "nvim-" qualfier from tags
It is almost never necessary to qualify documentation as "Nvim
specific".

The main exception to this is vim_diff.txt.
2016-06-15 19:29:27 -04:00
Justin M. Keyes
23a3e58f02 doc: msgpack_rpc: De-emphasize the transport protocol.
Tighten our jargon, avoid mentioning "msgpack" everywhere we mention the
RPC API. Prefer "RPC API" when speaking about the remote API.

Though it's conceivable that we may one day support some protocol other
than msgpack, that isn't relevant to most of our discussion of the API,
including this document.

The file name msgpack_rpc.txt is preserved to avoid totally breaking
URLs.
2016-06-15 19:29:26 -04:00
Björn Linse
2a4ea9a546 docs: start api docs and document highlight mechanism 2016-02-23 21:29:02 +01:00