aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/treesitter/languagetree.lua
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2023-04-05 17:19:53 +0100
committerGitHub <noreply@github.com>2023-04-05 17:19:53 +0100
commit34ac75b32927328a0c691c5bda987c0fdb5ce9eb (patch)
treee627ce838ebc6d1670a2ed1c30fad237ca8c3e0c /runtime/lua/vim/treesitter/languagetree.lua
parent56e4d79b280b2da1c8d9705d2f300cd93e955f53 (diff)
downloadrneovim-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 'runtime/lua/vim/treesitter/languagetree.lua')
-rw-r--r--runtime/lua/vim/treesitter/languagetree.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/runtime/lua/vim/treesitter/languagetree.lua b/runtime/lua/vim/treesitter/languagetree.lua
index cf0ecbd839..703d2a1f6d 100644
--- a/runtime/lua/vim/treesitter/languagetree.lua
+++ b/runtime/lua/vim/treesitter/languagetree.lua
@@ -32,7 +32,7 @@
--- a plugin that does any kind of analysis on a tree should use a timer to throttle too frequent
--- updates.
-local a = vim.api
+local api = vim.api
local query = require('vim.treesitter.query')
local language = require('vim.treesitter.language')
local Range = require('vim.treesitter._range')
@@ -141,16 +141,16 @@ function LanguageTree:_log(...)
local prefix =
string.format('%s:%d: [%s:%d] ', info.name, info.currentline, self:lang(), nregions)
- a.nvim_out_write(prefix)
+ api.nvim_out_write(prefix)
for _, x in ipairs(args) do
if type(x) == 'string' then
- a.nvim_out_write(x)
+ api.nvim_out_write(x)
else
- a.nvim_out_write(vim.inspect(x, { newline = ' ', indent = '' }))
+ api.nvim_out_write(vim.inspect(x, { newline = ' ', indent = '' }))
end
- a.nvim_out_write(' ')
+ api.nvim_out_write(' ')
end
- a.nvim_out_write('\n')
+ api.nvim_out_write('\n')
end
--- Invalidates this parser and all its children