mirror of
https://github.com/neovim/neovim.git
synced 2025-12-07 15:14:04 +00:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user