1
0
mirror of https://github.com/jiriks74/presence.nvim synced 2024-11-23 20:37:50 +01:00

docs(README): Update README for my repo and fix formatting

This commit is contained in:
Jiří Štefka 2023-09-28 22:19:36 +02:00
parent d3bddf40c2
commit bd122273b1
Signed by: jiriks74
GPG Key ID: 1D5E30D3DB2264DE

@ -7,27 +7,51 @@
<img src="https://gist.githubusercontent.com/andweeb/df3216345530234289b87cf5080c2c60/raw/ad916fec8de921d0021801a0af877a5349621e7e/presence-demo-a.gif" width="100%" alt="demo.gif"> <img src="https://gist.githubusercontent.com/andweeb/df3216345530234289b87cf5080c2c60/raw/ad916fec8de921d0021801a0af877a5349621e7e/presence-demo-a.gif" width="100%" alt="demo.gif">
## Features ## Features
* Light and unobtrusive
* No Python/Node providers (or CoC) required - Light and unobtrusive
* 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) - No Python/Node providers (or CoC) required
* Startup time is fast(er than other Rich Presence plugins, by [kind of a lot](https://github.com/andweeb/presence.nvim/wiki/Plugin-Comparisons)) - Cross-platform support: macOS, nixOS, Linux[\*](#notes),
* Written in Lua and [highly configurable](#configuration) in Lua (but also configurable in VimL if you want) Windows, WSL
* Manages Rich Presence across multiple Neovim instances in various environments (tmux panes/windows, ssh sessions, terminal tabs/windows, etc.) - 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 ## 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 Use your favorite plugin manager
* 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)) - [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
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 ### 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 ```lua
-- The setup config table shows all available config options with their default values: -- The setup config table shows all available config options with their default values:
@ -57,7 +81,9 @@ require("presence").setup({
``` ```
### VimL ### VimL
Or if global variables are more your thing, you can use any of the following instead: Or if global variables are more your thing, you can use any of the following instead:
```viml ```viml
" General options " General options
let g:presence_auto_update = 1 let g:presence_auto_update = 1
@ -83,23 +109,38 @@ let g:presence_line_number_text = "Line %s out of %s"
``` ```
## Troubleshooting ## Troubleshooting
* Ensure that Discord is running
* Ensure that your Neovim version is 0.5 or higher - Ensure that Discord is running
* Ensure Game Activity is enabled in your Discord settings - Ensure that your Neovim version is 0.5 or higher
* Enable logging and inspect the logs after opening a buffer - Ensure Game Activity is enabled in your Discord settings
* Set the [`log_level`](#lua) setup option or [`g:presence_log_level`](#viml) to `"debug"` - Enable logging and inspect the logs after opening a buffer
* Load a file and inspect the logs with `:messages` - Set the [`log_level`](#lua) setup option or [`g:presence_log_level`](#viml)
* If there is a `Failed to determine Discord IPC socket` error, your particular OS may not yet be supported to `"debug"`
* 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]`) - Load a file and inspect the logs with `:messages`
* Still not working and need help? Create a new [issue](https://github.com/andweeb/presence.nvim/issues)! - 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 ## 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 - Clone the repo: `git clone https://github.com/jiriks74/presence.nvim.git`
* Run `nvim` with your local changes: `nvim --cmd 'set rtp+=path/to/your/local/presence.nvim' file.txt` - Enable [logging](#configuration) and ensure that `presence.nvim` is **_not_**
* Ensure that there are no [luacheck](https://github.com/mpeterv/luacheck/) errors: `luacheck lua` 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 ## 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). Pull requests are very welcome, feel free to open an issue to work on
or message [@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).