diff --git a/README.md b/README.md index 1ee38e4..73dad96 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,10 @@ I do not merge PRs from the original repo that I don't personally need. ## Fixes +- Extra padding/indent on left on outline window removed. Fixed issues: + - simrat39/symbols-outline.nvim/165 + - simrat39/symbols-outline.nvim/178 + - simrat39/symbols-outline.nvim/209 - Symbol preview empty (simrat39/symbols-outline.nvim#176) - `SymbolsOutlineClose` crashing when already closed: simrat39/symbols-outline.nvim#163 - Symbols not showing by supporting Nerd fonts v3.0: simrat39/symbols-outline.nvim#225 diff --git a/lua/symbols-outline/parser.lua b/lua/symbols-outline/parser.lua index d1945fb..e0088ed 100644 --- a/lua/symbols-outline/parser.lua +++ b/lua/symbols-outline/parser.lua @@ -118,12 +118,10 @@ function M.get_lines(flattened_outline_items) end for index, _ in ipairs(line) do - -- all items start with a space (or two) if config.options.guides.enabled then - -- makes the guides and add guide markers local guide_markers = config.options.guides.markers if index == 1 then - line[index] = ' ' + line[index] = '' -- if index is last, add a bottom marker if current item is last, -- else add a middle marker elseif index == #line then @@ -177,6 +175,7 @@ function M.get_lines(flattened_outline_items) running_length = running_length + vim.fn.strlen(line[index]) end + line[1] = '' local final_prefix = line local string_prefix = t_utils.table_to_str(final_prefix) @@ -197,7 +196,7 @@ function M.get_lines(flattened_outline_items) local max_width = #tostring(lineno_max) -- Padded prefix to the right of lineno for better readability if linenos -- get more than 2 digits. - local prefix = string.rep(' ', math.max(2, max_width) - 1) + local prefix = string.rep(' ', math.max(2, max_width)+1) -- Offset to hl_info due to adding lineno on the left of each symbol line local total_offset = #prefix for i, node in ipairs(flattened_outline_items) do diff --git a/lua/symbols-outline/view.lua b/lua/symbols-outline/view.lua index 4886440..15d5ba9 100644 --- a/lua/symbols-outline/view.lua +++ b/lua/symbols-outline/view.lua @@ -25,6 +25,7 @@ function View:setup_view() -- window stuff vim.api.nvim_win_set_option(self.winnr, 'spell', false) vim.api.nvim_win_set_option(self.winnr, 'signcolumn', 'no') + vim.api.nvim_win_set_option(self.winnr, 'foldcolumn', '0') vim.api.nvim_win_set_option(self.winnr, 'number', false) vim.api.nvim_win_set_option(self.winnr, 'relativenumber', false) vim.api.nvim_win_set_option(self.winnr, 'winfixwidth', true)