Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

feat: add auto vimdoc generation workflow #76

Merged
merged 1 commit into from
Sep 17, 2021
Merged

Conversation

ram02z
Copy link
Contributor

@ram02z ram02z commented Sep 16, 2021

I saw a comment on the reddit post you made about the lack of a vimdoc file. I have written docs for people in the past but this README is massive (that's a good thing), so I took inspiration from shadmansaleh's lualine and tried out https://github.com/kdheepak/panvimdoc.

The github workflow is mostly borrowed from https://github.com/shadmansaleh/lualine.nvim/blob/master/.github/workflows/docs.yml.

Changes

  • The workflow runs whenever there is a change in the README pushed to any branch, this should probably be limited to the develop branch, however, I wanted your input first.
  • I had to add an empty an empty doc file in this PR so the workflow can submit a PR.
  • Also, I changed the formatting slightly in the README to accomodate for the generated vimdoc.

Issues

  • Not sure if the HOW TO INSTALL section should be ignored, but I think it should since users would have already installed it.
  • Some of the README headings result in odd vimdoc links like *feline-The-setup-function*.

The current generated vimdoc can be seen here: ram02z#11

@ram02z ram02z changed the title feat: add auto doc workflow feat: add auto vimdoc generation workflow Sep 16, 2021
@ram02z ram02z force-pushed the auto_docs branch 3 times, most recently from 241e39b to 712e966 Compare September 16, 2021 23:55
@famiu
Copy link
Owner

famiu commented Sep 17, 2021

Haven't looked into the files yet (will do soon) but I think it should ignore the How To Install section

@famiu
Copy link
Owner

famiu commented Sep 17, 2021

Why are the headers in "Tips and tricks" and "Common issues" changed to quotes

@famiu
Copy link
Owner

famiu commented Sep 17, 2021

I'm not experienced with Vim docs so I could be wrong here, but shouldn't I be able to do :help feline after putting the generated docs as doc/feline.txt? Currently I'm not able to do that

@shadmansaleh
Copy link

shadmansaleh commented Sep 17, 2021

but shouldn't I be able to do :help feline after putting the generated docs as doc/feline.txt?

Run :helptags doc/ to generate tags . Plugin managers will run it on userside

Also do yourself a favor add /doc/tags to gitignore.

@famiu
Copy link
Owner

famiu commented Sep 17, 2021

but shouldn't I be able to do :help feline after putting the generated docs as doc/feline.txt?

Run :helptags doc/ to generate tags . Plugin managers will run it on userside

Also do yourself a favor add /doc/tags to gitignore.

Ah alright, will keep that in mind

@famiu
Copy link
Owner

famiu commented Sep 17, 2021

I made some changes to README.md, you should probably rebase your changes against the latest commit

@ram02z
Copy link
Contributor Author

ram02z commented Sep 17, 2021

Why are the headers in "Tips and tricks" and "Common issues" changed to quotes

The headings resulted in auto generated vimdoc headings like feline-Feline-crashes-or-disappears-for-seemingly-no-reason

@ram02z
Copy link
Contributor Author

ram02z commented Sep 17, 2021

@famiu I changed the How to use heading to Usage and limited the workflow to the develop branch. I also ignored the How to install section.

@famiu
Copy link
Owner

famiu commented Sep 17, 2021

Why are the headers in "Tips and tricks" and "Common issues" changed to quotes

The headings resulted in auto generated vimdoc headings like feline-Feline-crashes-or-disappears-for-seemingly-no-reason

but that isn't a problem for the "Tips and tricks" section, is it? Keep the quotes for "Common issues" I guess but I think "Tips and tricks" should have headers

@ram02z
Copy link
Contributor Author

ram02z commented Sep 17, 2021

but that isn't a problem for the "Tips and tricks" section, is it? Keep the quotes for "Common issues" I guess but I think "Tips and tricks" should have headers

Both "Common issues" and "Tips and tricks" have headings in the vimdoc.

See https://github.com/ram02z/feline.nvim/blob/0d944ee7a675531b2d4d549a72effb08de098814/doc/feline.txt#L868-L878

@famiu
Copy link
Owner

famiu commented Sep 17, 2021

but that isn't a problem for the "Tips and tricks" section, is it? Keep the quotes for "Common issues" I guess but I think "Tips and tricks" should have headers

Both "Common issues" and "Tips and tricks" have headings in the vimdoc.

See https://github.com/ram02z/feline.nvim/blob/0d944ee7a675531b2d4d549a72effb08de098814/doc/feline.txt#L868-L878

I mean the headings inside Tips and tricks (eg: "Reset highlights") should also be headings instead of quotes

@ram02z
Copy link
Contributor Author

ram02z commented Sep 17, 2021

I mean the headings inside Tips and tricks (eg: "Reset highlights") should also be headings instead of quotes

Oh, I understand now. But that would result in the heading for "Use thin line instead of the inactive statusline" to become feline-Use-thin-line-instead-of-the-inactive-statusline, which I think is too long.

@famiu
Copy link
Owner

famiu commented Sep 17, 2021

I mean the headings inside Tips and tricks (eg: "Reset highlights") should also be headings instead of quotes

Oh, I understand now. But that would result in the heading for "Use thin line instead of the inactive statusline" to become feline-Use-thin-line-instead-of-the-inactive-statusline, which I think is too long.

How about rename it to "Thin line for horizontal splits"

@famiu
Copy link
Owner

famiu commented Sep 17, 2021

One last thing, you should probably rename "The setup function" to just "Setting up Feline" or maybe even just "Setup". Also remember to change all references to the setup function header in the README as well

@famiu famiu closed this Sep 17, 2021
@famiu famiu reopened this Sep 17, 2021
@famiu
Copy link
Owner

famiu commented Sep 17, 2021

oops, accidentally clicked on "Close with comment"

@ram02z
Copy link
Contributor Author

ram02z commented Sep 17, 2021

One last thing, you should probably rename "The setup function" to just "Setting up Feline" or maybe even just "Setup". Also remember to change all references to the setup function header in the README as well

Yeah, to follow along with the theme, I will also change How to install to Installation

@famiu
Copy link
Owner

famiu commented Sep 17, 2021

One last thing, you should probably rename "The setup function" to just "Setting up Feline" or maybe even just "Setup". Also remember to change all references to the setup function header in the README as well

Yeah, to follow along with the theme, I will also change How to install to Installation

Yeah, feel free to change any other header you feel is necessary to change as well.

@ram02z
Copy link
Contributor Author

ram02z commented Sep 17, 2021

One last thing, you should probably rename "The setup function" to just "Setting up Feline" or maybe even just "Setup". Also remember to change all references to the setup function header in the README as well

I settled with Setup function, since Setup on it's own was abit ambigious. Should be ready to merge now.

@famiu famiu merged commit a006159 into famiu:develop Sep 17, 2021
@ram02z
Copy link
Contributor Author

ram02z commented Sep 17, 2021

Hmm, not sure why the-setup-function is still being referenced.

|feline-the-setup-function| with the preset as you normally would.

@famiu
Copy link
Owner

famiu commented Sep 17, 2021

The help tags are also not appearing by default when I use the minimal_init. Isn't Packer supposed to setup the help tags?

@@ -510,7 +521,7 @@ hl = {bg = 'oceanblue'},
right_sep = 'slant_right'
```

Not only that, you can add your own custom colors and separators through [the setup function](#the-setup-function) which allows you to just use the name of the color or separator to refer to it.
Not only that, you can add your own custom colors and separators through [the setup function](#setup-function) which allows you to just use the name of the color or separator to refer to it.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I should have changed this to become the [setup function](#setup-function)

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does changing it to that fix the issue?

@ram02z
Copy link
Contributor Author

ram02z commented Sep 17, 2021

The help tags are also not appearing by default when I use the minimal_init. Isn't Packer supposed to setup the help tags?

My help tags generated after I compiled.

Comment on lines -627 to +638
After that, you can just modify the components and call [the setup function](#the-setup-function) with the preset as you normally would.
After that, you can just modify the components and call [the setup function](#setup-function) with the preset as you normally would.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you should change this to the [setup function](#setup-function) too

@famiu
Copy link
Owner

famiu commented Sep 17, 2021

The help tags are also not appearing by default when I use the minimal_init. Isn't Packer supposed to setup the help tags?

My help tags generated after I compiled.

What do you mean by "compiled" in this case?

@ram02z
Copy link
Contributor Author

ram02z commented Sep 17, 2021

What do you mean by "compiled" in this case?

After I ran PackerCompile, it showed up. You could also run :helptags doc/ to force the generation of the tags.

@famiu
Copy link
Owner

famiu commented Sep 17, 2021

What do you mean by "compiled" in this case?

After I ran PackerCompile, it showed up. You could also run :helptags doc/ to force the generation of the tags.

Ah. Alright, it seems to work fine now after running PackerCompile

@ram02z ram02z deleted the auto_docs branch September 17, 2021 10:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants