Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lua/deftree/lsp.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
local M = {}

-- Helper functions
-- LSP calls
---@param bufnr integer
---@return table<integer, { error: (lsp.ResponseError)?, result: any }>?
local function _get_doc_symbols(bufnr)
Expand All @@ -23,6 +23,7 @@ local function _get_doc_symbols(bufnr)
return result
end

-- Helper functions
---@param chunks DocumentSymbolOutput[]
local function _recursive_doc_sym_helper(chunks)
local newChunks = {}
Expand Down
12 changes: 6 additions & 6 deletions lua/deftree/ui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,11 @@ function M.render()
local lines = _add_title("Table of Contents") -- add title
lines = vim.list_extend(lines, M.render_toc()) -- add toc
lines = vim.list_extend(lines, _add_separator()) -- add separator
lines = vim.list_extend(lines, _add_title("Class Heirarchy")) -- add class heirarchy title
lines = vim.list_extend(lines, M.render_class_heirarchy()) -- add class heirarchy
lines = vim.list_extend(lines, _add_title("Class Hierarchy")) -- add class hierarchy title
lines = vim.list_extend(lines, M.render_class_hierarchy()) -- add class hierarchy
lines = vim.list_extend(lines, _add_separator()) -- add separator
lines = vim.list_extend(lines, _add_title("Function Heirarchy")) -- add function heirarchy title
lines = vim.list_extend(lines, M.render_function_heirarchy()) -- add function heirarchy
lines = vim.list_extend(lines, _add_title("Function Hierarchy")) -- add function hierarchy title
lines = vim.list_extend(lines, M.render_function_hierarchy()) -- add function hierarchy
_set_buf_lines(state.bufnr, lines)
end

Expand All @@ -169,7 +169,7 @@ function M.render_toc()
end

---@return string[]
function M.render_class_heirarchy()
function M.render_class_hierarchy()
if not state.has_buf() or not state.src_bufnr then
vim.notify("Deftree: No buffer or source buffer found", vim.log.levels.WARN)
return {}
Expand All @@ -180,7 +180,7 @@ function M.render_class_heirarchy()
end

---@return string[]
function M.render_function_heirarchy()
function M.render_function_hierarchy()
if not state.has_buf() or not state.src_bufnr then
vim.notify("Deftree: No buffer or source buffer found", vim.log.levels.WARN)
return {}
Expand Down