Skip to content
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

Introduce template_dir config option #378

Merged
merged 4 commits into from
Nov 12, 2024
Merged

Conversation

mintelm
Copy link
Contributor

@mintelm mintelm commented Nov 6, 2024

This introduces a new config option called template_dir. What this new config option does it adds the possibility to define an additional directory to include when using load_template(). I have the 'issue' that my neovim configuration setup is as follows: all my plugins are under $RTP/lua/plugins/.... This means that I can not have my templates right where I want them to be (i.e. $RTP/lua/plugins/overseer/template/abc. This patch would fix my issue and I can imagine that others could also benefit from specifying an additional template directory.

@github-actions github-actions bot requested a review from stevearc November 6, 2024 12:14
Copy link
Owner

@stevearc stevearc left a comment

Choose a reason for hiding this comment

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

What do you think about changing it to template_dirs as a list of strings and using it for the definition of the default path?

@mintelm
Copy link
Contributor Author

mintelm commented Nov 12, 2024

I think that's a nicer approach yes, I changed it and also rebased to latest main.
I was unsure which format to use for the directories, i.e. foo/bar or foo.bar, since I am not typically developing lua. What do you prefer? I used the dot style right now (I think this is typically used for loading lua modules via require()).

Copy link
Owner

@stevearc stevearc left a comment

Choose a reason for hiding this comment

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

LGTM thanks for the PR!

@stevearc stevearc merged commit 2d00cdf into stevearc:master Nov 12, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants