vim: fix main redeclared error; shell: add STRIPE_SECRET_KEY#54
Merged
Conversation
The go.tpl template was inserting func main() into every new .go file, causing gopls to report "main redeclared" when opening e.g. bla.go in a package that already has main.go. Split into two templates: - main.go.tpl: full boilerplate (copyright, package main, import, func main) - go.tpl: just "package main" for all other new .go files Update the vimrc loader to try a filename-specific template (e.g. main.go.tpl) before falling back to the extension template (go.tpl). https://claude.ai/code/session_0175T5PwVBu493YWDc2jsLhY
Renames env.Darwin to env.Darwin.tmpl so chezmoi renders it at apply time. Adds STRIPE_SECRET_KEY sourced from 1Password item gpnkrvi5we2stwqnik5lyv2q4e, consistent with how ANTHROPIC_API_KEY is managed in env.vim-ai.tmpl. https://claude.ai/code/session_0175T5PwVBu493YWDc2jsLhY
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
main redeclaredgopls error when opening non-main.goGo files by splitting the vim template intomain.go.tpl(full boilerplate) andgo.tpl(justpackage main). Updates the vimrc loader to prefer filename-specific templates over extension-based ones.shell.d/env.Darwinto a chezmoi template and addsSTRIPE_SECRET_KEYsourced from 1Password itemgpnkrvi5we2stwqnik5lyv2q4e, consistent with howANTHROPIC_API_KEYis managed.Generated by Claude Code