Feat: Option to change API key env variable name
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 .
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
Hmm, I wonder if that may be a bit too complex for this use case? Since the environment variable's name is already a "variable", all we'd need is to accept user config option to change it (and have its current name as the default option). I'll implement this next week and submit a PR.
I agree that sounds like a nice improvement. :+1: