- Notifications
You must be signed in to change notification settings - Fork35
feat: add env configuration option and fix vim.notify scheduling#21
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Looks good, I'd personally remove the vim.fn.getenv for theCLAUDE_TERMINAL_CMD
and mention it in the docs if someone has that use case.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Hey@totalolage, you'll have to rebase onto main, as there's a merge conflict. Could you also investigate the failing tests from the CI run? |
- Add env field to config for passing environment variables to Claude CLI- Update init.lua to pass env variables when spawning Claude terminal- Allows users to set custom environment like ANTHROPIC_API_KEY🤖 Generated with [Claude Code](https://claude.ai/code)Co-Authored-By: Claude <noreply@anthropic.com>
Uh oh!
There was an error while loading.Please reload this page.
Summary
This PR adds environment variable configuration support to claudecode.nvim and fixes a critical error with vim.notify calls in fast event contexts.
Changes
1. Environment Variable Configuration
env
field to config for passing custom environment variables to Claude CLIANTHROPIC_API_KEY
2. Fix vim.notify Scheduling Error
vim.notify
andnvim_echo
calls invim.schedule()
to prevent "E5560: nvim_echo must not be called in a fast event context" errors3. Code Cleanup
CLAUDE_TERMINAL_CMD
environment variable for terminal command configurationUsage Example
Testing