Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update links when files are renamed #412

Closed
charlespwd opened this issue Jul 20, 2022 · 3 comments · Fixed by #541
Closed

Update links when files are renamed #412

charlespwd opened this issue Jul 20, 2022 · 3 comments · Fixed by #541
Assignees
Labels
area:theme-check enhancement New feature or request

Comments

@charlespwd
Copy link
Contributor

charlespwd commented Jul 20, 2022

A LSP Client may give us workspace/didRenameFiles notifications (if they support them).

  • For snippet renames, we may update {% render '$oldFileName' ... %} to {% render '$newFileName' %} from all files containing them.
  • For asset renames, we may update{{ $oldFileName | asset_url ... }} to {{ $newFileName | asset_url }}
  • For section renames, we may update {% section '$oldName' %}

We can do this with the workspace/applyEdit server->client request.

Obsidian & other note taking apps all do something like this, and a "Updated X links in Y files" popup seems like a neat thing to do as well.

@charlespwd charlespwd added the enhancement New feature or request label Jul 20, 2022
@mgmanzella mgmanzella self-assigned this Aug 15, 2022
@mgmanzella mgmanzella removed their assignment Apr 13, 2023
@lukeh-shopify lukeh-shopify transferred this issue from Shopify/theme-check Jul 12, 2024
@charlespwd charlespwd self-assigned this Oct 4, 2024
@charlespwd
Copy link
Contributor Author

Oh... I just realized this needs VFS/full theme access.

@charlespwd
Copy link
Contributor Author

Depends on #521

@charlespwd
Copy link
Contributor Author

Section (and eventually blocks) is more complicated. I'm going to split it out in a different issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:theme-check enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants