mirror of
https://github.com/neovim/neovim.git
synced 2026-08-29 18:41:48 +00:00
refactor(lua): consistent use of local aliases
This commit is contained in:
committed by
Christian Clason
parent
a33284c2c0
commit
c10e36fc01
@@ -343,7 +343,7 @@ function M.inspect_tree(opts)
|
||||
local win = api.nvim_get_current_win()
|
||||
local treeview, err = TSTreeView:new(buf, opts.lang)
|
||||
if err and err:match('no parser for lang') then
|
||||
vim.api.nvim_echo({ { err, 'WarningMsg' } }, true, {})
|
||||
api.nvim_echo({ { err, 'WarningMsg' } }, true, {})
|
||||
return
|
||||
elseif not treeview then
|
||||
error(err)
|
||||
@@ -627,7 +627,7 @@ function M.edit_query(lang)
|
||||
local base_buf = base_win and api.nvim_win_get_buf(base_win)
|
||||
local inspect_win = base_buf and vim.b[base_buf].dev_inspect
|
||||
if base_win and base_buf and api.nvim_win_is_valid(inspect_win) then
|
||||
vim.api.nvim_set_current_win(inspect_win)
|
||||
api.nvim_set_current_win(inspect_win)
|
||||
buf = base_buf
|
||||
win = base_win
|
||||
cmd = 'new'
|
||||
|
||||
@@ -9,7 +9,7 @@ function M.check()
|
||||
health.info(
|
||||
string.format(
|
||||
'Treesitter ABI support: min %d, max %d',
|
||||
vim.treesitter.minimum_language_version,
|
||||
ts.minimum_language_version,
|
||||
ts.language_version
|
||||
)
|
||||
)
|
||||
|
||||
@@ -188,7 +188,7 @@ end
|
||||
|
||||
--- Returns available treesitter languages.
|
||||
function M._complete()
|
||||
local parsers = vim.api.nvim_get_runtime_file('parser/*', true)
|
||||
local parsers = api.nvim_get_runtime_file('parser/*', true)
|
||||
local parser_names_set = {} ---@type table<string, boolean>
|
||||
for _, parser in ipairs(parsers) do
|
||||
local parser_name = vim.fn.fnamemodify(parser, ':t:r')
|
||||
|
||||
Reference in New Issue
Block a user