mirror of
https://github.com/neovim/neovim.git
synced 2025-10-26 12:27:24 +00:00
refactor(lua): reformat with stylua 0.14.0 (#19264)
* reformat Lua runtime to make lint CI pass * reduce max line length to 100
This commit is contained in:
@@ -26,7 +26,9 @@ function M.check()
|
||||
report_error(string.format('Impossible to load parser for %s: %s', parsername, ret))
|
||||
elseif ret then
|
||||
local lang = ts.language.inspect_language(parsername)
|
||||
report_ok(string.format('Loaded parser for %s: ABI version %d', parsername, lang._abi_version))
|
||||
report_ok(
|
||||
string.format('Loaded parser for %s: ABI version %d', parsername, lang._abi_version)
|
||||
)
|
||||
else
|
||||
report_error(string.format('Unable to load parser for %s', parsername))
|
||||
end
|
||||
|
||||
@@ -280,7 +280,8 @@ local function on_line_impl(self, buf, line)
|
||||
end
|
||||
|
||||
if state.iter == nil or state.next_row < line then
|
||||
state.iter = highlighter_query:query():iter_captures(root_node, self.bufnr, line, root_end_row + 1)
|
||||
state.iter =
|
||||
highlighter_query:query():iter_captures(root_node, self.bufnr, line, root_end_row + 1)
|
||||
end
|
||||
|
||||
while line >= state.next_row do
|
||||
|
||||
@@ -32,10 +32,8 @@ function LanguageTree.new(source, lang, opts)
|
||||
_regions = {},
|
||||
_trees = {},
|
||||
_opts = opts,
|
||||
_injection_query = injections[lang] and query.parse_query(lang, injections[lang]) or query.get_query(
|
||||
lang,
|
||||
'injections'
|
||||
),
|
||||
_injection_query = injections[lang] and query.parse_query(lang, injections[lang])
|
||||
or query.get_query(lang, 'injections'),
|
||||
_valid = false,
|
||||
_parser = vim._create_ts_parser(lang),
|
||||
_callbacks = {
|
||||
|
||||
Reference in New Issue
Block a user