From 3399168607428d8750171b60937f56090ba868d9 Mon Sep 17 00:00:00 2001 From: Dan Sully Date: Sat, 25 Sep 2021 08:24:43 -0700 Subject: [PATCH] Spelling fixes. --- lua/symbols-outline/markdown.lua | 2 +- lua/symbols-outline/parser.lua | 14 +++++++------- lua/symbols-outline/ui.lua | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lua/symbols-outline/markdown.lua b/lua/symbols-outline/markdown.lua index ccebbc6..e0878b8 100644 --- a/lua/symbols-outline/markdown.lua +++ b/lua/symbols-outline/markdown.lua @@ -3,7 +3,7 @@ local M = {} ---Parses markdown files and returns a table of SymbolInformation[] which is -- used by the plugin to show the outline. -- We do this because markdown does not have a LSP. --- Note that the headings won't have any heirarchy (as of now). +-- Note that the headings won't have any hierarchy (as of now). ---@return table function M.handle_markdown() local lines = vim.api.nvim_buf_get_lines(0, 0, -1, false) diff --git a/lua/symbols-outline/parser.lua b/lua/symbols-outline/parser.lua index 440dd2b..40fb415 100644 --- a/lua/symbols-outline/parser.lua +++ b/lua/symbols-outline/parser.lua @@ -13,17 +13,17 @@ end ---Parses result from LSP into a table of symbols ---@param result table The result from a language server. ----@param depth number The current depth of the symbol in the heirarchy. ----@param heirarchy table A table of booleans which tells if a symbols parent was the last in its group. +---@param depth number The current depth of the symbol in the hierarchy. +---@param hierarchy table A table of booleans which tells if a symbols parent was the last in its group. ---@return table -local function parse_result(result, depth, heirarchy) +local function parse_result(result, depth, hierarchy) local ret = {} for index, value in pairs(result) do if not config.is_symbol_blacklisted(symbols.kinds[value.kind]) then - -- the heirarchy is basically a table of booleans which tells whether + -- the hierarchy is basically a table of booleans which tells whether -- the parent was the last in its group or not - local hir = heirarchy or {} + local hir = hierarchy or {} -- how many parents this node has, 1 is the lowest value because its -- easier to work it local level = depth or 1 @@ -61,7 +61,7 @@ local function parse_result(result, depth, heirarchy) children = children, depth = level, isLast = isLast, - heirarchy = hir + hierarchy = hir }); end end @@ -181,7 +181,7 @@ function M.get_lines(flattened_outline_items) -- else if the parent was not the last in its group, add a -- vertical marker because there are items under us and we need -- to point to those - elseif not value.heirarchy[index] then + elseif not value.hierarchy[index] then line[index] = ui.markers.vertical end end diff --git a/lua/symbols-outline/ui.lua b/lua/symbols-outline/ui.lua index 69f29ac..11b7b3c 100644 --- a/lua/symbols-outline/ui.lua +++ b/lua/symbols-outline/ui.lua @@ -27,7 +27,7 @@ local function highlight_text(name, text, hl_group) end function M.setup_highlights() - -- Setup the FocusedSymbol highlight group if it hasnt been done already by + -- Setup the FocusedSymbol highlight group if it hasn't been done already by -- a theme or manually set if vim.fn.hlexists('FocusedSymbol') == 0 then vim.cmd 'hi FocusedSymbol term=italic,bold cterm=italic ctermbg=yellow ctermfg=darkblue gui=bold,italic guibg=yellow guifg=darkblue'