From a6dd1d11a73a52df2bf6860643235313b01f5e24 Mon Sep 17 00:00:00 2001 From: hedyhli Date: Fri, 24 Nov 2023 09:26:49 +0000 Subject: [PATCH 1/4] Auto generate vim docs --- doc/outline.txt | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/doc/outline.txt b/doc/outline.txt index 08907ad..1e3dafd 100644 --- a/doc/outline.txt +++ b/doc/outline.txt @@ -17,22 +17,6 @@ Table of Contents *outline-table-of-contents* - Limitations |outline-limitations| - Related plugins |outline-related-plugins| ------------------------------------------------------------------------------ -**Features** - -- Auto-updates items and highlight for current symbol as the cursor moves -- Supports **JSX** (treesitter), **Markdown**, **Norg** (treesitter), in - addition to LSP, with other treesitter support coming soon -- Outline window opened for each tabpage -- Symbol hierarchy UI with collapsible nodes and automatic collapsing based on - cursor movements -- Custom symbol icon function, mapping, or use LspKind (see |outline-custom-function| and |outline-config|) -- Dynamically set cursorline and cursor colors in outline (see - |outline-screenshot|) -- Extra symbol details and line numbers of symbols (see - |outline-screenshot|) -- Preview symbol location without visiting it -- Neovim command modifiers on where to open outline (see |mods|) - PREREQUISITES *outline-prerequisites* From 44fdeac29a0f076888fe745a1f552bb610a532fd Mon Sep 17 00:00:00 2001 From: hedy Date: Sat, 25 Nov 2023 11:18:16 +0800 Subject: [PATCH 2/4] fix(writer): Ensure all buffer namespaces are cleared ...before setting highlights Closes #38 --- lua/outline/writer.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/outline/writer.lua b/lua/outline/writer.lua index 3d80763..5433d61 100644 --- a/lua/outline/writer.lua +++ b/lua/outline/writer.lua @@ -35,8 +35,8 @@ function M.add_highlights(bufnr, hl_info, nodes) end ---@param bufnr integer -local function clear_virt_text(bufnr) - vim.api.nvim_buf_clear_namespace(bufnr, vtns, 0, -1) +local function clear_all_ns(bufnr) + vim.api.nvim_buf_clear_namespace(bufnr, -1, 0, -1) end ---@param bufnr integer @@ -79,7 +79,7 @@ function M.make_outline(bufnr, items, codewin, find_node) -- Deepest matching node to put cursor on based on hovered line local put_cursor - clear_virt_text(bufnr) + clear_all_ns(bufnr) ---@type string[] local lines = {} From f9cca2c160bcfba125c275bfe72be8c05ba3c47a Mon Sep 17 00:00:00 2001 From: hedyhli Date: Sat, 25 Nov 2023 03:21:18 +0000 Subject: [PATCH 3/4] Auto generate vim docs --- doc/outline.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/outline.txt b/doc/outline.txt index 1e3dafd..73a0d77 100644 --- a/doc/outline.txt +++ b/doc/outline.txt @@ -1,4 +1,4 @@ -*outline.txt* For NVIM v0.7.0 Last change: 2023 November 24 +*outline.txt* For NVIM v0.7.0 Last change: 2023 November 25 ============================================================================== Table of Contents *outline-table-of-contents* From c7a033e85d4f8f5060d28af693710755e5c14f5e Mon Sep 17 00:00:00 2001 From: hedy Date: Sat, 25 Nov 2023 11:25:26 +0800 Subject: [PATCH 4/4] chore: Remove debug message --- lua/outline/sidebar.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/outline/sidebar.lua b/lua/outline/sidebar.lua index dd87466..2a3bf3c 100644 --- a/lua/outline/sidebar.lua +++ b/lua/outline/sidebar.lua @@ -52,7 +52,6 @@ end function Sidebar:destroy() self:delete_autocmds() if self.view:is_open() then - vim.print('closing') self.view:close() end self.view = nil