style: avoid overindenting things

This commit is contained in:
Thomas Vigouroux 2020-04-19 17:31:00 +02:00
parent 51ca6a5069
commit 5783e7d248

View file

@ -17,11 +17,13 @@ end
function M.collect_locals(bufnr)
local ft = api.nvim_buf_get_option(bufnr, "ft")
if ft then
if not ft then return end
local query = queries.get_query(ft, 'locals')
local parser = parsers.get_parser(bufnr)
if parser then
if not parser then return end
local root = parser:parse():root()
local start_row, _, end_row, _ = root:range()
@ -33,8 +35,6 @@ function M.collect_locals(bufnr)
return locals
end
end
end
function M.on_lines(_, buf, _, firstline, lastline, new_lastline)
M.locals[buf] = M.collect_locals(buf)