feat(assets): Setup assets
10
.github/workflows/luacheck.yml
vendored
|
@ -1,10 +0,0 @@
|
|||
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
|
16
.github/workflows/stylua.yml
vendored
|
@ -1,16 +0,0 @@
|
|||
name: StyLua
|
||||
on: [push, pull_request]
|
||||
jobs:
|
||||
StyLuacheck:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Install StyLua from crates.io
|
||||
uses: baptiste0928/cargo-install@v3
|
||||
with:
|
||||
crate: stylua
|
||||
version: 0.20.0
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Check code formatting
|
||||
run: stylua -c .
|
1
.gitignore
vendored
|
@ -1 +0,0 @@
|
|||
.DS_Store
|
|
@ -1,7 +0,0 @@
|
|||
globals = {
|
||||
"vim",
|
||||
}
|
||||
|
||||
exclude_files = {
|
||||
"lua/deps",
|
||||
}
|
158
README.md
|
@ -3,160 +3,6 @@
|
|||
This repository uses
|
||||
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-%23FE5196?logo=conventionalcommits&logoColor=white)](https://conventionalcommits.org)
|
||||
|
||||
**[Features](#features)** | **[Installation](#installation)** |
|
||||
**[Configuration](#configuration)** | **[Troubleshooting](#troubleshooting)** |
|
||||
**[Development](#development)** | **[Contributing](#contributing)**
|
||||
## This branch is for assets file language icons, etc.
|
||||
|
||||
> Discord [Rich Presence](https://discord.com/rich-presence) plugin for [Neovim](https://neovim.io)
|
||||
|
||||
![Presence demo](https://gist.githubusercontent.com/andweeb/df3216345530234289b87cf5080c2c60/raw/ad916fec8de921d0021801a0af877a5349621e7e/presence-demo-a.gif)
|
||||
|
||||
## Features
|
||||
|
||||
- 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 '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 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:
|
||||
|
||||
```lua
|
||||
-- The setup config table shows all available config options with their default values:
|
||||
require("presence").setup({
|
||||
-- General options
|
||||
auto_update = true, -- Update activity based on autocmd events (if `false`, map or manually execute `:lua package.loaded.presence:update()`)
|
||||
neovim_image_text = "The One True Text Editor", -- Text displayed when hovered over the Neovim image
|
||||
main_image = "neovim", -- Main image display (either "neovim" or "file")
|
||||
client_id = "1172122807501594644", -- Use your own Discord application client id (not recommended)
|
||||
log_level = nil, -- Log messages at or above this level (one of the following: "debug", "info", "warn", "error")
|
||||
debounce_timeout = 10, -- Number of seconds to debounce events (or calls to `:lua package.loaded.presence:update(<filename>, true)`)
|
||||
enable_line_number = false, -- Displays the current line number instead of the current project
|
||||
blacklist = {}, -- A list of strings or Lua patterns that disable Rich Presence if the current file name, path, or workspace matches
|
||||
buttons = true, -- Configure Rich Presence button(s), either a boolean to enable/disable, a static table (`{{ label = "<label>", url = "<url>" }, ...}`, or a function(buffer: string, repo_url: string|nil): table)
|
||||
file_assets = {}, -- Custom file asset definitions keyed by file names and extensions (see default config at `lua/presence/file_assets.lua` for reference)
|
||||
show_time = true, -- Show the timer
|
||||
|
||||
-- Rich Presence text options
|
||||
editing_text = "Editing %s", -- Format string rendered when an editable file is loaded in the buffer (either string or function(filename: string): string)
|
||||
file_explorer_text = "Browsing %s", -- Format string rendered when browsing a file explorer (either string or function(file_explorer_name: string): string)
|
||||
git_commit_text = "Committing changes", -- Format string rendered when committing changes in git (either string or function(filename: string): string)
|
||||
plugin_manager_text = "Managing plugins", -- Format string rendered when managing plugins (either string or function(plugin_manager_name: string): string)
|
||||
reading_text = "Reading %s", -- Format string rendered when a read-only or unmodifiable file is loaded in the buffer (either string or function(filename: string): string)
|
||||
workspace_text = "Working on %s", -- Format string rendered when in a git repository (either string or function(project_name: string|nil, filename: string): string)
|
||||
line_number_text = "Line %s out of %s", -- Format string rendered when `enable_line_number` is set to true (either string or function(line_number: number, line_count: number): string)
|
||||
})
|
||||
```
|
||||
|
||||
### 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
|
||||
let g:presence_neovim_image_text = "The One True Text Editor"
|
||||
let g:presence_main_image = "neovim"
|
||||
let g:presence_client_id = "1172122807501594644"
|
||||
let g:presence_log_level
|
||||
let g:presence_debounce_timeout = 10
|
||||
let g:presence_enable_line_number = 0
|
||||
let g:presence_blacklist = []
|
||||
let g:presence_buttons = 1
|
||||
let g:presence_file_assets = {}
|
||||
let g:presence_show_time = 1
|
||||
|
||||
" Rich Presence text options
|
||||
let g:presence_editing_text = "Editing %s"
|
||||
let g:presence_file_explorer_text = "Browsing %s"
|
||||
let g:presence_git_commit_text = "Committing changes"
|
||||
let g:presence_plugin_manager_text = "Managing plugins"
|
||||
let g:presence_reading_text = "Reading %s"
|
||||
let g:presence_workspace_text = "Working on %s"
|
||||
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/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/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
|
||||
|
||||
**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).
|
||||
Everything can be found in the assets folder.
|
||||
|
|
BIN
assets/abook.png
Executable file
After Width: | Height: | Size: 33 KiB |
BIN
assets/alacritty.png
Executable file
After Width: | Height: | Size: 221 KiB |
BIN
assets/antlr.png
Executable file
After Width: | Height: | Size: 22 KiB |
BIN
assets/applescript.png
Executable file
After Width: | Height: | Size: 4 MiB |
BIN
assets/appveyor.png
Executable file
After Width: | Height: | Size: 60 KiB |
BIN
assets/arduino.png
Executable file
After Width: | Height: | Size: 173 KiB |
BIN
assets/autohotkey.png
Executable file
After Width: | Height: | Size: 94 KiB |
BIN
assets/babel.png
Executable file
After Width: | Height: | Size: 69 KiB |
BIN
assets/c.png
Executable file
After Width: | Height: | Size: 38 KiB |
BIN
assets/c_plus_plus.png
Executable file
After Width: | Height: | Size: 46 KiB |
BIN
assets/c_sharp.png
Executable file
After Width: | Height: | Size: 47 KiB |
BIN
assets/cargo.png
Executable file
After Width: | Height: | Size: 181 KiB |
BIN
assets/clojure.png
Executable file
After Width: | Height: | Size: 75 KiB |
BIN
assets/clojurescript.png
Executable file
After Width: | Height: | Size: 63 KiB |
BIN
assets/code.png
Executable file
After Width: | Height: | Size: 39 KiB |
BIN
assets/coffeescript.png
Executable file
After Width: | Height: | Size: 86 KiB |
BIN
assets/config.png
Executable file
After Width: | Height: | Size: 38 KiB |
BIN
assets/crystal.png
Executable file
After Width: | Height: | Size: 54 KiB |
BIN
assets/css.png
Executable file
After Width: | Height: | Size: 24 KiB |
BIN
assets/d.png
Executable file
After Width: | Height: | Size: 302 KiB |
BIN
assets/dart.png
Executable file
After Width: | Height: | Size: 76 KiB |
BIN
assets/database.png
Executable file
After Width: | Height: | Size: 49 KiB |
BIN
assets/docker.png
Executable file
After Width: | Height: | Size: 40 KiB |
BIN
assets/editorconfig.png
Executable file
After Width: | Height: | Size: 56 KiB |
BIN
assets/eiffel.png
Executable file
After Width: | Height: | Size: 320 KiB |
BIN
assets/elixir.png
Executable file
After Width: | Height: | Size: 285 KiB |
BIN
assets/elm.png
Executable file
After Width: | Height: | Size: 14 KiB |
BIN
assets/erlang.png
Executable file
After Width: | Height: | Size: 56 KiB |
BIN
assets/eslint.png
Executable file
After Width: | Height: | Size: 35 KiB |
BIN
assets/f_sharp.png
Executable file
After Width: | Height: | Size: 48 KiB |
BIN
assets/fennel.png
Executable file
After Width: | Height: | Size: 63 KiB |
BIN
assets/file.png
Executable file
After Width: | Height: | Size: 34 KiB |
BIN
assets/fish.png
Executable file
After Width: | Height: | Size: 106 KiB |
BIN
assets/git.png
Executable file
After Width: | Height: | Size: 26 KiB |
BIN
assets/gitlab.png
Executable file
After Width: | Height: | Size: 40 KiB |
BIN
assets/go.png
Executable file
After Width: | Height: | Size: 58 KiB |
BIN
assets/graphql.png
Executable file
After Width: | Height: | Size: 77 KiB |
BIN
assets/groovy.png
Executable file
After Width: | Height: | Size: 96 KiB |
BIN
assets/hack.png
Executable file
After Width: | Height: | Size: 30 KiB |
BIN
assets/haml.png
Executable file
After Width: | Height: | Size: 67 KiB |
BIN
assets/haskell.png
Executable file
After Width: | Height: | Size: 37 KiB |
BIN
assets/haxe.png
Executable file
After Width: | Height: | Size: 68 KiB |
BIN
assets/homebrew.png
Executable file
After Width: | Height: | Size: 86 KiB |
BIN
assets/html.png
Executable file
After Width: | Height: | Size: 27 KiB |
BIN
assets/idle.png
Executable file
After Width: | Height: | Size: 235 KiB |
BIN
assets/idris.png
Executable file
After Width: | Height: | Size: 23 KiB |
BIN
assets/java.png
Executable file
After Width: | Height: | Size: 54 KiB |
BIN
assets/javascript.png
Executable file
After Width: | Height: | Size: 22 KiB |
BIN
assets/jest.png
Executable file
After Width: | Height: | Size: 44 KiB |
BIN
assets/json.png
Executable file
After Width: | Height: | Size: 22 KiB |
BIN
assets/julia.png
Executable file
After Width: | Height: | Size: 56 KiB |
BIN
assets/jupyter.png
Executable file
After Width: | Height: | Size: 49 KiB |
BIN
assets/kitty.png
Executable file
After Width: | Height: | Size: 60 KiB |
BIN
assets/kivy.png
Executable file
After Width: | Height: | Size: 16 KiB |
BIN
assets/kotlin.png
Executable file
After Width: | Height: | Size: 55 KiB |
BIN
assets/latex.png
Executable file
After Width: | Height: | Size: 167 KiB |
BIN
assets/less.png
Executable file
After Width: | Height: | Size: 12 KiB |
BIN
assets/liquid.png
Executable file
After Width: | Height: | Size: 74 KiB |
BIN
assets/lisp.png
Executable file
After Width: | Height: | Size: 75 KiB |
BIN
assets/lua.png
Executable file
After Width: | Height: | Size: 90 KiB |
BIN
assets/markdown.png
Executable file
After Width: | Height: | Size: 13 KiB |
BIN
assets/markup.png
Executable file
After Width: | Height: | Size: 17 KiB |
BIN
assets/matlab.png
Executable file
After Width: | Height: | Size: 87 KiB |
BIN
assets/mdx.png
Executable file
After Width: | Height: | Size: 18 KiB |
BIN
assets/neorg.png
Executable file
After Width: | Height: | Size: 88 KiB |
BIN
assets/neovim.png
Executable file
After Width: | Height: | Size: 504 KiB |
BIN
assets/nextjs.png
Executable file
After Width: | Height: | Size: 90 KiB |
BIN
assets/nginx.png
Executable file
After Width: | Height: | Size: 29 KiB |
BIN
assets/nim.jpg
Executable file
After Width: | Height: | Size: 18 KiB |
BIN
assets/nix.png
Executable file
After Width: | Height: | Size: 134 KiB |
BIN
assets/nodejs.png
Executable file
After Width: | Height: | Size: 120 KiB |
BIN
assets/npm.png
Executable file
After Width: | Height: | Size: 7.3 KiB |
BIN
assets/nuxtjs.png
Executable file
After Width: | Height: | Size: 24 KiB |
BIN
assets/ocaml.png
Executable file
After Width: | Height: | Size: 29 KiB |
BIN
assets/org.png
Executable file
After Width: | Height: | Size: 188 KiB |
BIN
assets/perl.png
Executable file
After Width: | Height: | Size: 80 KiB |
BIN
assets/pgsql.png
Executable file
After Width: | Height: | Size: 135 KiB |
BIN
assets/php.png
Executable file
After Width: | Height: | Size: 131 KiB |
BIN
assets/postcss.png
Executable file
After Width: | Height: | Size: 18 KiB |
BIN
assets/powershell.png
Executable file
After Width: | Height: | Size: 89 KiB |
BIN
assets/prettier.png
Executable file
After Width: | Height: | Size: 76 KiB |
BIN
assets/protobuf.png
Executable file
After Width: | Height: | Size: 61 KiB |
BIN
assets/purescript.png
Executable file
After Width: | Height: | Size: 15 KiB |
BIN
assets/python.png
Executable file
After Width: | Height: | Size: 75 KiB |
BIN
assets/r.png
Executable file
After Width: | Height: | Size: 139 KiB |
BIN
assets/racket.png
Executable file
After Width: | Height: | Size: 55 KiB |
BIN
assets/raku.png
Executable file
After Width: | Height: | Size: 151 KiB |
BIN
assets/react.png
Executable file
After Width: | Height: | Size: 126 KiB |
BIN
assets/reason.png
Executable file
After Width: | Height: | Size: 32 KiB |
BIN
assets/renovate.png
Executable file
After Width: | Height: | Size: 141 KiB |
BIN
assets/rescript.png
Executable file
After Width: | Height: | Size: 149 KiB |
BIN
assets/ruby.png
Executable file
After Width: | Height: | Size: 256 KiB |
BIN
assets/rust.png
Executable file
After Width: | Height: | Size: 66 KiB |
BIN
assets/sass.png
Executable file
After Width: | Height: | Size: 48 KiB |
BIN
assets/scala.png
Executable file
After Width: | Height: | Size: 59 KiB |