| Commit message (Collapse) | Author | Age |
... | |
|
|
|
| |
Note: some of these changes are breaking, like change of API signatures
|
|
|
|
|
| |
Works similar to ex <f-args>. It only splits the arguments if the
command has more than one posible argument. In cases were the command
can only have 1 argument opts.fargs = { opts.args }
|
|
|
|
|
|
|
|
|
|
| |
nvim_buf_get_text is the mirror of nvim_buf_set_text. It differs from
nvim_buf_get_lines in that it allows retrieving only portions of lines.
While this can typically be done easily enough by API clients,
implementing this function provides symmetry between the get/set
text/lines APIs, and also provides a nice convenience that saves API
clients the work of having to slice the result of nvim_buf_get_lines
themselves.
|
| |
|
| |
|
|
|
|
|
|
| |
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: Dani Dickstein <daniel.dickstein@gmail.com>
Co-authored-by: Axel Dahlberg <git@valleymnt.com>
|
| |
|
| |
|
|
|
|
|
|
|
| |
Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com>
Co-authored-by: Gregory Anders <greg@gpanders.com>
Co-authored-by: Sebastian Volland <seb@baunz.net>
Co-authored-by: Lewis Russell <lewis6991@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Behavioral changes:
1. Added support for lua function in keymaps in
--------------------------------------------
- nvim_set_keymap
Can set lua function as keymap rhs like following:
```lua
vim.api.nvim_{buf_}set_keymap('n', '<leader>lr', '', {callback = vim.lsp.buf.references})
```
Note: lua function can only be set from lua . If api function being
called from viml or over rpc this option isn't available.
- nvim_{buf_}get_keymap
When called from lua, lua function is returned is `callback` key .
But in other cases callback contains number of the function ref.
- :umap, nvim_del_keymap & nvim_buf_del_keymap clears lua keymaps correctly.
- :map commands for displaing rhs .
For lua keymaps rhs is displayed as <Lua function ref_no>
Note: lua keymap cannot be set through viml command / functions.
- mapargs()
When dict is false it returns string in `<Lua function ref_no>`
format (same format as :map commands).
When dict is true it returns ref_no number in `callback` key.
- mapcheck()
returns string in `<Lua function ref_no>` format (same format as :map commands).
2. Added support for keymap description
---------------------------------------
- nvim_{buf_}set_keymap: added `desc` option in opts table .
```lua
vim.api.nvim_set_keymap('n', '<leader>w', '<cmd>w<cr>', {desc='Save current file'})
```
- nvim_{buf_}get_keymap: contains `desc` in returned list.
- commands like `:nmap <leader>w` will show description in a new line below rhs.
- `maparg()` return dict contains `desc`.
|
|\
| |
| | |
feat(api): implement nvim_{add,del}_user_command
|
| |
| |
| |
| |
| | |
Add support for adding and removing custom user commands with the Nvim
API.
|
|/
|
|
|
|
|
|
|
| |
Co-authored-by: Gregory Anders <8965202+gpanders@users.noreply.github.com>
Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: Christoph Hasse <hassec@users.noreply.github.com>
Co-authored-by: Alef Pereira <ealefpereira@gmail.com>
Co-authored-by: AusCyber <willp@outlook.com.au>
Co-authored-by: kylo252 <59826753+kylo252@users.noreply.github.com>
|
|
|
| |
Co-authored-by: marvim <marvim@users.noreply.github.com>
|
|
|
|
|
|
|
| |
nvim_buf_get_extmark uses "end_row" rather than "end_line" in its
'details' dict, which means callers must modify the key names if they
want to re-use the information. Change the parameter name in
nvim_buf_set_extmark to "end_row" and use "end_line" as an alias
to make this more consistent.
|
|
|
| |
Co-authored-by: marvim <marvim@users.noreply.github.com>
|
| |
|
|
|
|
|
| |
In the future we might want to extend the concept of named marks and
adding opts reduces the need of changing the function signature in the
furute.
|
|
|
|
|
| |
The spacing fix drew attention to a couple of places that were using
incorrect formatting such as the key listing for `nvim_open_win`, so
those were fixed too.
|
|
|
| |
Co-authored-by: marvim <marvim@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds the following API functions.
- nvim_buf_set_mark(buf, name, line, col)
* Set marks in a buffer.
- nvim_buf_del_mark(buf, name)
* Delete a mark that belongs to buffer.
- nvim_del_mark(name)
* Delete a global mark.
- nvim_get_mark(name)
* Get a global mark.
Tests:
- Adds test to all the new api functions, and adds more for the existing
nvim_buf_get_mark.
* Tests include failure cases.
Documentation:
- Adds documentation for all the new functions, and improves the
existing fucntion docs.
|
| |
|
|
|
|
| |
ref #11456
|
|
|
|
| |
fix #11456
|
|
|
|
|
|
|
| |
Extmarks mostly use api-indexing, except for nvim_buf_get_extmarks(),
which uses api-indexing with inclusive ranges.
ref #11456
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
PR #13998 added support for floating window borders.
|
| |
|
| |
|
|\
| |
| | |
Minor observational corrections to the nvim_buf_set_extmark documentation
|
| | |
|
| |
| |
| |
| |
| | |
Add a note for the line and col, saying they are 0-based.
The end_col appears to be exclusive, unline the end_line.
|
| | |
|
|/ |
|
| |
|
| |
|
|\
| |
| | |
api: add vim.api.nvim_win_hide
|
| | |
|
| |
| |
| |
| |
| | |
The sematics and signature of this API is going to change, but we
don't wanna delay 0.5 for it. Mark API as unstable for now.
|
|/ |
|
|
|
|
| |
expecting boolean values
|
| |
|
|
|
|
| |
values true, or false.
|
|
|
|
|
| |
Applies the changes generated with ./scripts/gen_vimdoc.py to add
missing documentation.
|
| |
|