Skip to content

dashes are wrongly considered as token boundaries (specifically, in Goto Definition) #202

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

Open
pickx opened this issue May 6, 2025 · 1 comment

Comments

@pickx
Copy link

pickx commented May 6, 2025

given the following code

def foo-bar [] { }

def baz [] {
    foo-bar
}

in the foo-bar call inside baz,

  1. Goto Definition on the foo links to the token foo in def foo-bar
  2. Goto Definition on the bar links to the token bar in def foo-bar
  3. No Goto Definition on the dash between foo and bar
  4. Hovering on any part of foo-bar including the dash, correctly shows the information for foo-bar

instead, for 1-3, all parts of the identifier should link to the token foo-bar of def foo-bar

(note that nushell recommends kebab-case for function names, so this is a common thing.)

@pickx pickx changed the title dashes are wrongly considered as token boundaries in Goto Definition dashes are wrongly considered as token boundaries (specifically, in Goto Definition) May 6, 2025
@fdncred
Copy link
Contributor

fdncred commented May 6, 2025

We'd accept a PR for correcting this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants