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

Convert neocord to nixvim syntax #69

Merged
merged 3 commits into from
Feb 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 6 additions & 0 deletions config/lsp/lsp.nix
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@
check = {
command = "clippy";
};
# inlayHints = {
# enable = true;
# showParameterNames = true;
# parameterHintsPrefix = "<- ";
# otherHintsPrefix = "=> ";
# };
procMacro = {
enable = true;
};
Expand Down
68 changes: 26 additions & 42 deletions config/utils/neocord.nix
Original file line number Diff line number Diff line change
@@ -1,43 +1,27 @@
{pkgs, ...}: {
extraPlugins = with pkgs.vimPlugins; [
(pkgs.vimUtils.buildVimPlugin {
pname = "neocord";
version = "2024-02-12";
src = pkgs.fetchFromGitHub {
owner = "IogaMaster";
repo = "neocord";
rev = "d5f51d466644fe3c62eda4c41e373ecdc299a367";
sha256 = "1gv7lkqgiljgazzm0r5nbnvj3rj0l376bcz3hf2d881h4xi2lq3l";
};
})
];

extraConfigLua = ''
require("neocord").setup({
-- General options
auto_update = true, -- Update activity based on autocmd events (if `false`, map or manually execute `:lua package.loaded.presence:update()`)
logo = "https://repository-images.githubusercontent.com/325421844/ecb73f47-cb89-4ee0-a0fd-9743c2f3569a", -- "auto" or url
logo_tooltip = "Nixvim", -- nil or string
main_image = "logo", -- "language" or "logo"
client_id = "1157438221865717891", -- 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
global_timer = true, -- if set true, timer won't update when any event are triggered

-- 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 = "I use nixos btw", -- 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)
terminal_text = "Using Terminal", -- Format string rendered when in terminal mode.
})
'';
{
plugins.neocord = {
enable = true;
settings = {
auto_update = true;
blacklist = [];
client_id = "1157438221865717891";
debounce_timeout = 10;
editing_text = "Editing...";
enable_line_number = true;
logo = "https://repository-images.githubusercontent.com/325421844/ecb73f47-cb89-4ee0-a0fd-9743c2f3569a";
logo_tooltip = "NixVim";
file_assets = null;
file_explorer_text = "Browsing...";
git_commit_text = "Committing changes...";
global_timer = true;
line_number_text = "Line %s out of %s";
log_level = null;
main_image = "logo";
plugin_manager_text = "Managing plugins...";
reading_text = "Reading...";
show_time = true;
terminal_text = "Using Terminal...";
workspace_text = "Working on %s";
};
};
}
17 changes: 8 additions & 9 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.