CLI worktree: node modules not copied over to the worktree folder
Does this issue occur when all extensions are disabled?: Yes/No
Re https://github.com/microsoft/vscode/issues/277163
The current behavior is likely by design as creating a new git worktree will not copy node_modules over. However it becomes a problem the moment I browse the files in the current workspace. TypeScript language server will read the file and complain that there are missing packages.
A couple of ideas:
- do we want to support copying node_modules or similar packages dependencies when creating new git worktree?
- do we want to make it extensible that users can configure post script for git worktree?
- should the language servers/extensions ignore git worktree? (which is then a step down as I still wish to use some language features)
do we want to make it extensible that users can configure post script for git worktree?
I would opt for this.
do we want to make it extensible that users can configure post script for git worktree?
I would opt for this.
Sorry for jumping in but I think this is a really good approach, cursor did something similar that works really well: https://cursor.com/docs/configuration/worktrees#initialization-script