-
-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for vimdoc #76
Conversation
Thanks for this! I'll take a look at it soon.
Currently outline looks for outline.nvim/lua/outline/sidebar.lua Lines 341 to 345 in 028e0bc
This check is only done on "refresh", ie, when the cursor moves or text changed (governed by I believe it makes sense to special case the |
Thanks, changing this one line fixed the issue. I got rid of "OutlineHelp" from the condition, because outline help buffer is created with 'buflisted' set to false. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Firstly, please use 2 spaces for indents as it's used everywhere else. stylua
(or gg=G
with shiftwidth=2
) can convert it all for you. Perhaps I should've included an .editorconfig
sooner, my bad 😅
There seem to be quite a lot of edge cases that could be improved. For example, sometimes there are empty headings or headings that are not actual document headings but table headings. Sometimes there are multiple tags in one line, sometimes in multiple lines (but they refer to the same thing). The formatting seems quite inconsistent, even in the builtin documentation (e.g. the main page marks modeline as heading, other pages seem to get it right...). We could come up with some heuristics for the most common cases, for now I ignored all that.
Thanks for your thorough testing -- I didn't encounter these issues during mine. What are some help pages you used that can reproduce this issue?
I've added Vimdoc support, the implementation is very similar to that of Norg's. I included headings and tags in the outline, just headings provide very little information.
There seem to be quite a lot of edge cases that could be improved. For example, sometimes there are empty headings or headings that are not actual document headings but table headings. Sometimes there are multiple tags in one line, sometimes in multiple lines (but they refer to the same thing). The formatting seems quite inconsistent, even in the builtin documentation (e.g. the main page marks modeline as heading, other pages seem to get it right...). We could come up with some heuristics for the most common cases, for now I ignored all that.
Example below.
I used
Variable
kind for tags so that they can be easily filtered out.I've encountered on issue, not sure if my change caused it. When there is a window with help file open and another with, for example, a lua file then the outline sidebar will show outline for the lua file always. For some reason the outline for help files seems to work only for one file and if there is another buffer in the same tab it will take over. Even switching between two help files won't work, the first one will be always shown in the sidebar. Other filetypes seem to work fine. I can try to debug that, but maybe someone has an idea what could be the reason?
Resolves: #34