chore(fmt): stylua
This commit is contained in:
@@ -287,7 +287,7 @@ function M.resolve_config()
|
|||||||
if not M.o.guides.enabled then
|
if not M.o.guides.enabled then
|
||||||
M.o.guides = {
|
M.o.guides = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
markers = { middle = ' ', vertical = ' ', bottom = ' ' }
|
markers = { middle = ' ', vertical = ' ', bottom = ' ' },
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
----- SPLIT COMMAND -----
|
----- SPLIT COMMAND -----
|
||||||
|
|||||||
@@ -24,7 +24,11 @@ end
|
|||||||
function M.hovers(bufnr, nodes)
|
function M.hovers(bufnr, nodes)
|
||||||
for line, node in ipairs(nodes) do
|
for line, node in ipairs(nodes) do
|
||||||
if node.hovered then
|
if node.hovered then
|
||||||
vim.api.nvim_buf_add_highlight(bufnr, M.ns.hover, 'OutlineCurrent', line - 1, node.prefix_length, -1)
|
-- stylua: ignore start
|
||||||
|
vim.api.nvim_buf_add_highlight(
|
||||||
|
bufnr, M.ns.hover, 'OutlineCurrent', line - 1, node.prefix_length, -1
|
||||||
|
)
|
||||||
|
-- stylua: ignore end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -36,8 +40,7 @@ function M.items(bufnr, hl_list)
|
|||||||
for _, h in ipairs(hl_list) do
|
for _, h in ipairs(hl_list) do
|
||||||
-- stylua: ignore start
|
-- stylua: ignore start
|
||||||
vim.api.nvim_buf_add_highlight(
|
vim.api.nvim_buf_add_highlight(
|
||||||
bufnr, M.ns.items,
|
bufnr, M.ns.items, h.name, h.line - 1, h.from, h.to
|
||||||
h.name, h.line - 1, h.from, h.to
|
|
||||||
)
|
)
|
||||||
-- stylua: ignore end
|
-- stylua: ignore end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -204,7 +204,7 @@ function M.get_symbol(opts)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if not utils.table_has_content(sidebar.hovered) then
|
if not utils.table_has_content(sidebar.hovered) then
|
||||||
return ""
|
return ''
|
||||||
end
|
end
|
||||||
|
|
||||||
local kind
|
local kind
|
||||||
@@ -218,7 +218,7 @@ function M.get_symbol(opts)
|
|||||||
return node.name
|
return node.name
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return ""
|
return ''
|
||||||
end
|
end
|
||||||
|
|
||||||
---Handle follow cursor command with bang
|
---Handle follow cursor command with bang
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ local cfg = require('outline.config')
|
|||||||
local folding = require('outline.folding')
|
local folding = require('outline.folding')
|
||||||
local parser = require('outline.parser')
|
local parser = require('outline.parser')
|
||||||
local providers = require('outline.providers.init')
|
local providers = require('outline.providers.init')
|
||||||
local utils = require('outline.utils.init')
|
|
||||||
local symbols = require('outline.symbols')
|
local symbols = require('outline.symbols')
|
||||||
|
local utils = require('outline.utils.init')
|
||||||
|
|
||||||
local strlen = vim.fn.strlen
|
local strlen = vim.fn.strlen
|
||||||
|
|
||||||
@@ -621,10 +621,10 @@ function Sidebar:build_outline(find_node)
|
|||||||
local put_cursor
|
local put_cursor
|
||||||
self.flats = {}
|
self.flats = {}
|
||||||
local line_count = 0
|
local line_count = 0
|
||||||
local lines = {} ---@type string[]
|
local lines = {} ---@type string[]
|
||||||
local details = {} ---@type string[]
|
local details = {} ---@type string[]
|
||||||
local linenos = {} ---@type string[]
|
local linenos = {} ---@type string[]
|
||||||
local hl = {} ---@type outline.HL[]
|
local hl = {} ---@type outline.HL[]
|
||||||
|
|
||||||
-- Find the prefix for each line needed for the lineno space.
|
-- Find the prefix for each line needed for the lineno space.
|
||||||
-- Use [max width of [max_line-1]] + 1 space padding.
|
-- Use [max width of [max_line-1]] + 1 space padding.
|
||||||
|
|||||||
Reference in New Issue
Block a user