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

feat(Flatpak): Add flatpak socket path #129

Closed
wants to merge 20 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
a7d54a2
Added support for MINGW neovim install on Windows hosts
DarkMatter-999 Aug 27, 2023
a451c6b
feat(Flatpak): Add flatpak socket path
jiriks74 Sep 25, 2023
ff8442c
fix(README): delete obsolete link to fix Flatpak
jiriks74 Sep 25, 2023
0601dd5
fix(Flatpak): clear sock_path if the flatpak socket wasn't found
jiriks74 Sep 25, 2023
098de1e
fix(Luacheck)
jiriks74 Sep 28, 2023
cf7d940
fix(formatting): line too long
jiriks74 Sep 28, 2023
d3bddf4
Merge pull request #1 from jiriks74/devel
jiriks74 Sep 28, 2023
bd12227
docs(README): Update README for my repo and fix formatting
jiriks74 Sep 28, 2023
56026a4
docs: Add conventional Commits, clarify discord username
jiriks74 Sep 28, 2023
76935ca
Merge pull request #2 from DarkMatter-999/mingw-support
jiriks74 Sep 28, 2023
85180bc
feat: custom image (#6)
jiriks74 Sep 28, 2023
2d57aa2
fix(Presence:authorize): attempt to index local 'response' (a nil value)
jiriks74 Sep 28, 2023
fb129b1
feat(ci/cd): add stylua action (#12)
jiriks74 Sep 28, 2023
804f148
fix(ci/cd-luacheck): Rename job from sile to Luacheck (#13)
jiriks74 Sep 29, 2023
e9db37b
fix(ci/cd-stylua): Missing runs on, steps, names (#14)
jiriks74 Sep 29, 2023
9e478c9
fix(ci/cd-stylua): cannot contain spaces, invalid StyLua version (#15)
jiriks74 Sep 29, 2023
c295e1e
fix(formatting): Fix formatting using stylua (#11)
jiriks74 Sep 29, 2023
faa6371
feat(bug_template): add checks, add log formating (#16)
jiriks74 Sep 29, 2023
dbb8f79
feat(featreq_template): convert from markdown to issue form (#18)
jiriks74 Sep 29, 2023
5fa1305
fix(featreq_template): change name from Issue report to Feature reque…
jiriks74 Sep 29, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 55 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,98 @@
name: Issue report
description: Report any errors, bugs, or unexpected behaviors related to presence.nvim
title: "[Bug]: "
labels: [bug]
assignees:
- jiriks74
body:
- type: markdown
attributes:
value: |
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.

- type: checkboxes
attributes:
label: Are you on the latest version?
options:
- label: I have updated to the latest version.
required: true

- type: checkboxes
attributes:
label: Have you tried it with default config?
options:
- label: I have tried the default config.
required: true

- type: textarea
attributes:
label: "Description"
description: "A short summary of the error, bug, or unexpected behavior you're facing."
validations:
required: true

- type: textarea
attributes:
label: "Neovim version"
description: "Output of `nvim --version`"
render: markdown
placeholder: |
NVIM v0.6.0-dev+209-g0603eba6e
NVIM: v0.6.0-dev+209-g0603eba6e
Build type: Release
LuaJIT 2.1.0-beta3
LuaJIT: 2.1.0-beta3
value: |
NVIM:
Build type:
LuaJIT:
validations:
required: true

- type: input
attributes:
label: "OS information"
placeholder: "macOS 12.0.1"
validations:
required: true

- type: textarea
attributes:
label: "Steps to reproduce"
description: "Steps to reproduce the issue with your config(s) if applicable"
description: "Steps to reproduce the issue with your config(s) if applicable."
placeholder: |
1. Setup presence.nvim with `require("presence"):setup({...})`
2. Run Neovim with `nvim test.txt`
3. ...
validations:
required: true

- type: textarea
attributes:
label: "Logs"
description: "The full list of `:messages` from one or more `nvim` instances"
description: "The full list of `:messages` from one or more `nvim` instances.\nPlease insert the logs into code blocks."
placeholder: |
<details>

```
[presence.nvim] Using runtime path: /run/user/1000
[presence.nvim] Using Discord IPC socket path: /run/user/1000/discord-ipc-0
[presence.nvim] Checking Discord IPC socket at /run/user/1000/discord-ipc-0...
```

</details>
value: |
<details>

```

```

</details>
validations:
required: true

- type: textarea
attributes:
label: "Aditional info"
description: "If you'd like to add anything else put it here."
validations:
required: false
20 changes: 0 additions & 20 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Feature request
description: Report any errors, bugs, or unexpected behaviors related to presence.nvim
title: "[FEAT]: "
labels: [enhancement]
assignees:
- jiriks74
body:
- type: textarea
attributes:
label: Is your feature request related to a problem?
description: A clear and concise description of what the problem is. Ex. I'm always frustrated when...
validations:
required: true

- type: textarea
attributes:
label: Describe the solution you'd like
description: A clear and concise description of what you want to happen.
validations:
required: false

- type: textarea
attributes:
label: Describe alternatives you've considered
description: A clear and concise description of any alternative solutions or features you've considered.
validations:
required: false

- type: textarea
attributes:
label: Additional context
description: Add any other context or screenshots about the feature request here.
validations:
required: false
14 changes: 0 additions & 14 deletions .github/workflows/CI.yml

This file was deleted.

10 changes: 10 additions & 0 deletions .github/workflows/luacheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Luacheck
on: [push, pull_request]
jobs:
Luacheck:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Luacheck linter
uses: lunarmodules/luacheck@v1
15 changes: 15 additions & 0 deletions .github/workflows/stylua.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: StyLua
on: [push, pull_request]
jobs:
StyLuacheck:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: StyLua check
uses: JohnnyMorganz/stylua-action@v3
with:
token: ${{ secrets.GH_TOKEN }}
version: v0.18.2 # NOTE: we recommend pinning to a specific version in case of formatting changes
# CLI arguments
args: --check .
105 changes: 76 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-%23FE5196?logo=conventionalcommits&logoColor=white)](https://conventionalcommits.org)

<img src="https://gist.githubusercontent.com/andweeb/df3216345530234289b87cf5080c2c60/raw/8de399cfed82c137f793e9f580027b5246bc4379/presence.nvim.png" alt="presence.nvim">&#x200B;

**[Features](#features)** | **[Installation](#installation)** | **[Configuration](#configuration)** | **[Troubleshooting](#troubleshooting)** | **[Development](#development)** | **[Contributing](#contributing)**
Expand All @@ -7,28 +9,51 @@
<img src="https://gist.githubusercontent.com/andweeb/df3216345530234289b87cf5080c2c60/raw/ad916fec8de921d0021801a0af877a5349621e7e/presence-demo-a.gif" width="100%" alt="demo.gif">

## Features
* Light and unobtrusive
* No Python/Node providers (or CoC) required
* 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)
* Startup time is fast(er than other Rich Presence plugins, by [kind of a lot](https://github.com/andweeb/presence.nvim/wiki/Plugin-Comparisons))
* Written in Lua and [highly configurable](#configuration) in Lua (but also configurable in VimL if you want)
* Manages Rich Presence across multiple Neovim instances in various environments (tmux panes/windows, ssh sessions, terminal tabs/windows, etc.)

- Light and unobtrusive
- No Python/Node providers (or CoC) required
- Cross-platform support: macOS, nixOS, Linux[\*](#notes),
Windows, WSL
- Startup time is fast(er than other Rich Presence plugins, by [kind of a lot](https://github.com/andweeb/presence.nvim/wiki/Plugin-Comparisons))
- Written in Lua and [highly configurable](#configuration) in Lua
(but also configurable in VimL if you want)
- Manages Rich Presence across multiple Neovim instances in various environments
(tmux panes/windows, ssh sessions, terminal tabs/windows, etc.)
- Now with Flatpak support!

## Installation

Use your favorite plugin manager
* [vim-plug](https://github.com/junegunn/vim-plug): `Plug 'andweeb/presence.nvim'`
* [packer.nvim](https://github.com/wbthomason/packer.nvim): `use 'andweeb/presence.nvim'`

#### Notes
* Requires [Neovim 0.5](https://github.com/neovim/neovim/releases/tag/v0.5.0) or higher
* 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))
* 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)))
- [vim-plug](https://github.com/junegunn/vim-plug): `Plug 'jiriks74/presence.nvim'`
- [packer.nvim](https://github.com/wbthomason/packer.nvim): `use 'jiriks74/presence.nvim'`
- [lazy.nvim](https://github.com/folke/lazy.nvim):

```lua
{
"jiriks74/presence.nvim",
event = "UIEnter",
},
```


### Notes

- Requires [Neovim 0.5](https://github.com/neovim/neovim/releases/tag/v0.5.0)
or higher
- 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))

## Configuration
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.

Configuration is not necesary unless you want to override the default config.

If you want to change the default config here are your options in Lua and VimL:

### Lua
Require the plugin and call `setup` with a config table with one or more of the following keys:

Require the plugin and call `setup` with a config table with one or more of the
following keys:

```lua
-- The setup config table shows all available config options with their default values:
Expand Down Expand Up @@ -58,7 +83,9 @@ require("presence").setup({
```

### VimL

Or if global variables are more your thing, you can use any of the following instead:

```viml
" General options
let g:presence_auto_update = 1
Expand All @@ -84,23 +111,43 @@ let g:presence_line_number_text = "Line %s out of %s"
```

## Troubleshooting
* Ensure that Discord is running
* Ensure that your Neovim version is 0.5 or higher
* Ensure Game Activity is enabled in your Discord settings
* Enable logging and inspect the logs after opening a buffer
* Set the [`log_level`](#lua) setup option or [`g:presence_log_level`](#viml) to `"debug"`
* Load a file and inspect the logs with `:messages`
* If there is a `Failed to determine Discord IPC socket` error, your particular OS may not yet be supported
* 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]`)
* Still not working and need help? Create a new [issue](https://github.com/andweeb/presence.nvim/issues)!

- Ensure that Discord is running
- Ensure that your Neovim version is 0.5 or higher
- Ensure Game Activity is enabled in your Discord settings
- Enable logging and inspect the logs after opening a buffer
- Set the [`log_level`](#lua) setup option or [`g:presence_log_level`](#viml)
to `"debug"`
- Load a file and inspect the logs with `:messages`
- If there is a `Failed to determine Discord IPC socket` error, your particular
OS may not yet be supported
- If you don't see an existing [issue](https://github.com/jiriks74/presence.nvim/issues)
or [card](https://github.com/jiriks74/presence.nvim/projects/1#column-14183588)
for your OS, create a prefixed [issue](https://github.com/jiriks74/presence.nvim/issues/new)
(e.g. `[Void Linux]`)
- Still not working and need help? Create a new [issue](https://github.com/jiriks74/presence.nvim/issues)!

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

- Clone the repo: `git clone https://github.com/jiriks74/presence.nvim.git`
- Enable [logging](#configuration) and ensure that `presence.nvim` is **_not_**
in the list of vim plugins in your config
- Run `nvim` with your local changes: `nvim --cmd
'set rtp+=path/to/your/local/presence.nvim' file.txt`
- Ensure that there are no [luacheck](https://github.com/mpeterv/luacheck/)
errors: `luacheck lua`

## Contributing
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!

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).
**Please use [Conventional Commits](https://www.conventionalcommits.org/) if you want to contribute.
It makes everyones jobs easier.**

**This project uses [StyLua](https://github.com/JohnnyMorganz/StyLua). Please format your code using StyLua for better readability**

Pull requests are very welcome, feel free to open an issue to work on
or message [me (@jiriks74)](https://discordapp.com/users/517810049360461837) on my
[Discord server](https://discord.gg/cCq3qcB4jB)!

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).
Loading