From 6587ce62ccd1e795f2c6f1ae00bad86a30d94713 Mon Sep 17 00:00:00 2001 From: sadan <117494111+sadan4@users.noreply.github.com> Date: Thu, 11 Jul 2024 19:48:02 -0400 Subject: [PATCH] half of this is very broken but it only breaks every two years so who cares --- lua/keymap.lua | 19 +++++++ lua/masonDownload.lua | 14 ++--- lua/plugins.lua | 48 ++++++++++++++++- lua/setup.lua | 3 ++ lua/setupDiscord.lua | 6 +-- lua/setupbufferline.lua | 117 ++++++++++++++++++++++++++++++++++++++++ lua/setupterminal.lua | 63 ++++++++++++++++++++++ 7 files changed, 259 insertions(+), 11 deletions(-) create mode 100644 lua/setupbufferline.lua create mode 100644 lua/setupterminal.lua diff --git a/lua/keymap.lua b/lua/keymap.lua index 8053f8d..0a70acc 100644 --- a/lua/keymap.lua +++ b/lua/keymap.lua @@ -73,3 +73,22 @@ vim.keymap.set("n", "e", function() vim.api.nvim_feedkeys((":e " .. string.gsub(vim.fn.expand("%"), "(.*/)(.*)", "%1")), "L", false) end) vim.keymap.set("n", "c", ":let @+=@\"") +-- training +vim.keymap.set("n", "", ':echoe "Use h"') +vim.keymap.set("n", "", ':echoe "Use l"') +vim.keymap.set("n", "", ':echoe "Use k"') +vim.keymap.set("n", "", ':echoe "Use j"') + +vim.keymap.set("i", "", ':echoe "Use h"i') +vim.keymap.set("i", "", ':echoe "Use l"i') +vim.keymap.set("i", "", ':echoe "Use k"i') +vim.keymap.set("i", "", ':echoe "Use j"i') +-- https://stackoverflow.com/questions/1841480/how-to-use-lowercase-marks-as-global-in-vim +-- Use lowercase for global marks and uppercase for local marks. +local low = function(i) return string.char(97+i) end +local upp = function(i) return string.char(65+i) end + +for i=0,25 do vim.keymap.set("n", "m"..low(i), "m"..upp(i)) end +for i=0,25 do vim.keymap.set("n", "m"..upp(i), "m"..low(i)) end +for i=0,25 do vim.keymap.set("n", "'"..low(i), "'"..upp(i)) end +for i=0,25 do vim.keymap.set("n", "'"..upp(i), "'"..low(i)) end diff --git a/lua/masonDownload.lua b/lua/masonDownload.lua index 69d61f9..d6a1951 100644 --- a/lua/masonDownload.lua +++ b/lua/masonDownload.lua @@ -1,17 +1,17 @@ local pkgs = { "nixpkgs-fmt", "jdtls", - "yaml-language-server", - "eslint_d", + "yaml-language-server", + "eslint_d", } local reg = require("mason-registry") -for _, pname in ipairs(pkgs) do +for _, pname in ipairs(pkgs) do local pkg = reg.get_package(pname) if not pkg:is_installed() then print(string.format("[masonDownload.lua]: %s is not installed. Installing.", pname)) - local handle = pkg:install(nil) - --while handle.state ~= "CLOSED" do - -- print(handle.stdout) - -- end + local handle = pkg:install(nil) + --while handle.state ~= "CLOSED" do + -- print(handle.stdout) + -- end end end diff --git a/lua/plugins.lua b/lua/plugins.lua index e11dd2f..c14a476 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -1,7 +1,42 @@ local plugins = { + { + "akinsho/bufferline.nvim", + version = "*", + dependencies = "nvim-tree/nvim-web-devicons", + }, { - "mfussenegger/nvim-jdtls" + "akinsho/toggleterm.nvim" }, + { + dir = "/home/meyer/dev/lua/vencord.nvim", + }, + { + "nvim-telescope/telescope-fzf-native.nvim", + build = "make", + }, + + { + "kdheepak/lazygit.nvim", + cmd = { + "LazyGit", + "LazyGitConfig", + "LazyGitCurrentFile", + "LazyGitFilter", + "LazyGitFilterCurrentFile", + }, + -- optional for floating window border decoration + dependencies = { + "nvim-lua/plenary.nvim", + }, + -- setting the keybinding for LazyGit with 'keys' is recommended in + -- order to load the plugin when the command is run for the first time + keys = { + { "lg", "LazyGit", desc = "LazyGit" }, + }, + }, + { + "mfussenegger/nvim-jdtls", + }, { "olrtg/nvim-emmet", }, @@ -105,6 +140,17 @@ local plugins = { { "nvim-telescope/telescope.nvim", tag = "0.1.5", + opts = { + extensions = { + fzf = { + fuzzy = true, -- false will only do exact matching + override_generic_sorter = true, -- override the generic sorter + override_file_sorter = true, -- override the file sorter + case_mode = "ignore_case", -- or "ignore_case" or "respect_case" or smart_case + -- the default case_mode is "smart_case" + }, + }, + }, dependencies = { "nvim-lua/plenary.nvim" }, }, { diff --git a/lua/setup.lua b/lua/setup.lua index a8d9dce..e86bc3b 100644 --- a/lua/setup.lua +++ b/lua/setup.lua @@ -24,3 +24,6 @@ require("setupsig") require("setuplualine") require("setupDiscord") +require('telescope').load_extension('fzf') +require("setupbufferline") +require("setupterminal") diff --git a/lua/setupDiscord.lua b/lua/setupDiscord.lua index 6797d41..36e8f4c 100644 --- a/lua/setupDiscord.lua +++ b/lua/setupDiscord.lua @@ -5,18 +5,18 @@ require("presence").setup({ 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") + log_level = "error", -- 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", + url = "https://github.com/sadan4", }, { label = "My website", - url = "https://sadanslargehole.com", + url = "https://sadan.zip", }, }, -- Configure Rich Presence button(s), either a boolean to enable/disable, a static table (`{{ label = "