nushell / vscode-nushell-lang

A Nushell grammar for Visual Studio Code with IDE support
https://www.nushell.sh/
MIT License
122 stars 27 forks source link

utilize nushell IDE features with built-in vscode LSP functionality #89

Closed fdncred closed 1 year ago

fdncred commented 1 year ago

This PR merges @jntrnr's nushell LSP-like functionality into the extension. See the Changelog.md and the Building.md for more information.

This functionality is very alpha but we're looking forward to landing it and enhancing it.

Here's a few of the features.

Hover on custom commands

image

Hover on built-in commands

image

Hover on variables

image

Command completions

image

Inlays

image

Error squigglys

image

Configuration/Settings

image

Another example of inlays

image

fdncred commented 1 year ago

Need help resolving this warning on vsce package

This extension consists of 379 files, out of which 172 are JavaScript files. For performance reasons, you should bundle your extension: https://aka.ms/vscode-bundle-extension . You should also exclude unnecessary files by adding them to your .vscodeignore: https://aka.ms/vscode-vscodeignore

Also need help resolving the CI error.

sholderbach commented 1 year ago

Maybe nitpicky: but may be worth clarifying in the PR title and settings that this not yet infact an LSP server but just an IDE integration plugin? Just to save the folks looking over from nvim some confusion.

sophiajt commented 1 year ago

@sholderbach it technically is related to LSP, just the serving part is happening in JS.

sophiajt commented 1 year ago

Need help resolving this warning on vsce package

This extension consists of 379 files, out of which 172 are JavaScript files. For performance reasons, you should bundle your extension: https://aka.ms/vscode-bundle-extension . You should also exclude unnecessary files by adding them to your .vscodeignore: https://aka.ms/vscode-vscodeignore

Also need help resolving the CI error.

I got that warning too but I ignored it.

I think the CI error might be related to a missing build step?

sophiajt commented 1 year ago

@fdncred - it's green now.

I didn't fix the bundling thing since I couldn't remember off-hand the best way to do it. I think we maybe just need a bundler step in the packaging? would need to look it up

fdncred commented 1 year ago

@fdncred - it's green now.

yay! Thanks for your help.

I think we maybe just need a bundler step in the packaging?

Agreed, this is what the warning states, which is why the webpack bundler was added 19 months ago. With all the new additions though, it's not working right now. This is what I need help with. If you look at the webpack.config.js file, you can see how it's configured. I've played with quite a few things and can't make that warning go away.

I'll vote to land if we can figure out this bundling issue because it'll make dogfooding these changes and the nushell changes easier.

fdncred commented 1 year ago

Just found another issue. If you install the vsix, it doesn't work. Ugh

fdncred commented 1 year ago

Just found another issue. If you install the vsix, it doesn't work. Ugh

Fixed it. Some *.ts files weren't being included that the server apparently needs. Still need to minimize this with webpack.

fdncred commented 1 year ago

I think I fixed the webpack issues. vsce package no longer complains

fdncred commented 1 year ago

Let's land this and keep working on it.