New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fish autocomplete on neovim (or vim) scp:// #10041
Comments
As a sidenote: Chatgpt (and other LLMs) are even worse than usual on a language that has as little a corpus of available code as fish script. I heavily recommend against trying it on fish, and I have already had my time wasted by people opening PRs of LLM-generated code, and I would prefer not to have my time wasted. Anyway, now that that's done: This is referring to (neo)vim's "netrw" plugin/system/whatever. It's theoretically possible to complete, but it would rely on us running ssh on the remove system to get paths, which isn't typically a neovim dependency. Basically, what you would do is this: complete -c nvim --condition 'string match -q "scp:*" -- (commandline -ct)' -a '(_do_scp_completion)' If the current token starts with "scp:" make it "do" scp completions, in some form. That function
|
Anyhow, what would be a good workflow so I can debug the complete while I work on adding it. Since I don't know the fish syntax I have to add printf statements to see what the function is getting etc. I'm trying to do this with a nvim_scp.fish file which I store on |
Probably your best option is to create |
Fish already has proper scp completions but they don't work on neovim scp://
I tried to implement this myself but can't figure out how to make the complete -c, work with a command argument defined. (such as neovim scp://(autocomplete).
This works with ssh (with autocomplete plugins) so I think it should be doable. Sorry for asking this here but I kinda tried to do it myself (and even get some help on chatgpt) but just can't figure out the fish syntax on the completions.
Thanks
The text was updated successfully, but these errors were encountered: