diff options
author | Lewis Russell <lewis6991@gmail.com> | 2023-04-05 17:19:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-05 17:19:53 +0100 |
commit | 34ac75b32927328a0c691c5bda987c0fdb5ce9eb (patch) | |
tree | e627ce838ebc6d1670a2ed1c30fad237ca8c3e0c /src | |
parent | 56e4d79b280b2da1c8d9705d2f300cd93e955f53 (diff) | |
download | rneovim-34ac75b32927328a0c691c5bda987c0fdb5ce9eb.tar.gz rneovim-34ac75b32927328a0c691c5bda987c0fdb5ce9eb.tar.bz2 rneovim-34ac75b32927328a0c691c5bda987c0fdb5ce9eb.zip |
refactor: rename local API alias from a to api
Problem:
Codebase inconsistently binds vim.api onto a or api.
Solution:
Use api everywhere. a as an identifier is too short to have at the
module level.
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/api/extmark.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/nvim/api/extmark.c b/src/nvim/api/extmark.c index 4afbdfa487..fc17b9d0cc 100644 --- a/src/nvim/api/extmark.c +++ b/src/nvim/api/extmark.c @@ -311,17 +311,17 @@ ArrayOf(Integer) nvim_buf_get_extmark_by_id(Buffer buffer, Integer ns_id, /// /// Example: /// <pre>lua -/// local a = vim.api -/// local pos = a.nvim_win_get_cursor(0) -/// local ns = a.nvim_create_namespace('my-plugin') +/// local api = vim.api +/// local pos = api.nvim_win_get_cursor(0) +/// local ns = api.nvim_create_namespace('my-plugin') /// -- Create new extmark at line 1, column 1. -/// local m1 = a.nvim_buf_set_extmark(0, ns, 0, 0, {}) +/// local m1 = api.nvim_buf_set_extmark(0, ns, 0, 0, {}) /// -- Create new extmark at line 3, column 1. -/// local m2 = a.nvim_buf_set_extmark(0, ns, 2, 0, {}) +/// local m2 = api.nvim_buf_set_extmark(0, ns, 2, 0, {}) /// -- Get extmarks only from line 3. -/// local ms = a.nvim_buf_get_extmarks(0, ns, {2,0}, {2,0}, {}) +/// local ms = api.nvim_buf_get_extmarks(0, ns, {2,0}, {2,0}, {}) /// -- Get all marks in this buffer + namespace. -/// local all = a.nvim_buf_get_extmarks(0, ns, 0, -1, {}) +/// local all = api.nvim_buf_get_extmarks(0, ns, 0, -1, {}) /// print(vim.inspect(ms)) /// </pre> /// |