diff --git a/lua/keymap.lua b/lua/keymap.lua index 3b85641..14d0a91 100644 --- a/lua/keymap.lua +++ b/lua/keymap.lua @@ -56,3 +56,4 @@ vim.keymap.set("v", "", "\"+p", {}) vim.keymap.set("n", "", "\"+p", {}) -- lsp rename vim.keymap.set("n", "", vim.lsp.buf.rename, {}) +vim.keymap.set({"n", "v"}, ";", ":") diff --git a/lua/plugins.lua b/lua/plugins.lua index 9d212a1..5da2aca 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -1,4 +1,10 @@ local plugins = { + { + "lambdalisue/suda.vim", + }, + { + "andweeb/presence.nvim" + }, { "jose-elias-alvarez/null-ls.nvim", }, diff --git a/lua/sets.lua b/lua/sets.lua index bf1c00a..583fb57 100644 --- a/lua/sets.lua +++ b/lua/sets.lua @@ -6,4 +6,11 @@ vim.opt.shiftround = true vim.opt.shiftwidth = 4 vim.opt.smartcase = true vim.opt.ignorecase = true -vim.opt.scrolloff = 4 +vim.opt.scrolloff = 6 + +vim.api.nvim_create_autocmd({ "BufEnter" }, { + + callback = function() + package.loaded.presence:update() + end, +}) diff --git a/lua/setup.lua b/lua/setup.lua index ad8a99a..fe9230d 100644 --- a/lua/setup.lua +++ b/lua/setup.lua @@ -18,3 +18,5 @@ require("setupufo") require("setupcomment") -- setup function signature require("setupsig") + +require("setupDiscord") diff --git a/lua/setupDiscord.lua b/lua/setupDiscord.lua new file mode 100644 index 0000000..6797d41 --- /dev/null +++ b/lua/setupDiscord.lua @@ -0,0 +1,33 @@ +-- 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 = "A text editor of all time", -- Text displayed when hovered over the Neovim image + main_image = "neovim", -- 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 = 5, -- Number of seconds to debounce events (or calls to `:lua package.loaded.presence:update(, true)`) + enable_line_number = true, -- Displays the current line number instead of the current project + blacklist = { "nitro" }, -- A list of strings or Lua patterns that disable Rich Presence if the current file name, path, or workspace matches + buttons = { + { + label = "Git", + url = "https://github.com/sadanslargehole", + }, + { + label = "My website", + url = "https://sadanslargehole.com", + }, + }, -- Configure Rich Presence button(s), either a boolean to enable/disable, a static table (`{{ label = "