From db963c2a6753bd0ec0f909b6c72dc48312cfe563 Mon Sep 17 00:00:00 2001 From: TiagoRG Date: Sun, 22 Oct 2023 15:38:18 +0100 Subject: [PATCH] 22/10 Update Signed-off-by: TiagoRG --- .config/nvim/after/plugin/autoclose.lua | 24 +++ .../nvim/after/plugin/indent-blanklines.lua | 28 ++++ .config/nvim/after/plugin/luasnip.lua | 12 ++ .config/nvim/after/plugin/presence.lua | 25 ++++ .config/nvim/after/plugin/tabset.lua | 18 +++ .config/nvim/lua/tiagorg/init.lua | 140 +----------------- .config/nvim/lua/tiagorg/packer.lua | 7 + .config/nvim/lua/tiagorg/remap.lua | 6 +- .config/nvim/lua/tiagorg/set.lua | 5 - .config/nvim/plugin/packer_compiled.lua | 22 ++- .local/bin/run | 26 ---- .zsh/.zshrc | 10 +- setup | 5 +- 13 files changed, 147 insertions(+), 181 deletions(-) create mode 100644 .config/nvim/after/plugin/autoclose.lua create mode 100644 .config/nvim/after/plugin/indent-blanklines.lua create mode 100644 .config/nvim/after/plugin/luasnip.lua create mode 100644 .config/nvim/after/plugin/presence.lua create mode 100644 .config/nvim/after/plugin/tabset.lua delete mode 100755 .local/bin/run diff --git a/.config/nvim/after/plugin/autoclose.lua b/.config/nvim/after/plugin/autoclose.lua new file mode 100644 index 0000000..ac6e4c7 --- /dev/null +++ b/.config/nvim/after/plugin/autoclose.lua @@ -0,0 +1,24 @@ +require("autoclose").setup({ + keys = { + ["("] = { escape = false, close = true, pair = "()", disabled_filetypes = {} }, + ["["] = { escape = false, close = true, pair = "[]", disabled_filetypes = {} }, + ["{"] = { escape = false, close = true, pair = "{}", disabled_filetypes = {} }, + + [">"] = { escape = true, close = false, pair = "<>", disabled_filetypes = {} }, + [")"] = { escape = true, close = false, pair = "()", disabled_filetypes = {} }, + ["]"] = { escape = true, close = false, pair = "[]", disabled_filetypes = {} }, + ["}"] = { escape = true, close = false, pair = "{}", disabled_filetypes = {} }, + + ['"'] = { escape = true, close = true, pair = '""', disabled_filetypes = {"gitcommit", "tex"} }, + ["'"] = { escape = true, close = true, pair = "''", disabled_filetypes = {"gitcommit", "tex"} }, + ["`"] = { escape = true, close = true, pair = "``", disabled_filetypes = {"gitcommit", "tex"} }, + + ["$"] = { escape = true, close = true, pair = "$$", enabled_filetypes = {"tex"} }, + }, + options = { + disabled_filetypes = { "text" }, + disable_when_touch = false, + pair_spaces = false, + auto_indent = true, + }, +}) diff --git a/.config/nvim/after/plugin/indent-blanklines.lua b/.config/nvim/after/plugin/indent-blanklines.lua new file mode 100644 index 0000000..7ced543 --- /dev/null +++ b/.config/nvim/after/plugin/indent-blanklines.lua @@ -0,0 +1,28 @@ +-- Rainbow indent lines + +local highlight = { + "RainbowRed", + "RainbowYellow", + "RainbowBlue", + "RainbowOrange", + "RainbowGreen", + "RainbowViolet", + "RainbowCyan", +} +local hooks = require "ibl.hooks" +-- create the highlight groups in the highlight setup hook, so they are reset +-- every time the colorscheme changes +hooks.register(hooks.type.HIGHLIGHT_SETUP, function() + vim.api.nvim_set_hl(0, "RainbowRed", { fg = "#E06C75" }) + vim.api.nvim_set_hl(0, "RainbowYellow", { fg = "#E5C07B" }) + vim.api.nvim_set_hl(0, "RainbowBlue", { fg = "#61AFEF" }) + vim.api.nvim_set_hl(0, "RainbowOrange", { fg = "#D19A66" }) + vim.api.nvim_set_hl(0, "RainbowGreen", { fg = "#98C379" }) + vim.api.nvim_set_hl(0, "RainbowViolet", { fg = "#C678DD" }) + vim.api.nvim_set_hl(0, "RainbowCyan", { fg = "#56B6C2" }) +end) + +vim.g.rainbow_delimiters = { highlight = highlight } +require("ibl").setup { scope = { highlight = highlight } } + +hooks.register(hooks.type.SCOPE_HIGHLIGHT, hooks.builtin.scope_highlight_from_extmark) diff --git a/.config/nvim/after/plugin/luasnip.lua b/.config/nvim/after/plugin/luasnip.lua new file mode 100644 index 0000000..9173298 --- /dev/null +++ b/.config/nvim/after/plugin/luasnip.lua @@ -0,0 +1,12 @@ +require("luasnip.loaders.from_snipmate").load({ path = { "$HOME/.config/nvim/snippets/" } }) + +local ls = require("luasnip") +vim.keymap.set({"i"}, "", function() ls.expand() end, {silent = true}) +vim.keymap.set({"i", "s"}, "", function() ls.jump( 1) end, {silent = true}) +vim.keymap.set({"i", "s"}, "", function() ls.jump(-1) end, {silent = true}) + +vim.keymap.set({"i", "s"}, "", function() + if ls.choice_active() then + ls.change_choice(1) + end +end, {silent = true}) diff --git a/.config/nvim/after/plugin/presence.lua b/.config/nvim/after/plugin/presence.lua new file mode 100644 index 0000000..fc3c5d2 --- /dev/null +++ b/.config/nvim/after/plugin/presence.lua @@ -0,0 +1,25 @@ +-- 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 + neovim_image_text = "Neovim", -- 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 = 1, -- Number of seconds to debounce events (or calls to `:lua package.loaded.presence:update(, 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 = "