nushell / nushell/vscode-nushell-lang

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

Open
#202 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Nushell
Stars
153
Forks
31
PR merge metrics
No merged PRs in 30d

Description

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.)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in VS Code using the supplied Nushell snippet, then inspect the extension's Goto Definition implementation and its identifier-boundary handling. Done means selecting foo, the dash, or bar in foo-bar all links to the foo-bar definition, while the existing hover behavior remains correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
vscode
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.