Spelling fixes.

This commit is contained in:
Dan Sully
2021-09-25 08:24:43 -07:00
parent 35c0224291
commit 3399168607
3 changed files with 9 additions and 9 deletions

View File

@@ -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)

View File

@@ -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

View File

@@ -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'