added sicord precense to nvim

This commit is contained in:
Nicolai Van der Storm 2023-10-18 18:33:38 +02:00
parent 0682724b5d
commit 6e344e87e5
Signed by: NicolaiVdS
GPG Key ID: CA53B34914EFD59B
4 changed files with 43 additions and 11 deletions

View File

@ -25,11 +25,11 @@
]
},
"locked": {
"lastModified": 1697611555,
"narHash": "sha256-8nYMduRQfGSQJr2cDMyodsuGlRcJAy0Ko8K4KkjurP8=",
"lastModified": 1697622055,
"narHash": "sha256-t9rwzjlfgCnXDFGH3wsooYfAOA+XqQmgTojhzuNafZ4=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "05649393ac1f34980a5cf6a6e89de77626c9182b",
"rev": "84fa81c7acb018c3c5a504dcefbc28a182c933c2",
"type": "github"
},
"original": {

View File

@ -77,6 +77,10 @@
config = toLuaFile ./plugins/transparent.lua;
}
{
plugin = vimPlugins.presence-nvim;
config = toLuaFile ./plugins/presence.lua;
}
];

View File

@ -0,0 +1,28 @@
local status, plugin = pcall(require,'presence')
if not status then
print('Error with plugin: ', plugin)
return
end
plugin.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 = "file", -- Main image display (either "neovim" or "file")
client_id = "793271441293967371", -- 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 = true, -- 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)
})

View File

@ -22,13 +22,13 @@ plugin.setup({
}, -- table: additional groups that should be cleared
exclude_groups = {}, -- table: groups you don't want to clear
})
vim.g.transparent_groups = vim.list_extend(
vim.g.transparent_groups or {},
vim.tbl_map(function(v)
return v.hl_group
end, vim.tbl_values(require('bufferline.config').highlights))
)
-- vim.g.transparent_groups = vim.list_extend(
-- vim.g.transparent_groups or {},
-- vim.tbl_map(function(v)
-- return v.hl_group
-- end, vim.tbl_values(require('bufferline.config').highlights))
-- )
--- Fix for bufferline looking strange on startup ---
vim.cmd(":TransparentToggle")
vim.cmd(":TransparentToggle")
-- vim.cmd(":TransparentToggle")
-- vim.cmd(":TransparentToggle")