nvim-telekasten / telekasten.nvim

A Neovim (lua) plugin for working with a markdown zettelkasten / wiki and mixing it with a journal, based on telescope.nvim
MIT License
1.4k stars 90 forks source link

[FR] View headings of a file, either from the same file or different files. #213

Open aniketgm opened 1 year ago

aniketgm commented 1 year ago

Please confirm

Is your feature request related to a problem? Please describe.

Not related to a problem, but from the following discussion here

Describe the solution you'd like

It would be really nice to have a feature to view and jump to a heading either in the current file Or a different file (other than the current buffer) For the different file headings scenario, the following suggestion was discussed:

Another suggestion is to show headings of all notes in one view and then select and jump to it.

Describe alternatives you've considered

Additional context Add any other context or screenshots about the feature request here.

lambtho12 commented 1 year ago

Note for future me:

  1. Get inspiration from telescope-headings for the heading picker
  2. Make a function find_headings(file) that shows the headings of any file
  3. Make an easy to use function that will default to the current buffer so people can use that mapping (suggest <leader>zh)
  4. Add a Telescope actions (C-h) to the relevant pickers that will call find_headings(selected)
  5. Add picker actions to find_headings(file) so we can yank and insert directly the link to the proper heading
Rom1deTroyes commented 1 year ago

I use tagbar-markdown to get an overview of my Telekasten files (and navigate big md files):

"" Display tags ordered by scope in a window
Plug 'preservim/tagbar'
Plug 'lvht/tagbar-markdown'

You can see all the structure of the file, fold the levels and navigate easily in the tagbar or in the file, open a preview, and even choose to sort in alphabetical order :-)

Markdown headings using tagbar

Markdown headings using tagbar

lambtho12 commented 1 year ago

Seems like a neat plugin! Thanks for pointing it out!

aniketgm commented 1 year ago

Tagbar is a nice plugin and I've used it before, for a python development project. However, I faced some issues, one of them being like:

and not just this I was getting some other issues as well. It was getting pretty hectic, since then I stopped using it. @Rom1deTroyes have you faced such issue ? Not sure if they solved it or not. Maybe I'll check it out again. Thanks.