-
Notifications
You must be signed in to change notification settings - Fork 496
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 completions #105
Comments
Hi, I don't use fish, but I'll be more than happy to get a PR with this 😄 😄 |
I'll try to implement this in the next week or so. 🙂 |
Hi @Schniz, I've done the first part of this, the completions themselves. If you want to try the completions you can find the script here. I'll hopefully see about adding tests soon. I noticed a few things (mostly documentation stuff) when I was using |
Wow! 💰 This is some hardcore stuff! do you use something to generate it? Can it be a script we run on every release?
I'd really appreciate it! |
Thanks. 🙂 I just wrote the completions manually, but I think it should be possible to use a script. My initial idea for how to test that new features have completions was to parse the output of the help pages, but I think this approach could be used to write the completions instead, if a few changes were made to the help pages. For example, if the synopsis of |
Would it be possible to write the script in ReasonML and use either |
that would make more sense IMO! At least, parsing Cmdliner's data structures, that we use in FnmApp. Unfortunately, this isn't a part of Cmdliner at this time but we might write something nice ourselves! |
You have been missed 😜
Indeed! I use @jordwalke's https://github.com/jordwalke/vim-reasonml since I use vim and it works exactly how I expect it to work! (fast and reliable)
Let me know if you need any help! Maybe we can have a different representation for the CLI options, that we can later use with Cmdliner as a frontend that consumes it — and the fish completions as a frontend (and zsh/bash completions too eventually 😈!) |
😂 Thanks for the info on the plugins, I'll give them a try. 😀
Nice idea! 😃
Hopefully I'll be able to start playing with this/Reason this week. I'll let you know how I get on. 😊 |
Hi @Schniz, I just tried Reason Language Server for VS Code. Unfortunately, it displays a lot of errors, such as Is this what you experienced, and why you stopped using VS Code? I tried the extension with an example esy project and it seemed to work fine. |
I asked on the ReasonML Discord and I was told that it was because |
Woah! Sorry for not responding. I forgot to answer! I wonder why it doesn’t work with |
That's okay. 😊 Since I don't know Reason I can't say for sure, but I think it's because when using dune with esy it always looks in If you want to see what was discussed on Discord, here is a link to the first message I posted (in the editorsupport channel). |
Interesting. Thanks for sharing. I think we should have a PR that removes |
Is there a particular reason why you use We could also submit a pull request to fix the language server, if you want to continue using |
Because using |
I haven't had time to start this yet. 🤦♂️ I read all the ReasonML docs and started working on a small fix for fnm ages ago, but then got sidetracked. Hopefully I'll have time to work on this in the next few weeks. A few weeks ago I noticed that QPDF has options for the binary to help enable completions. How would you feel about doing this or adding a command to fnm for completions, instead of having a separate script? I was thinking we could maybe have something like:
or:
For people using fish, for example, they could then run:
to save the completions. |
Hehe no worries! I think since we have the I merged #142 so it’d be easier to contribute :) |
Thanks for merging #142. 😊 Do you mean add a new option to |
The existing |
If I was using it with fish I would prefer to just run the command once, to get the completions, and save the output to I've never used completions with bash or zsh so I don't know if they can be configured to source completions only when required. |
Do you use |
Sounds good. I don't have any prior knowledge regarding completions so I'll take your word for it 😄
Yeah, running |
What version of For example: try%lwt (iterate()) { becomes: try%lwt(iterate()) { |
Yeah, I did a refmt in #146. Now everything is good. I need to break the build if it's not good. |
How do you break the build? Delete all the esy stuff? |
This PR adds a GitHub action (🎉) that checks for the latest refmt syntax. This is done thanks to @thomsj which brought up the problems with formatting in the repo! 👏 #105 (comment) The current implementation is not ideal: it installs esy and then installs OCaml and @esy-ocaml/reason. A better way to do it is to distribute refmt as a standalone binary from the latest Reason release. This will be fast to install and therefore fast to integrate with CI. An approach to do so is to add an artifact to the CircleCI runs, and then use something like circleci-artifacts.now.sh to fetch the artifact, extract it and profit 💰 In the meantime, it takes <4m to run it, which is much faster than the Azure Linux build, not to mention the Windows one.
I'm looking forward to trying the Rust version. 😃 |
Are there any plans for adding
fish
completions?Perhaps this could be achieved with a man page, as it would probably be better than having third-party completions from, for example, an Oh My Fish plugin.Maybe the installation script could add completions to~/.config/fish/completions
, as this could allow for completions similar toplugin-nvm
.The text was updated successfully, but these errors were encountered: