aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/treesitter/language.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/language.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/language.lua')
-rw-r--r--runtime/lua/vim/treesitter/language.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/lua/vim/treesitter/language.lua b/runtime/lua/vim/treesitter/language.lua
index 5b74bb6200..b616d4d70b 100644
--- a/runtime/lua/vim/treesitter/language.lua
+++ b/runtime/lua/vim/treesitter/language.lua
@@ -1,4 +1,4 @@
-local a = vim.api
+local api = vim.api
---@class TSLanguageModule
local M = {}
@@ -89,7 +89,7 @@ function M.add(lang, opts)
end
local fname = 'parser/' .. lang .. '.*'
- local paths = a.nvim_get_runtime_file(fname, false)
+ local paths = api.nvim_get_runtime_file(fname, false)
if #paths == 0 then
error("no parser for '" .. lang .. "' language, see :help treesitter-parsers")
end