diff --git a/lua/data/cond.lua b/lua/data/cond.lua new file mode 100644 index 0000000..59dfb0c --- /dev/null +++ b/lua/data/cond.lua @@ -0,0 +1,142 @@ +---@module "data.cond" +--- This module defines the conditionals for the Neovim configuration. +-- ╭─────────────────────────────────────────────────────────╮ +-- │ Conditionals │ +-- ╰─────────────────────────────────────────────────────────╯ +local M = {} + +local func = require("data.func") +local types = require("data.types") + +--- Auto Save conditional options +M.autosave = function() + return func.check_global_var("auto_save", true, false) +end + +--- Bars-N-Lines conditional options +M.barsNlines = function() + if + func.check_global_var("statuscolumn", "barsNlines", "native") + or func.check_global_var("tabline", "barsNlines", "bufferline") + or func.check_global_var("statusline", "barsNlines", "lualine") + then + return true + end + return false +end + +--- Codeium conditional options +M.codeium = function() + return func.check_global_var("aitool", "codeium", "neocodeium") +end + +--- CodeSnap conditional options +M.codesnap = function() + return func.check_global_var("codesnap", true, false) +end + +--- Colorful Window-Separators conditional options +M.colorfulwinsep = function() + return func.check_global_var("colorfulwinsep", true, false) +end + +--- Auto-CursorLine conditional options +M.cursorline = function() + return func.check_global_var("auto_cursorline", true, true) +end + +--- Bufferline conditional options +M.bufferline = function() + if + func.check_global_var("tabline", "bufferline", "bufferline") + or func.check_global_var("tabline", "barsNlines", "bufferline") + then + return true + end + return false +end + +--- CoPilot conditional options +M.copilot = function() + return vim.g.aitool == "copilot" +end + +--- HardTime conditional options +M.hardtime = function() + return func.check_global_var("usehardtime", true, false) +end + +--- Heirline conditional options +M.heirline = function() + return func.check_global_var("statusline", "heirline", "heirline") +end + +--- Image conditional options +M.image = function() + -- Disable image rendering in Neovide + -- or when vim.g.useimage = false + if vim.g.useimage == false then + return false + end + return not vim.g.neovide +end + +--- LuaRocks conditional options +M.luarocks = function() + return func.check_global_var("useluarocks", true, true) +end + +--- Minimap conditional options +M.minimap = function() + types.setup() + local ex_ft = types.minimap.ft + local ex_buf = types.minimap.buf + local ft = vim.bo.filetype + local buf = vim.bo.buftype + local mod = vim.bo.modifiable + return not vim.tbl_contains(ex_ft, ft) + and not vim.tbl_contains(ex_buf, buf) + and mod == true +end + +--- Minuet conditional options +M.minuet = function() + return func.check_global_var("aitool", "minuet", "neocodeium") +end + +--- Music Controls conditional options +M.musiccontrols = function() + return func.check_global_var("usemusic", true, true) +end + +--- NekiFoch conditional options +M.nekifoch = function() + return func.is_kitty() +end + +--- Tabnine conditional options +--- Codeium conditional options +M.neocodeium = function() + return func.check_global_var("aitool", "neocodeium", "neocodeium") +end + +M.tabnine = function() + return func.check_global_var("aitool", "tabnine", "neocodeium") +end + +--- TMux conditional options +M.tmux = function() + return func.is_tmux() +end + +--- WakaTime conditional options +M.wakatime = function() + return vim.g.usewakatime +end + +--- WezTerm conditional options +M.wezterm = function() + return func.is_wezterm() +end + +return M diff --git a/lua/data/events.lua b/lua/data/events.lua new file mode 100644 index 0000000..6954c4c --- /dev/null +++ b/lua/data/events.lua @@ -0,0 +1,47 @@ +---@module "data.events" +--- This module defines the event tables for the Neovim configuration. +-- ╭─────────────────────────────────────────────────────────╮ +-- │ Events │ +-- ╰─────────────────────────────────────────────────────────╯ +local M = {} + +--- DEFAULT --- +M.default = "VeryLazy" + +--- Alpha events +M.alpha = { "VimEnter" } + +--- Auto Save events +M.autosave = { "InsertLeave", "TextChanged" } + +--- Colorful Window Separators events +M.colorfulwinsep = { "WinLeave" } + +--- Dashboard-Nvim events +M.dashboard = { "UIEnter" } + +--- Dead Column +M.deadcolumn = { "BufEnter" } + +--- Heirline events +M.heirline = { "UIEnter" } + +--- Highlight Colors events +M.highlightcolor = { "BufReadPre" } + +--- Mini.Align events +M.minialign = { "InsertEnter" } + +--- Mini.SplitJoin events +M.minisplitjoin = { "InsertEnter" } + +--- Discord Presence events +M.presence = { "BufReadPre" } + +--- RipGrep Substitute events +M.ripsub = { "InsertEnter" } + +--- SmoothCursor events +M.smoothcursor = { "BufEnter" } + +return M diff --git a/lua/data/ft.lua b/lua/data/ft.lua new file mode 100644 index 0000000..ded4348 --- /dev/null +++ b/lua/data/ft.lua @@ -0,0 +1,10 @@ +---@module "data.ft" +--- This module defines the filetype tables for the Neovim configuration. +-- ╭─────────────────────────────────────────────────────────╮ +-- │ Filetypes │ +-- ╰─────────────────────────────────────────────────────────╯ +local M = {} + +M.helpview = "help" + +return M diff --git a/lua/data/types.lua b/lua/data/types.lua index a3cdfa2..fa88b93 100644 --- a/lua/data/types.lua +++ b/lua/data/types.lua @@ -9,6 +9,8 @@ local M = {} -- ━━━━━━━━━━━━━━━━━━━━━━━━━━━ Mode Indicators ━━━━━━━━━━━━━━━━━━━━━━━━━━━ +--- A collection of functions that return icons and names for +--- the current mode. M.mode = { n = { -- Normal mode icon = "", @@ -134,6 +136,35 @@ M.mode = { }, } +-- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Border Styles ━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +--- Border configuration options +M.border = { + round = function() + return { + { "╭", "FloatBorder" }, + { "─", "FloatBorder" }, + { "╮", "FloatBorder" }, + { "│", "FloatBorder" }, + { "╯", "FloatBorder" }, + { "─", "FloatBorder" }, + { "╰", "FloatBorder" }, + { "│", "FloatBorder" }, + } + end, + simple = function() + return { + { "─", "FloatBorder" }, + { "│", "FloatBorder" }, + { "─", "FloatBorder" }, + { "│", "FloatBorder" }, + { "─", "FloatBorder" }, + { "│", "FloatBorder" }, + { "─", "FloatBorder" }, + { "│", "FloatBorder" }, + } + end, +} + -- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Type tables ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ --- General exclusion list for buffers and filetypes @@ -427,6 +458,10 @@ M.neocodeium = { manual = false, silent = true, debounce = false, + filetypes = { + TelescopePrompt = false, + ["dap-repl"] = false, + }, }, } @@ -458,8 +493,11 @@ M.whichkey = { }, }, triggers = { + { "", mode = { "n", "x" } }, { "", mode = { "n", "v" } }, + { "", mode = { "n", "v" } }, { "s", mode = { "n", "x" } }, + { "g", mode = { "n", "x" } }, }, }, }