Comments (5)
Another options is to use a
modify_
script.
In general, yes. lazy-lock.json
is a bit of a special case akin to go.sum
. I don't think Iād want to have a modify_
script for go.sum
or Gemfile.lock
.
from chezmoi.
lazy-lock.json
should not be templated, full stop. It's a state file that, if you use different plug-ins on different machines, will always differ, and using chezmoi's approach for substituting state here is the wrong choice.
Your main options are:
-
Use the same plug-ins on all machines. This keeps a stable
lazy-lock.json
that just needs to be merged when you update it. -
Configure
lazy.nvim
to use a different lockfile for personal and work machines. When you calllazy.setup({})
, do something like this in your (now templated) setup file:lazy.setup({ lockfile = vim.fn.stdpath("config") .. {{ if isPersonal }}"/lazy-lock.json" {{ else }}"/work-lazy-lock.json"{{ end }} })
See https://github.com/folke/lazy.nvim?tab=readme-ov-file#%EF%B8%8F-configuration.
from chezmoi.
Another options is to use a modify_
script.
from chezmoi.
lazy-lock.json
should not be templated, full stop. It's a state file that, if you use different plug-ins on different machines, will always differ, and using chezmoi's approach for substituting state here is the wrong choice.Your main options are:
1. Use the same plug-ins on all machines. This keeps a stable `lazy-lock.json` that just needs to be merged when you update it. 2. Configure `lazy.nvim` to use a different lockfile for personal and work machines. When you call `lazy.setup({})`, do something like this in your (now templated) setup file: ``` lazy.setup({ lockfile = vim.fn.stdpath("config") .. {{ if isPersonal }}"/lazy-lock.json" {{ else }}"/work-lazy-lock.json"{{ end }} }) ```
See https://github.com/folke/lazy.nvim?tab=readme-ov-file#%EF%B8%8F-configuration.
Here, the file differing on different machines is a feature, not a bug. I care much less about breaking my editor at home than at work. I still want the lockfile to be version-controlled so I can easily roll it back if I need to, as suggested here.
from chezmoi.
Another options is to use a
modify_
script.In general, yes.
lazy-lock.json
is a bit of a special case akin togo.sum
. I don't think Iād want to have amodify_
script forgo.sum
orGemfile.lock
.
I will look into modify scripts and your option number 2. I mostly wanted more options to consider, thank you both for the suggestions!
from chezmoi.
Related Issues (20)
- autoPush not prompting for commit message HOT 3
- Initial templating with autoPush or autoCommit HOT 2
- "chezmoi update" prompts for password even though encrypted file has not changed HOT 6
- Powershell one-line install on Windows 11 error - "You cannot call a method on a null-valued expression" HOT 17
- One-line binary install script does not give an error when cannot establish HTTPS connection HOT 4
- `chezmoid apply` (and `dump`) cause a Go panic HOT 3
- Option for `.chezmoiexternal` to add files directly to target and not in source state HOT 3
- Option to include directories outside of Chezmoi's root HOT 1
- Add support for template prefix HOT 3
- Support `failure` hooks and scripts HOT 7
- `--follow` and `--recursive` add seem to conflict
- Extend re-add command to add new files
- .chezmoiignore thinks closing braces are a pattern HOT 3
- Trouble ignoring certain files
- `chezmoi edit-config-template` creates initial template with world-writable permissions HOT 2
- Using environment variable in onepasswordRead HOT 1
- Support chmod in attributes HOT 4
- Powershell one-line install on Windows 11 error - update script at https://get.chezmoi.io/ps1 HOT 1
- run time bug when `chezmoi doctor` invoked HOT 6
- Make accidental removal harder
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chezmoi.