bmalehorn / vscode-fish

Fish syntax highlighting and formatting
MIT License
62 stars 6 forks source link

Functions autosuggestions #29

Open artemijan opened 2 years ago

artemijan commented 2 years ago

Hello!First of all I would like to thank you for a such superb extension, it's really great! Would it be possible to implement functions autosuggestions, e.g. when I start typing some word at a new line it will show me function names I can call? Functions located in /functions/ folder (this autosuggestion works in a terminal)

bmalehorn commented 2 years ago

Hi @artemijan, thanks for the suggestion!

To start out with, you can already get basic, word-based suggestions in vscode fish files:

image

This is built-in to vscode and can be configured here: https://code.visualstudio.com/docs/editor/intellisense#_customizing-intellisense It works by looking for any words in the current file. pros:

What you're asking for is a bit more like having a whole fish IDE. As in, vscode-fish would open a terminal, load fish, and then when you wanted suggestions it would type your text so far and hit tab in the terminal to see what the suggestions are.

pros:

Personally I just edit my config.fish with small changes for fun - it's not a serious part of my job so I'm alright with not having amazing IDE tools for fish.

Does that all make sense?

EmilyGraceSeville7cf commented 1 year ago

Maybe I can motivate you or somebody else to implement the requested feature by telling that Nushell already has some LSP. ;) I definitely like Fish, but for me writing scripts in Fish without a proper LSP is a pain. That's why I used Bash for a long time - it has LSP available for VS Code.