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

Using expand to parent syntax node inside an injected context selects the whole injection #2311

Closed
EpocSquadron opened this issue Apr 28, 2022 · 0 comments · Fixed by #5176
Closed
Labels
A-helix-term Area: Helix term improvements C-bug Category: This is a bug

Comments

@EpocSquadron
Copy link
Contributor

Summary

As described in the title and repro steps.

Reproduction Steps

For example in the following minimal vue example:

<script type="javascript">
export default {
  computed: {
    isRendered () {
      return this.$store.state.isRendered
    }
}
</script>

<style>
.isRendered {
  display: block;
}
</style>

If you start with a single-character selection somewhere on the return line, and press Alt-k or Alt-<up>, instead of selecting the inner scope of the isRendered method as expected, the entire contents of the <script> are instead.

Helix log

Log is not applicable, but tree-sittier-scopes does not report the scopes in the javascript, just ["component", "script_element", "raw_text"] and the subtree shows only (raw_text). This is in opposite to the fact that the highlight scopes must be applied to the actual scopes in the javascript injection, so these commands, and the expansion keybind are somehow not getting access to the injected scopes.

Platform

Linux

Terminal Emulator

wezterm 20220427-144728-efcc4b48

Helix Version

helix 22.05-dev (477b88e)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements C-bug Category: This is a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants