Created
January 27, 2022 16:54
-
-
Save mreishus/b3f070d9c175520080d52c8ef6b3a628 to your computer and use it in GitHub Desktop.
diff for symbols-outline vim plugin to work with vim-pandoc handling markdown
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lua/symbols-outline/providers/markdown.lua b/lua/symbols-outline/providers/markdown.lua | |
index 225dd66..c7afabd 100644 | |
--- a/lua/symbols-outline/providers/markdown.lua | |
+++ b/lua/symbols-outline/providers/markdown.lua | |
@@ -4,7 +4,7 @@ local M = {} | |
-- probably change this | |
function M.should_use_provider(bufnr) | |
- return vim.api.nvim_buf_get_option(bufnr, "ft") == "markdown" | |
+ return vim.api.nvim_buf_get_option(bufnr, "ft") == "markdown" or vim.api.nvim_buf_get_option(bufnr, "ft") == "pandoc" | |
end | |
function M.hover_info(_, _, on_info) | |
diff --git a/lua/symbols-outline/utils/lsp_utils.lua b/lua/symbols-outline/utils/lsp_utils.lua | |
index 83c410f..0213e46 100644 | |
--- a/lua/symbols-outline/utils/lsp_utils.lua | |
+++ b/lua/symbols-outline/utils/lsp_utils.lua | |
@@ -33,7 +33,7 @@ function M.is_buf_attached_to_lsp(bufnr) | |
end | |
function M.is_buf_markdown(bufnr) | |
- return vim.api.nvim_buf_get_option(bufnr, 'ft') == 'markdown' | |
+ return vim.api.nvim_buf_get_option(bufnr, 'ft') == 'markdown' or vim.api.nvim_buf_get_option(bufnr, 'ft') == 'pandoc' | |
end | |
return M |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment