snazzah / sublimediscordrp Goto Github PK
View Code? Open in Web Editor NEW๐ Discord rich presence for Sublime Text
License: MIT License
๐ Discord rich presence for Sublime Text
License: MIT License
Right after saving the file, it will show over 3 hours has elapsed on the profile.
Hey there.
Would it be possible to add licensing information to the discord_ipc
module, so it can be used by other projects?
Discord Rich Presence.discord_ipc] ERROR: failed to open '\\?\pipe\discord-ipc-0': [Errno 13] Permission denied: '\\?\pipe\discord-ipc-0'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\?\pipe\discord-ipc-1': [Errno 2] No such file or directory: '\\?\pipe\discord-ipc-1'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\?\pipe\discord-ipc-2': [Errno 2] No such file or directory: '\\?\pipe\discord-ipc-2'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\?\pipe\discord-ipc-3': [Errno 2] No such file or directory: '\\?\pipe\discord-ipc-3'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\?\pipe\discord-ipc-4': [Errno 2] No such file or directory: '\\?\pipe\discord-ipc-4'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\?\pipe\discord-ipc-5': [Errno 2] No such file or directory: '\\?\pipe\discord-ipc-5'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\?\pipe\discord-ipc-6': [Errno 2] No such file or directory: '\\?\pipe\discord-ipc-6'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\?\pipe\discord-ipc-7': [Errno 2] No such file or directory: '\\?\pipe\discord-ipc-7'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\?\pipe\discord-ipc-8': [Errno 2] No such file or directory: '\\?\pipe\discord-ipc-8'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\?\pipe\discord-ipc-9': [Errno 2] No such file or directory: '\\?\pipe\discord-ipc-9'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\?\pipe\discord-ipc-0': [Errno 13] Permission denied: '\\?\pipe\discord-ipc-0'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\?\pipe\discord-ipc-1': [Errno 2] No such file or directory: '\\?\pipe\discord-ipc-1'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\?\pipe\discord-ipc-2': [Errno 2] No such file or directory: '\\?\pipe\discord-ipc-2'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\?\pipe\discord-ipc-3': [Errno 2] No such file or directory: '\\?\pipe\discord-ipc-3'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\?\pipe\discord-ipc-4': [Errno 2] No such file or directory: '\\?\pipe\discord-ipc-4'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\?\pipe\discord-ipc-5': [Errno 2] No such file or directory: '\\?\pipe\discord-ipc-5'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\?\pipe\discord-ipc-6': [Errno 2] No such file or directory: '\\?\pipe\discord-ipc-6'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\?\pipe\discord-ipc-7': [Errno 2] No such file or directory: '\\?\pipe\discord-ipc-7'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\?\pipe\discord-ipc-8': [Errno 2] No such file or directory: '\\?\pipe\discord-ipc-8'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\?\pipe\discord-ipc-9': [Errno 2] No such file or directory: '\\?\pipe\discord-ipc-9'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\?\pipe\discord-ipc-0': [Errno 13] Permission denied: '\\?\pipe\discord-ipc-0'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\?\pipe\discord-ipc-1': [Errno 2] No such file or directory: '\\?\pipe\discord-ipc-1'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\?\pipe\discord-ipc-2': [Errno 2] No such file or directory: '\\?\pipe\discord-ipc-2'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\?\pipe\discord-ipc-3': [Errno 2] No such file or directory: '\\?\pipe\discord-ipc-3'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\?\pipe\discord-ipc-4': [Errno 2] No such file or directory: '\\?\pipe\discord-ipc-4'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\?\pipe\discord-ipc-5': [Errno 2] No such file or directory: '\\?\pipe\discord-ipc-5'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\?\pipe\discord-ipc-6': [Errno 2] No such file or directory: '\\?\pipe\discord-ipc-6'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\?\pipe\discord-ipc-7': [Errno 2] No such file or directory: '\\?\pipe\discord-ipc-7'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\?\pipe\discord-ipc-8': [Errno 2] No such file or directory: '\\?\pipe\discord-ipc-8'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\?\pipe\discord-ipc-9': [Errno 2] No such file or directory: '\\?\pipe\discord-ipc-9'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\?\pipe\discord-ipc-0': [Errno 13] Permission denied: '\\?\pipe\discord-ipc-0'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\?\pipe\discord-ipc-1': [Errno 2] No such file or directory: '\\?\pipe\discord-ipc-1'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\?\pipe\discord-ipc-2': [Errno 2] No such file or directory: '\\?\pipe\discord-ipc-2'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\?\pipe\discord-ipc-3': [Errno 2] No such file or directory: '\\?\pipe\discord-ipc-3'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\?\pipe\discord-ipc-4': [Errno 2] No such file or directory: '\\?\pipe\discord-ipc-4'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\?\pipe\discord-ipc-5': [Errno 2] No such file or directory: '\\?\pipe\discord-ipc-5'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\?\pipe\discord-ipc-6': [Errno 2] No such file or directory: '\\?\pipe\discord-ipc-6'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\?\pipe\discord-ipc-7': [Errno 2] No such file or directory: '\\?\pipe\discord-ipc-
discord console:
[RPCServer:IPC] Starting on \?\pipe\discord-ipc-0
#15 added the feature to use lang-text
for unknown scopes that use the text
base scope, but we don't have an icon for it currently.
Would help immensely with logging and debugging.
I don't know if the client sends messages by itself (by default, without registering any events) or whether it only replies. Either way, it appears that the reply will have the same nonce
attribute as the request, so we can just discard any other messages we receive. We definitely need a timeout, though.
Alternatively, we could create a new thread that only listens for received messages and logs them with the appropriate logging level. We probably can't attribute replies to requests properly, but I don't think we need to.
See also #23.
Update the Rich Presence for the selected file, It only updates when I save the file.
Edit 1:
you can use 15 seconds in the if what checks the time passed to change, you are using 59.
The package worked once while I was editing the settings for it and hasn't worked since.
When Discord Rich Presence package and OmniSharpSublime package are installed together neither works.
When this plugin is installed on latest sublime version, the CPU usage can go up to 20%. Any ideas?
Hi, I'm experiencing a problem.
Any files that I have marked in Sublime as the C
Language don't show up in Discord, such as .c
& .h
. They don't appear on Discord unless I specify their language as C++ in the Open all with current extension as...
drop-down but that's not very practical.
Thanks for this plugin btw, apart from this issue, it's awesome ๐
Just installed it via package installer, I'm on macOS 11.1, x86_64
Console log:
ERROR:Discord Rich Presence.drp:Sending activity failed. Error: [Errno 32] Broken pipe
Traceback (most recent call last):
File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 892, in on_close
callback(v)
File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 152, in profiler
return event_handler(*args)
File "/Users/dmilith/Library/Application Support/Sublime Text 3/Installed Packages/Discord Rich Presence.sublime-package/drp.py", line 333, in on_close
try: ipc.set_activity(act)
AttributeError: 'NoneType' object has no attribute 'set_activity'
[Discord Rich Presence.discord_ipc] WARNING: closing connection
WARNING:Discord Rich Presence.discord_ipc:closing connection
OS: Ubuntu 18.04 (KDE neon)
Sublime Text version: 3.2 Build 3200 (installed from Snapcraft)
Issue:
If Sublime Text and Discord is installed from the Snapcraft, SublimeDiscordRP errors out during connect, saying it cannot connect to the Discord client.
Hello can you add a new icon to .sk files?
https://imgur.com/a/Z5i7E
I am trying to replace the default set of icons with my own (to match a custom Sublime icon). I tried creating a new application with Discord, enabled RPC, and uploaded my icons. I then swapped out the keys in the fork. However, the icon names seem to not be correct. Here is what I uploaded as assets:
c
Small
c
Large
cpp
Small
cpp
Large
crystal
Small
crystal
Large
cs
Small
cs
Large
css
Small
css
Large
d
Small
d
Large
elixir
Small
elixir
Large
extra
Small
extra
Large
go
Small
go
Large
html
Small
html
Large
java
Small
java
Large
javascript
Small
javascript
Large
json
Small
json
Large
lua
Small
lua
Large
markdown
Small
markdown
Large
php
Small
php
Large
python
Small
python
Large
ruby
Small
ruby
Large
rust
Small
rust
Large
sh
Small
sh
Large
sublime3
Large
sublime3
Small
typescript
Small
typescript
Large
What is the proper way to do so?
It refuses to connect to Discord when Im running the PTB version. If im running the Latest version, it works just fine. Same goes for Canary, refuses to connect.
I am on Sublime build 3207 and can't get the package to work. It used to work fine and suddenly stopped working. Here is the console log:
Traceback (most recent call last):
File "/Users/macbook/Library/Application Support/Sublime Text 3/Installed Packages/Discord Rich Presence.sublime-package/drp.py", line 277, in run_async
File "/Users/macbook/Library/Application Support/Sublime Text 3/Installed Packages/Discord Rich Presence.sublime-package/drp.py", line 213, in connect
File "/Users/macbook/Library/Application Support/Sublime Text 3/Installed Packages/Discord Rich Presence.sublime-package/discord_ipc/__init__.py", line 53, in for_platform
File "/Users/macbook/Library/Application Support/Sublime Text 3/Installed Packages/Discord Rich Presence.sublime-package/discord_ipc/__init__.py", line 44, in __init__
File "/Users/macbook/Library/Application Support/Sublime Text 3/Installed Packages/Discord Rich Presence.sublime-package/discord_ipc/__init__.py", line 191, in _connect
File "/Users/macbook/Library/Application Support/Sublime Text 3/Installed Packages/Discord Rich Presence.sublime-package/discord_ipc/__init__.py", line 212, in _iter_path_candidates
AttributeError: 'NoneType' object has no attribute 'endswith'
Would be nice to have an erlang icon. From other issues it seems that the author is willing to add icons if they're provided. I'm not sure offhand of the format or size required, but wikimedia has an Erlang logo that appear to be in public domain.
Add to the settings a blacklist for block what project don't want to show in the rich presence.
Thanks for the great package : )
Could you please add Tex and LaTeX icon?
When setting some filed to include {lang}
(for example: "state": "Working in {lang}"
), the value {lang}
gets replaced with is the filename of the .sublime-syntax
file, not what the name of the language is defined to be (as shown in the status bar).
This is an issue for custom syntax highlighters (for example those stored in the User
folder). The file name does not necessarily reflect the actual syntax name, as defined with the name
field at the top of .sublime-syntax
files.
I want to edit the settings so it doesnt show the project name, but its not letting me edit the settings file.
Used icons of programming languages are outdated in my opinion. I propose replacing them with Material, it will be much nicer to look aesthetically.
In the time I've used this plugin, I've found it consistently annoying to have errors popping up constantly because of broken pipes and whatnot, and don't really think it's necessary that they appear as they do at all.
So my suggestion in this issue is:
Doesn't seem to be working on macOS for some reason. Restarted Discord, Sublime and my computer several times, but nothing's happening.
Hi it's my first time trying this plugin, but somehow it shows error message that it couldn't connect to my discord client. but I already installed and ran the discord client on my machine
[DiscordRP] Unable to connect to Discord client.
Please verify that it is running. Run 'Discord Rich Presence: Connect to Discord' to try again.
I'm running Ubuntu 18.04
Is it because I'm running linux ?
So it just suddenly stop working.. and it seems to be a similar issue from the closed in the past but no solution is mentioned there so i am asking again.
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\\\?\\pipe\\discord-ipc-0': [Errno 2] No such file or directory: '\\\\?\\pipe\\discord-ipc-0'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\\\?\\pipe\\discord-ipc-1': [Errno 2] No such file or directory: '\\\\?\\pipe\\discord-ipc-1'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\\\?\\pipe\\discord-ipc-2': [Errno 2] No such file or directory: '\\\\?\\pipe\\discord-ipc-2'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\\\?\\pipe\\discord-ipc-3': [Errno 2] No such file or directory: '\\\\?\\pipe\\discord-ipc-3'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\\\?\\pipe\\discord-ipc-4': [Errno 2] No such file or directory: '\\\\?\\pipe\\discord-ipc-4'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\\\?\\pipe\\discord-ipc-5': [Errno 2] No such file or directory: '\\\\?\\pipe\\discord-ipc-5'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\\\?\\pipe\\discord-ipc-6': [Errno 2] No such file or directory: '\\\\?\\pipe\\discord-ipc-6'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\\\?\\pipe\\discord-ipc-7': [Errno 2] No such file or directory: '\\\\?\\pipe\\discord-ipc-7'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\\\?\\pipe\\discord-ipc-8': [Errno 2] No such file or directory: '\\\\?\\pipe\\discord-ipc-8'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\\\?\\pipe\\discord-ipc-9': [Errno 2] No such file or directory: '\\\\?\\pipe\\discord-ipc-9'
I have tried re installing discord and sublime, that did not seem to fix the issue, maybe it was an update or something but sublime isn't getting shown as the status. Any help would be appreciated :)
Hi,
Thanks for this plugin! I have one idea which could make it even better - rather than hardcode a list of file extensions and a mapping to their friendly names, it'd be cool if you'd take the view.settings().get('syntax', None)
and parse that file with pyyaml
to get the name
key directly from the syntax definition, if it is present. If it isn't, maybe just use the base file name of the .sublime-syntax
/.tmLanguage
file? This would allow you to support all third party syntaxes without any extra work, without any false mappings when one file extension could relate to multiple syntaxes.
As you committed 22 days ago, it says you've added {loc} for displaying the number of lines.
I have installed the Discord Rich Presence plugin using the Package Control, I've tried changing the settings to fit my preferences and passed {loc} into one of the fields.
This is the full traceback:
File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 577, in on_modified_async
callback.on_modified_async(v)
File "C:\Users\User\AppData\Roaming\Sublime Text 3\Installed Packages\Discord Rich Presence.sublime-package\drp.py", line 258, in on_modified_async
handle_activity(view)
File "C:\Users\User\AppData\Roaming\Sublime Text 3\Installed Packages\Discord Rich Presence.sublime-package\drp.py", line 130, in handle_activity
act['state'] = state_format.format(**format_dict)
KeyError: 'loc'
Do I have to install the updated version from the github itself, or am I doing something wrong?
I have put this in my packages folder, changed the client id to mine, and it still doesn't want to connect to discord. I have no knowledge on this stuff, so I need assistance thanks.
Hello, I use your plugin a lot but the language I am programming on is not in your plugin.
Could you add it?
if yes this is the SQF of Arma and * .sqf
for files
Here is the image
Thank you in advance !
I've been using this lately. But after 30 minutes, it disconnected from discord. I'm using Sublime text 3. Any help would be appreciated
How do I setup this?
I added the files to a folder in my Packages and it isn't working.
Could you do the same for PyCharm? :)
Hi, first just want to say that I love your code, and works amazing. And i want to ask if it's possible to add more icons for others languages.
I use Pawn (its used for sa:mp(gaming)) and Processing for example, and maybe you could put a icon for others languages that people use, or you could add a little file that people can edit and insert himself.
I don't know if it's possible, but it's only a suggestion. ^^
Thanks and keep the good work.
Installed as a sublime text 3 package in AppData\Roaming\Sublime Text 3\Packages\User
When I launch I get this error message:
Could not find IPC. Please open Discord and run "DiscordRichPresence: Connect to Discord"
Am I missing a dependency or do I have to enable something in Discord?
As the title says, whenever I open discord and then open sublime text 3, status doesn't appear. It worked great yesterday..
Hey,
I can't get this to work on Ubuntu 18.04 using the official Discord deb package from discordapp.com/downloads. Any reason why?
Thanks,
-Dan
Hej,
I wish settings these options for SublimeDiscordRP:
I tried editing the drp.py file and adding the file extension to it like .exainz
, and pasted the logo into the folder with name lang-exainz.png
.
But the image didnt load up
Thanks
Excerpt from V documentation,
V is a statically typed compiled programming language designed for building maintainable software.
It's similar to Go and is also influenced by Oberon, Rust, Swift.V is a very simple language. Going through this documentation will take you about half an hour, and by the end of it you will learn pretty much the entire language.
Despite being simple, it gives a lot of power to the developer. Anything you can do in other languages, you can do in V.
Since Discord update frequently these days, I've encountered this issue for almost everyday.
When Discord has update, it will not work even I try to reconnecting several times.
It only works after I quit Discord and run it again to install its update.
Traceback log:
reloading plugin xxx ร n
plugins loaded
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\\\?\\pipe\\discord-ipc-0': [Errno 2] No such file or directory: '\\\\?\\pipe\\discord-ipc-0'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\\\?\\pipe\\discord-ipc-1': [Errno 2] No such file or directory: '\\\\?\\pipe\\discord-ipc-1'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\\\?\\pipe\\discord-ipc-2': [Errno 2] No such file or directory: '\\\\?\\pipe\\discord-ipc-2'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\\\?\\pipe\\discord-ipc-3': [Errno 2] No such file or directory: '\\\\?\\pipe\\discord-ipc-3'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\\\?\\pipe\\discord-ipc-4': [Errno 2] No such file or directory: '\\\\?\\pipe\\discord-ipc-4'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\\\?\\pipe\\discord-ipc-5': [Errno 2] No such file or directory: '\\\\?\\pipe\\discord-ipc-5'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\\\?\\pipe\\discord-ipc-6': [Errno 2] No such file or directory: '\\\\?\\pipe\\discord-ipc-6'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\\\?\\pipe\\discord-ipc-7': [Errno 2] No such file or directory: '\\\\?\\pipe\\discord-ipc-7'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\\\?\\pipe\\discord-ipc-8': [Errno 2] No such file or directory: '\\\\?\\pipe\\discord-ipc-8'
[Discord Rich Presence.discord_ipc] ERROR: failed to open '\\\\?\\pipe\\discord-ipc-9': [Errno 2] No such file or directory: '\\\\?\\pipe\\discord-ipc-9'
Traceback (most recent call last):
File "C:\Users\User\AppData\Roaming\Sublime Text 3\Installed Packages\Discord Rich Presence.sublime-package\drp.py", line 208, in connect
File "C:\Users\User\AppData\Roaming\Sublime Text 3\Installed Packages\Discord Rich Presence.sublime-package\discord_ipc/__init__.py", line 51, in for_platform
File "C:\Users\User\AppData\Roaming\Sublime Text 3\Installed Packages\Discord Rich Presence.sublime-package\discord_ipc/__init__.py", line 44, in __init__
File "C:\Users\User\AppData\Roaming\Sublime Text 3\Installed Packages\Discord Rich Presence.sublime-package\discord_ipc/__init__.py", line 170, in _connect
Discord Rich Presence.discord_ipc.DiscordIpcError: Failed to connect to Discord pipe
Package Control: No updated packages
Is it possible to fix this issue?
Add icons for Rust and Toml.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.