Skip to content
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

Wiki for configuration variables uses wrong values #53

Open
3 of 4 tasks
whisperity opened this issue Aug 27, 2021 · 3 comments
Open
3 of 4 tasks

Wiki for configuration variables uses wrong values #53

whisperity opened this issue Aug 27, 2021 · 3 comments
Labels
documentation Improvements or additions to documentation

Comments

@whisperity
Copy link

whisperity commented Aug 27, 2021

Unfortunately the Wiki cannot be pull requested against, so I have to just detail the issues and can't submit a fix.

  • The Wiki page shows that {appname} and {appversion} will get replaced with the Vim flavour, however, the code searches for {app_name} and {app_version} instead.
  • The code contains searches for {empty}, while the documentation mentions {null}.
  • It seems that largeImageIdle is no longer used, but the documentation still mentions it.
  • Allow the user to define their own "file map". #54

In addition, Discord has potentially changed the API and added an assertion which I can't find in the plugin's code. If you set largeImage to be just {lang} (or any flavour thereof) and you work on a C file, the RPC call sends large_image: "C" to which Discord replies

"child "activity" fails because [child "assets" fails because [child "large_text" fails because ["large_text" length must be at least 2 characters long]]]"

This message is visible both in Vim and in the Discord binary's console, so it is a rejection on Discord's end.

@leonardssh
Copy link
Owner

Refer task 4, I don't think there is anything I can do at the code level, I think it is up to the user of the extension to configure it properly. Otherwise, I've resolved all reported issues.

@whisperity
Copy link
Author

@leonardssh Your "fake space" character works to trick Discord into considering the string to be longer than in reality. But if you think so, it's enough to just mention this to the user 😊. Or a really kick-ass solution would be to allow the user to define their own "file map" or something where I could assign *.c files to C99 or something. (E.g. assigning .h files to be C++ instead of C...)

"rpc.largeImage": "\u200b\u200b{Lang}"

@leonardssh
Copy link
Owner

Sounds pretty interesting about the file map customization. I think I can do something about that. 😅

@leonardssh leonardssh added the documentation Improvements or additions to documentation label Sep 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants