vscode-nushell-lang icon indicating copy to clipboard operation
vscode-nushell-lang copied to clipboard

Nushell / VSCode IDE Integration LSP Bughunt & Features

Open fdncred opened this issue 2 years ago • 1 comments

This is a list to document bugs found in the LSP or IDE functionality from nushell. Also to list existing functionality and missing features we want to add.

Bugs?

Inlays

  • [x] No inlays in env.nu (let-env's are not variables and therefore do not have inlays. i mistakenly thought they should)
  • [x] No inlays in (Darren's) config.nu (it's a bit flaky. Sometimes works. Sometimes doesn't work. Doesn't work at all for let-env config =)
  • [x] Inlays are using shape? instead of type (they're capitalized). Fixed in https://github.com/nushell/nushell/pull/8801

Hover

  • [x] No hovers in (Darren's) config.nu (caused complex by big script?)
  • [x] ~~Too many hover messages (Go to a script that is working, hover by moving mouse horizontally along and watch the debug. there are lots of messages with the same info. could be just duplicate logging without uniq names, or could be some type of bug where we're calling nushell too many times. could be what throttling is about? 💡 maybe store current cursor position and not update if it's in a certain range. very minute changes in cursor position currently run the nushell code again.)~~ Marked as done because we have to pass the cursor position
  • [x] Hover over command with a sub-command, the command has a popup, the sub-command says "string" in the popup. Would be nice to treat this as one command.
  • [ ] Hover over the custom command name in the declaration of the def should show the help text
  • [x] Hover improve built-ins https://github.com/nushell/nushell/pull/8881
  • [ ] Hover scrollbar sometimes is at the bottom instead of top
  • [ ] Hover messes up tables like in the ansi command
  • [x] Hover doesn't work at end of file https://github.com/nushell/vscode-nushell-lang/pull/99

Goto Definition

  • [ ] Goto Definition goes to the start of the block versus the start of the custom command

Completions

  • [ ] Fix variable completions when inside of a block that introduces a new variable

Errors & Warnings

  • [x] Shows only 1 error squiggly. Fixed by https://github.com/nushell/nushell/pull/8765.
  • [x] Better operator mismatch errors. https://github.com/nushell/nushell/pull/8800
  • [x] Fix bundling https://github.com/nushell/vscode-nushell-lang/pull/101
  • [ ] errors when creating scripts from vscode (Request textDocument/completion failed.)

Validation / Check

  • [x] Throttle the validation (show the nu language server output and start typing in a script. Do we need to reparse the entire script on every character? (Look at jakt's throttle again) https://github.com/nushell/vscode-nushell-lang/pull/106

Configuration

  • [x] Respect Max Number of Problems i.e. number of red squiggly lines https://github.com/nushell/vscode-nushell-lang/pull/98 https://github.com/nushell/nushell/pull/8875
  • [x] Ensure Show Inferred Types checkbox is respected https://github.com/nushell/vscode-nushell-lang/pull/97
  • [ ] Optimal setting for Max Nushell Invocation Time
  • [ ] Grab Nushell Executable Path from extension launch since it looks for it
  • [x] Not sure if anything needs to be done with Trace: Server

Potential Features to Add

  • [ ] Refactor... - Ability to click refactor over a var or def and do the normal vcode search & replace
  • [ ] Find All References
  • [x] Multi file IDE support https://github.com/nushell/nushell/pull/8857
  • [ ] Semantic highlighting https://code.visualstudio.com/api/language-extensions/semantic-highlight-guide

Existing Functionality

  • [x] Goto Definition
  • [x] Hover over variables and get type
  • [x] Hover over custom command and show help popup
  • [x] Hover over built-in command and show help popup
  • [x] Show errors with a red squiggly line
  • [x] Auto complete built-in commands

Cleanup

  • [x] Make sure all our temporary nushell-number-random text files are cleaned up https://github.com/nushell/vscode-nushell-lang/pull/100

Pre-Publish

  • [x] Update readme with more screenshots or gifs showing new features
  • [x] Update repo description
  • [x] Update changelog
  • [x] Update version
  • [ ] Update regexes

fdncred avatar Apr 07 '23 13:04 fdncred

I'd also like to fix variable completions when inside of a block that introduces a new variable. Currently I think we only see top-level variables.

sophiajt avatar Apr 14 '23 09:04 sophiajt