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

use `which` to search `nu` location, add icon too. #153

Closed nerditation closed 1 year ago

nerditation commented 1 year ago

I tried out the vscode extension today and it gave error. so I looked at the code and found out the nu installation detection logic is manually searching through a hard coded list of directores, but my setup happens to be not in any of the presumed locations. so I modified the code to use which to search in ${env:PATH}, plus these additional locations, and also simplfied the code a little bit during the process.

also, I don't like the generic "terminal" icon, and I find there's already a svg icon file in the assets folder so I just point the terminal profile icon path to that svg file.

fdncred commented 1 year ago

I think this is an excellent idea. Thanks for adding this. I just had a few notes above. Appreciate your help!

yup, the svg icon is a good call.

fdncred commented 1 year ago

ok. I think we're good here if we can just get the ci green. thanks for your help and explanations! I wrote this mess, with some help, but I'm no good at javascript/typescript stuff. :)

nerditation commented 1 year ago

oops, look like the linter doesn't like an empty function body. replaced with an empty value. should fix it now.

fdncred commented 1 year ago

Thanks!