Skip to content

Commit 8b18beb

Browse files
authored
Merge branch 'main' into lazy-plugin-manager
2 parents 49f1f94 + fee2f8d commit 8b18beb

15 files changed

+2432
-2106
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

+55-4
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,98 @@
11
name: Issue report
22
description: Report any errors, bugs, or unexpected behaviors related to presence.nvim
3+
title: "[Bug]: "
34
labels: [bug]
5+
assignees:
6+
- jiriks74
47
body:
58
- type: markdown
69
attributes:
710
value: |
811
Before reporting, please search [existing issues](https://github.com/andweeb/presence.nvim/issues) and make sure that presence.nvim is updated to the latest version.
12+
13+
- type: checkboxes
14+
attributes:
15+
label: Are you on the latest version?
16+
options:
17+
- label: I have updated to the latest version.
18+
required: true
19+
20+
- type: checkboxes
21+
attributes:
22+
label: Have you tried it with default config?
23+
options:
24+
- label: I have tried the default config.
25+
required: true
26+
927
- type: textarea
1028
attributes:
1129
label: "Description"
1230
description: "A short summary of the error, bug, or unexpected behavior you're facing."
1331
validations:
1432
required: true
33+
1534
- type: textarea
1635
attributes:
1736
label: "Neovim version"
1837
description: "Output of `nvim --version`"
1938
render: markdown
2039
placeholder: |
21-
NVIM v0.6.0-dev+209-g0603eba6e
40+
NVIM: v0.6.0-dev+209-g0603eba6e
2241
Build type: Release
23-
LuaJIT 2.1.0-beta3
42+
LuaJIT: 2.1.0-beta3
43+
value: |
44+
NVIM:
45+
Build type:
46+
LuaJIT:
2447
validations:
2548
required: true
49+
2650
- type: input
2751
attributes:
2852
label: "OS information"
2953
placeholder: "macOS 12.0.1"
3054
validations:
3155
required: true
56+
3257
- type: textarea
3358
attributes:
3459
label: "Steps to reproduce"
35-
description: "Steps to reproduce the issue with your config(s) if applicable"
60+
description: "Steps to reproduce the issue with your config(s) if applicable."
3661
placeholder: |
3762
1. Setup presence.nvim with `require("presence"):setup({...})`
3863
2. Run Neovim with `nvim test.txt`
3964
3. ...
4065
validations:
4166
required: true
67+
4268
- type: textarea
4369
attributes:
4470
label: "Logs"
45-
description: "The full list of `:messages` from one or more `nvim` instances"
71+
description: "The full list of `:messages` from one or more `nvim` instances.\nPlease insert the logs into code blocks."
72+
placeholder: |
73+
<details>
74+
75+
```
76+
[presence.nvim] Using runtime path: /run/user/1000
77+
[presence.nvim] Using Discord IPC socket path: /run/user/1000/discord-ipc-0
78+
[presence.nvim] Checking Discord IPC socket at /run/user/1000/discord-ipc-0...
79+
```
80+
81+
</details>
82+
value: |
83+
<details>
84+
85+
```
86+
87+
```
88+
89+
</details>
4690
validations:
4791
required: true
92+
93+
- type: textarea
94+
attributes:
95+
label: "Aditional info"
96+
description: "If you'd like to add anything else put it here."
97+
validations:
98+
required: false

.github/ISSUE_TEMPLATE/feature_request.md

-20
This file was deleted.
+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Feature request
2+
description: Report any errors, bugs, or unexpected behaviors related to presence.nvim
3+
title: "[FEAT]: "
4+
labels: [enhancement]
5+
assignees:
6+
- jiriks74
7+
body:
8+
- type: textarea
9+
attributes:
10+
label: Is your feature request related to a problem?
11+
description: A clear and concise description of what the problem is. Ex. I'm always frustrated when...
12+
validations:
13+
required: true
14+
15+
- type: textarea
16+
attributes:
17+
label: Describe the solution you'd like
18+
description: A clear and concise description of what you want to happen.
19+
validations:
20+
required: false
21+
22+
- type: textarea
23+
attributes:
24+
label: Describe alternatives you've considered
25+
description: A clear and concise description of any alternative solutions or features you've considered.
26+
validations:
27+
required: false
28+
29+
- type: textarea
30+
attributes:
31+
label: Additional context
32+
description: Add any other context or screenshots about the feature request here.
33+
validations:
34+
required: false

.github/workflows/CI.yml

-14
This file was deleted.

.github/workflows/luacheck.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: Luacheck
2+
on: [push, pull_request]
3+
jobs:
4+
Luacheck:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- name: Checkout
8+
uses: actions/checkout@v3
9+
- name: Luacheck linter
10+
uses: lunarmodules/luacheck@v1

.github/workflows/stylua.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: StyLua
2+
on: [push, pull_request]
3+
jobs:
4+
StyLuacheck:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- name: Checkout
8+
uses: actions/checkout@v3
9+
- name: StyLua check
10+
uses: JohnnyMorganz/stylua-action@v3
11+
with:
12+
token: ${{ secrets.GH_TOKEN }}
13+
version: v0.18.2 # NOTE: we recommend pinning to a specific version in case of formatting changes
14+
# CLI arguments
15+
args: --check .

README.md

+86-37
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,63 @@
1-
<img src="https://gist.githubusercontent.com/andweeb/df3216345530234289b87cf5080c2c60/raw/8de399cfed82c137f793e9f580027b5246bc4379/presence.nvim.png" alt="presence.nvim">&#x200B;
1+
# ![presence.nvim](https://gist.githubusercontent.com/andweeb/df3216345530234289b87cf5080c2c60/raw/8de399cfed82c137f793e9f580027b5246bc4379/presence.nvim.png)
22

3-
**[Features](#features)** | **[Installation](#installation)** | **[Configuration](#configuration)** | **[Troubleshooting](#troubleshooting)** | **[Development](#development)** | **[Contributing](#contributing)**
3+
This repository uses
4+
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-%23FE5196?logo=conventionalcommits&logoColor=white)](https://conventionalcommits.org)
5+
6+
**[Features](#features)** | **[Installation](#installation)** |
7+
**[Configuration](#configuration)** | **[Troubleshooting](#troubleshooting)** |
8+
**[Development](#development)** | **[Contributing](#contributing)**
49

510
> Discord [Rich Presence](https://discord.com/rich-presence) plugin for [Neovim](https://neovim.io)
611
7-
<img src="https://gist.githubusercontent.com/andweeb/df3216345530234289b87cf5080c2c60/raw/ad916fec8de921d0021801a0af877a5349621e7e/presence-demo-a.gif" width="100%" alt="demo.gif">
12+
![Presence demo](https://gist.githubusercontent.com/andweeb/df3216345530234289b87cf5080c2c60/raw/ad916fec8de921d0021801a0af877a5349621e7e/presence-demo-a.gif)
813

914
## Features
10-
* Light and unobtrusive
11-
* No Python/Node providers (or CoC) required
12-
* Cross-platform support: macOS, nixOS, Linux[\*](#notes), Windows[\*](https://github.com/andweeb/presence.nvim/projects/1#card-60537963), WSL[\*](https://github.com/andweeb/presence.nvim/wiki/Rich-Presence-in-WSL)
13-
* Startup time is fast(er than other Rich Presence plugins, by [kind of a lot](https://github.com/andweeb/presence.nvim/wiki/Plugin-Comparisons))
14-
* Written in Lua and [highly configurable](#configuration) in Lua (but also configurable in VimL if you want)
15-
* Manages Rich Presence across multiple Neovim instances in various environments (tmux panes/windows, ssh sessions, terminal tabs/windows, etc.)
15+
16+
- Light and unobtrusive
17+
- No Python/Node providers (or CoC) required
18+
- Cross-platform support: macOS, nixOS, Linux[\*](#notes),
19+
Windows, WSL
20+
- Startup time is fast(er than other Rich Presence plugins, by
21+
[kind of a lot](https://github.com/andweeb/presence.nvim/wiki/Plugin-Comparisons))
22+
- Written in Lua and [highly configurable](#configuration) in Lua
23+
(but also configurable in VimL if you want)
24+
- Manages Rich Presence across multiple Neovim instances in various environments
25+
(tmux panes/windows, ssh sessions, terminal tabs/windows, etc.)
26+
- Now with Flatpak support!
1627

1728
## Installation
29+
1830
Use your favorite plugin manager
19-
* [vim-plug](https://github.com/junegunn/vim-plug): `Plug 'andweeb/presence.nvim'`
20-
* [packer.nvim](https://github.com/wbthomason/packer.nvim): `use 'andweeb/presence.nvim'`
31+
32+
- [vim-plug](https://github.com/junegunn/vim-plug): `Plug 'jiriks74/presence.nvim'`
33+
- [packer.nvim](https://github.com/wbthomason/packer.nvim): `use 'jiriks74/presence.nvim'`
34+
- [lazy.nvim](https://github.com/folke/lazy.nvim):
2135

2236
```lua
2337
{
24-
'andweeb/presence.nvim',
25-
event = 'UIEnter',
26-
}
38+
"jiriks74/presence.nvim",
39+
event = "UIEnter",
40+
},
2741
```
2842

29-
#### Notes
30-
* Requires [Neovim 0.5](https://github.com/neovim/neovim/releases/tag/v0.5.0) or higher
31-
* Rich Presence should work automatically after installation (unless you're using WSL, in which case [see here](https://github.com/andweeb/presence.nvim/wiki/Rich-Presence-in-WSL))
32-
* If you're using an unofficial Discord package on Linux ([flatpak](https://flathub.org/apps/details/com.discordapp.Discord), [snap](https://snapcraft.io/discord), etc.), you may need to follow some instructions to expose the Discord socket on your system (e.g. [flatpak instructions](https://github.com/flathub/com.discordapp.Discord/wiki/Rich-Precense-(discord-rpc)))
43+
### Notes
44+
45+
- Requires [Neovim 0.5](https://github.com/neovim/neovim/releases/tag/v0.5.0)
46+
or higher
47+
- Rich Presence should work automatically after installation
48+
(unless you're using WSL, in which case
49+
[see here](https://github.com/andweeb/presence.nvim/wiki/Rich-Presence-in-WSL))
3350

3451
## Configuration
35-
Configuration is not necessary for Rich Presence to work. But for those that want to override the default configs, the following options are available to configure in either Lua or VimL.
52+
53+
Configuration is not necesary unless you want to override the default config.
54+
55+
If you want to change the default config here are your options in Lua and VimL:
3656

3757
### Lua
38-
Require the plugin and call `setup` with a config table with one or more of the following keys:
58+
59+
Require the plugin and call `setup` with a config table with one or more of the
60+
following keys:
3961

4062
```lua
4163
-- The setup config table shows all available config options with their default values:
@@ -44,7 +66,7 @@ require("presence").setup({
4466
auto_update = true, -- Update activity based on autocmd events (if `false`, map or manually execute `:lua package.loaded.presence:update()`)
4567
neovim_image_text = "The One True Text Editor", -- Text displayed when hovered over the Neovim image
4668
main_image = "neovim", -- Main image display (either "neovim" or "file")
47-
client_id = "793271441293967371", -- Use your own Discord application client id (not recommended)
69+
client_id = "1172122807501594644", -- Use your own Discord application client id (not recommended)
4870
log_level = nil, -- Log messages at or above this level (one of the following: "debug", "info", "warn", "error")
4971
debounce_timeout = 10, -- Number of seconds to debounce events (or calls to `:lua package.loaded.presence:update(<filename>, true)`)
5072
enable_line_number = false, -- Displays the current line number instead of the current project
@@ -65,13 +87,15 @@ require("presence").setup({
6587
```
6688

6789
### VimL
90+
6891
Or if global variables are more your thing, you can use any of the following instead:
92+
6993
```viml
7094
" General options
7195
let g:presence_auto_update = 1
7296
let g:presence_neovim_image_text = "The One True Text Editor"
7397
let g:presence_main_image = "neovim"
74-
let g:presence_client_id = "793271441293967371"
98+
let g:presence_client_id = "1172122807501594644"
7599
let g:presence_log_level
76100
let g:presence_debounce_timeout = 10
77101
let g:presence_enable_line_number = 0
@@ -91,23 +115,48 @@ let g:presence_line_number_text = "Line %s out of %s"
91115
```
92116

93117
## Troubleshooting
94-
* Ensure that Discord is running
95-
* Ensure that your Neovim version is 0.5 or higher
96-
* Ensure Game Activity is enabled in your Discord settings
97-
* Enable logging and inspect the logs after opening a buffer
98-
* Set the [`log_level`](#lua) setup option or [`g:presence_log_level`](#viml) to `"debug"`
99-
* Load a file and inspect the logs with `:messages`
100-
* If there is a `Failed to determine Discord IPC socket` error, your particular OS may not yet be supported
101-
* If you don't see an existing [issue](https://github.com/andweeb/presence.nvim/issues) or [card](https://github.com/andweeb/presence.nvim/projects/1#column-14183588) for your OS, create a prefixed [issue](https://github.com/andweeb/presence.nvim/issues/new) (e.g. `[Void Linux]`)
102-
* Still not working and need help? Create a new [issue](https://github.com/andweeb/presence.nvim/issues)!
118+
119+
- Ensure that Discord is running
120+
- Ensure that your Neovim version is 0.5 or higher
121+
- Ensure Game Activity is enabled in your Discord settings
122+
- Enable logging and inspect the logs after opening a buffer
123+
- Set the [`log_level`](#lua) setup option or [`g:presence_log_level`](#viml)
124+
to `"debug"`
125+
- Load a file and inspect the logs with `:messages`
126+
- If there is a `Failed to determine Discord IPC socket` error, your particular
127+
OS may not yet be supported
128+
- If you don't see an existing
129+
[issue](https://github.com/jiriks74/presence.nvim/issues)
130+
or [card](https://github.com/jiriks74/presence.nvim/projects/1#column-14183588)
131+
for your OS, create a prefixed
132+
[issue](https://github.com/jiriks74/presence.nvim/issues/new)
133+
(e.g. `[Void Linux]`)
134+
- Still not working and need help? Create a new
135+
[issue](https://github.com/jiriks74/presence.nvim/issues)!
103136

104137
## Development
105-
* Clone the repo: `git clone https://github.com/andweeb/presence.nvim.git`
106-
* Enable [logging](#configuration) and ensure that `presence.nvim` is **_not_** in the list of vim plugins in your config
107-
* Run `nvim` with your local changes: `nvim --cmd 'set rtp+=path/to/your/local/presence.nvim' file.txt`
108-
* Ensure that there are no [luacheck](https://github.com/mpeterv/luacheck/) errors: `luacheck lua`
138+
139+
- Clone the repo: `git clone https://github.com/jiriks74/presence.nvim.git`
140+
- Enable [logging](#configuration) and ensure that `presence.nvim` is **_not_**
141+
in the list of vim plugins in your config
142+
- Run `nvim` with your local changes: `nvim --cmd
143+
'set rtp+=path/to/your/local/presence.nvim' file.txt`
144+
- Ensure that there are no [luacheck](https://github.com/mpeterv/luacheck/)
145+
errors: `luacheck lua`
109146

110147
## Contributing
111-
Pull requests are very welcome, feel free to open an issue to work on any of the open [todo items](https://github.com/andweeb/presence.nvim/projects/1?add_cards_query=is%3Aopen) or message [droob#1322](https://discordapp.com/users/241953146232897550) on Discord!
112148

113-
Asset additions and changes are also welcome! Supported file types can be found in [`file_assets.lua`](lua/presence/file_assets.lua) and their referenced asset files can be found [in this folder](https://www.dropbox.com/sh/j8913f0gav3toeh/AADxjn0NuTprGFtv3Il1Pqz-a?dl=0).
149+
**Please use [Conventional Commits](https://www.conventionalcommits.org/)
150+
if you want to contribute.
151+
It makes everyones jobs easier.**
152+
153+
**This project uses [StyLua](https://github.com/JohnnyMorganz/StyLua).
154+
Please format your code using StyLua for better readability**
155+
156+
Pull requests are very welcome, feel free to open an issue to work on
157+
or message [me (@jiriks74)](https://discordapp.com/users/517810049360461837) on my
158+
[Discord server](https://discord.gg/cCq3qcB4jB)!
159+
160+
Asset additions and changes are also welcome! Supported file types can be found in
161+
[`file_assets.lua`](lua/presence/file_assets.lua) and their referenced asset files
162+
can be found [in this folder](https://www.dropbox.com/sh/j8913f0gav3toeh/AADxjn0NuTprGFtv3Il1Pqz-a?dl=0).

0 commit comments

Comments
 (0)