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

Feat: Option to change API key env variable name #28

Open
ficcdaf opened this issue Dec 6, 2024 · 1 comment
Open

Feat: Option to change API key env variable name #28

ficcdaf opened this issue Dec 6, 2024 · 1 comment

Comments

@ficcdaf
Copy link
Contributor

ficcdaf commented Dec 6, 2024

I noticed that the API key environment variable name isn't actually hard-coded:

-- config.lua
local api_key = os.getenv(M.api_key_env_var_name)

I think it would be nice if the currently required environment variable, OBSIDIAN_REST_API_KEY, was instead a default that the user can change should they wish. I propose an optional configuration option that the user can pass during plugin setup.

I can add this in a separate PR once I am done working on #27 .

@oflisback
Copy link
Owner

That sounds great, if you want some inspiration personally I'm impressed by how gp.nvim manages its API key https://github.com/Robitx/gp.nvim?tab=readme-ov-file#2-openai-api-key

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

No branches or pull requests

2 participants