diff --git a/.chezmoiroot b/.chezmoiroot deleted file mode 100644 index 73d74c2..0000000 --- a/.chezmoiroot +++ /dev/null @@ -1 +0,0 @@ -chezmoi diff --git a/.dotter/devbox.toml b/.dotter/devbox.toml new file mode 100644 index 0000000..7709e32 --- /dev/null +++ b/.dotter/devbox.toml @@ -0,0 +1,6 @@ +includes = [] +packages = ["default", "cli", "dev"] + +[files] + +[variables] diff --git a/.dotter/global.toml b/.dotter/global.toml new file mode 100644 index 0000000..0920439 --- /dev/null +++ b/.dotter/global.toml @@ -0,0 +1,72 @@ +[settings] +default_target_type = "automatic" + +[helpers] +flatten_table = ".dotter/handlebars_helpers/flatten_table.rhai" +header = ".dotter/handlebars_helpers/header.rhai" + +# CLI package +[cli] +depends = ["nvim", "zsh", "fzf", "starship"] + +[cli.variables] +nerd_font = "JetBrainsMono" + +[cli.files] +"config/bat" = "~/.config/bat" +"config/kitty" = {target = "~/.config/kitty", type = "symbolic" } +"config/sesh" = "~/.config/sesh" +"config/tmux" = "~/.config/tmux" +"config/yazi" = "~/.config/yazi" +"config/zellij" = "~/.config/zellij" + +[dev] +depends = ["rust"] + +[dev.files] +"config/git" = "~/.config/git" +"config/lazygit" = { target = "~/.config/lazygit", type = "symbolic"} +"config/zed" = "~/.config/zed" + +[zsh.files] +"config/zsh/zshrc" = "~/.zshrc" +"config/zsh/zprofile" = "~/.zprofile" +"config/zsh/aliases" = {target = "~/.config/zsh/aliases", type="symbolic"} +"config/zsh/completions" = {target = "~/.config/zsh/completions", type = "symbolic"} +"config/zsh/functions" = "~/.config/zsh/functions" + +[fzf.files] +"config/fzf" = "~/.config/fzf" + +[starship.files] +"config/starship.toml" = "~/.config/starship.toml" + +[nushell.files] +"config/nushell" = "~/.config/nushell" + +[nvim.files] +"config/nvim" = "~/.config/nvim" +[nvim.files."config/nvim/lua/aleidk/lazy.lua"] +target = "~/.config/nvim/lua/aleidk/lazy.lua" +type = "template" +prepend = """ +local enabled_plugins = { + nvim_core = {{ nvim-core }}, + nvim_base = {{ nvim-base }}, + nvim_ide = {{ nvim-ide }}, +} + +""" + +# Handle package activation from Lazy instead of dotter +# This will prevent conflics in lazy-lock.json for having different plugins +[nvim.variables] +nvim-core = true +nvim-base = false +nvim-ide = false + +[rust.variables] +cargo.packages = [] + +[mise.files] +"config/mise" = "~/.config/mise" diff --git a/.dotter/handlebars_helpers/flatten_table.rhai b/.dotter/handlebars_helpers/flatten_table.rhai new file mode 100644 index 0000000..30ee4f9 --- /dev/null +++ b/.dotter/handlebars_helpers/flatten_table.rhai @@ -0,0 +1,30 @@ +/* +* Flatten a table into a list of values. +* The table has to be in the form of +* ```toml +* [table.subtable] +* variable1 = ["value1", "value2"] +* +* [table.subtable] +* variable2 = ["value3", "value4"] +* +* then we use it in handlerbars like this: +* +* {{ flatten_table table.subtable }} +* +* and it will return an array with all the arrays of subtable +*/ + +if type_of(params[0]) != "map" { + return; +} + +let table = params[0]; + +let result = []; + +for value in table.values() { + result.append(value); +} + +result diff --git a/.dotter/handlebars_helpers/header.rhai b/.dotter/handlebars_helpers/header.rhai new file mode 100644 index 0000000..1a35fc7 --- /dev/null +++ b/.dotter/handlebars_helpers/header.rhai @@ -0,0 +1,48 @@ +let x_padding = hash["padding"] ?? 50; + +let header = #{ + x_padding: x_padding, + out: "", + append: |suffix| { + this.out += suffix + "\n"; + }, + append_center: |suffix| { + + let suffix_len = suffix.len(); + let padding = this.x_padding - suffix_len / 2; + let fill = ""; + fill.pad(padding, " "); + + this.out += fill + suffix.to_upper() + fill + "\n"; + }, + append_divider: || { + let divider = ""; + divider.pad(this.x_padding * 2, "─"); + + this.append(divider); + }, + open_echo: || { + this.out += "echo -e '\n"; + }, + close_echo: || { + this.out += "'"; + }, + to_string: || { + return this.out; + } +}; + +header.open_echo(); + +header.append_divider(); + + +params.for_each(|idx| { + header.append_center(this); +}); + +header.append_divider(); +header.close_echo(); + +return header.to_string(); + diff --git a/.dotter/machines/fedora.toml b/.dotter/machines/fedora.toml new file mode 100644 index 0000000..ee05f71 --- /dev/null +++ b/.dotter/machines/fedora.toml @@ -0,0 +1,66 @@ +# Dotter only support merging tables, and put the key-values into the global scope of the tables +# If we try to use the same variable name in a package, it will throw an error +# if we try to use the same key in a nested table, it will be overriden with the last value +# +# the fix to this is to have a table with unique keys, this is supported by handlerbars {{#each}} directive +# but will give us an array as value, so we need to flatten it + +[utils.variables] +pkg-install = "sudo dnf install -y" + +[cli.variables.copr] +cli = [ + "atim/lazygit", + "atim/starship" +] + +[cli.variables.packages] +cli = [ + "bat", + "dnf-plugin-system-upgrade", + "duf", + "eza", + "fd-find", + # "firefox-dev", + "flatpak", + "fzf", + "git", + "kitty", + "lazygit", + "neovim", + "remove-retired-packages", + "ripgrep", + "sd", + "starship", + "tealdeer", + "zoxide", + "zsh", +] + +[dev.variables.packages] +dev = [ + "gcc", + "gcc-c++", + "just", + "nodejs", + "openssl", + "openssl-devel", + "tmux", + "tree-sitter-cli", +] +[dev.variables.cargo.packages] +dev = [ + "cocogitto" +] + + +[zsh.variables.packages] +zsh = [ + "zsh" +] + +[rust.variables.cargo.packages] +rust = [ + "yazi-fm", + "yazi-cli", +] diff --git a/.dotter/post_deploy.sh b/.dotter/post_deploy.sh new file mode 100644 index 0000000..db1b97d --- /dev/null +++ b/.dotter/post_deploy.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +sha256sum .dotter/cache/.dotter/pre_deploy.sh >.dotter/cache/pre_deploy.checksum diff --git a/.dotter/pre_deploy.sh b/.dotter/pre_deploy.sh new file mode 100644 index 0000000..92715f8 --- /dev/null +++ b/.dotter/pre_deploy.sh @@ -0,0 +1,100 @@ +#!/usr/bin/env bash +# shellcheck disable=all +# This is a handlerbars template, so ignore issues + +set -euo pipefail + +checksum_file=".dotter/cache/pre_deploy.checksum" + +if [[ -e "$checksum_file" ]] && sha256sum --check "$checksum_file" >/dev/null 2>&1; then + echo "Pre deploy script has not changed, skiping script execution" + echo "To override this, remove the checksum file: $checksum_file" + exit 0 +fi + +{{!~ Detect the distribution ~}} +{{~ assign "distro" (trim (command_output "awk -F= '/^ID=/ {print $2}' /etc/os-release | tr -d '\"'")) ~}} + +{{ header "Running pre deploy script for distro" (to_title_case distro) }} + +{{ #if (is_executable "sudo") }} +{{ header "Configuring sudo" }} + +SUDOERS_FILE="/etc/sudoers.d/01-user" + +if [[ -e "${SUDOERS_FILE}" ]]; then + echo "Sudo configuration already exists, to override it remove the file: ${SUDOERS_FILE}" + exit 0 +else + sudo -B tee "${SUDOERS_FILE}" < /dev/null - {{ end -}} - - # ╭──────────────────────────────────────────────────────────╮ - # │ Install DNF packages │ - # ╰──────────────────────────────────────────────────────────╯ - - sudo dnf install -y {{ range .packages.dnf.packages }} {{ . | quote }} {{- end -}} - -{{ end }} - -# ╭──────────────────────────────────────────────────────────╮ -# │ Install Rust │ -# ╰──────────────────────────────────────────────────────────╯ - -curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path --default-toolchain stable - -rustup update - -# ╭──────────────────────────────────────────────────────────╮ -# │ Install Cargo Packages │ -# ╰──────────────────────────────────────────────────────────╯ - -cargo install {{ range .packages.cargo }} {{ . | quote }} {{- end -}} - diff --git a/chezmoi/dot_config/hypr/executable_gdm-wrapper.sh b/chezmoi/dot_config/hypr/executable_gdm-wrapper.sh deleted file mode 100644 index 3b0982d..0000000 --- a/chezmoi/dot_config/hypr/executable_gdm-wrapper.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/sh - -if [ "x$XDG_SESSION_TYPE" = "xwayland" ] && - [ "x$XDG_SESSION_CLASS" != "xgreeter" ] && - [ -n "$SHELL" ] && - grep -q "$SHELL" /etc/shells && - ! (echo "$SHELL" | grep -q "false") && - ! (echo "$SHELL" | grep -q "nologin"); then - if [ "$1" != '-l' ]; then - exec bash -c "exec -l '$SHELL' -c '$0 -l $*'" - else - shift - fi -fi - -SETTING=$(G_MESSAGES_DEBUG='' gsettings get org.gnome.system.locale region) -REGION=${SETTING#\'} -REGION=${REGION%\'} - -if [ -n "$REGION" ]; then - unset LC_TIME LC_NUMERIC LC_MONETARY LC_MEASUREMENT LC_PAPER - - if [ "$LANG" != "$REGION" ]; then - # LC_CTYPE - export LC_NUMERIC=$REGION - export LC_TIME=$REGION - # LC_COLLATE - export LC_MONETARY=$REGION - # LC_MESSAGES - export LC_PAPER=$REGION - # LC_NAME - export LC_ADDRESS=$REGION - export LC_TELEPHONE=$REGION - export LC_MEASUREMENT=$REGION - # LC_IDENTIFICATION - fi -fi - -exec Hyprland diff --git a/chezmoi/dot_config/hypr/hyprland.conf b/chezmoi/dot_config/hypr/hyprland.conf deleted file mode 100644 index b484ab6..0000000 --- a/chezmoi/dot_config/hypr/hyprland.conf +++ /dev/null @@ -1,158 +0,0 @@ -# -# Please note not all available settings / options are set here. -# For a full list, see the wiki -# - -# See https://wiki.hyprland.org/Configuring/Monitors/ -monitor=,highrr,auto,1 - -# Execute your favorite apps at launch -exec-once = waybar & hyprpaper - -# Source a file (multi-file configs) -# source = ~/.config/hypr/myColors.conf - -# Some default env vars. -env = XCURSOR_SIZE,24 - -# For all categories, see https://wiki.hyprland.org/Configuring/Variables/ -input { - kb_layout = latam - kb_variant = - kb_model = - kb_options = caps:escape - kb_rules = - - follow_mouse = 1 - - touchpad { - natural_scroll = true - } - - sensitivity = 0 # -1.0 - 1.0, 0 means no modification. -} - -general { - # See https://wiki.hyprland.org/Configuring/Variables/ for more - - gaps_in = 5 - gaps_out = 10 - border_size = 2 - col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg - col.inactive_border = rgba(595959aa) - - layout = dwindle -} - -decoration { - # See https://wiki.hyprland.org/Configuring/Variables/ for more - rounding = 10 - drop_shadow = true - shadow_range = 4 - shadow_render_power = 3 - col.shadow = rgba(1a1a1aee) - - blur { - enabled = true - size = 3 - passes = 1 - new_optimizations = true - } -} - -animations { - enabled = true - - # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more - - bezier = myBezier, 0.05, 0.9, 0.1, 1.05 - - animation = windows, 1, 7, myBezier - animation = windowsOut, 1, 7, default, popin 80% - animation = border, 1, 10, default - animation = borderangle, 1, 8, default - animation = fade, 1, 7, default - animation = workspaces, 1, 6, default -} - -dwindle { - # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more - pseudotile = true # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below - preserve_split = true # you probably want this -} - -master { - # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more - new_is_master = true -} - -gestures { - # See https://wiki.hyprland.org/Configuring/Variables/ for more - workspace_swipe = true - workspace_swipe_invert = false -} - -# Example per-device config -# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more -device:epic-mouse-v1 { - sensitivity = -0.5 -} - -# Example windowrule v1 -# windowrule = float, ^(kitty)$ -# Example windowrule v2 -# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ -# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more - - -# See https://wiki.hyprland.org/Configuring/Keywords/ for more -$mainMod = SUPER - -# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more -bind = $mainMod, Q, exec, alacritty -bind = $mainMod, C, killactive, -bind = $mainMod, M, exit, -bind = $mainMod, E, exec, dolphin -bind = $mainMod, V, togglefloating, -bind = $mainMod, D, exec, wofi --show drun -bind = $mainMod, P, pseudo, # dwindle -bind = $mainMod, J, togglesplit, # dwindle - -# Move focus with mainMod + arrow keys -bind = $mainMod, h, movefocus, l -bind = $mainMod, j, movefocus, d -bind = $mainMod, k, movefocus, u -bind = $mainMod, l, movefocus, r - -# Switch workspaces with mainMod + [0-9] -bind = $mainMod, 1, workspace, 1 -bind = $mainMod, 2, workspace, 2 -bind = $mainMod, 3, workspace, 3 -bind = $mainMod, 4, workspace, 4 -bind = $mainMod, 5, workspace, 5 -bind = $mainMod, 6, workspace, 6 -bind = $mainMod, 7, workspace, 7 -bind = $mainMod, 8, workspace, 8 -bind = $mainMod, 9, workspace, 9 -bind = $mainMod, 0, workspace, 10 - -# Move active window to a workspace with mainMod + SHIFT + [0-9] -bind = $mainMod SHIFT, 1, movetoworkspace, 1 -bind = $mainMod SHIFT, 2, movetoworkspace, 2 -bind = $mainMod SHIFT, 3, movetoworkspace, 3 -bind = $mainMod SHIFT, 4, movetoworkspace, 4 -bind = $mainMod SHIFT, 5, movetoworkspace, 5 -bind = $mainMod SHIFT, 6, movetoworkspace, 6 -bind = $mainMod SHIFT, 7, movetoworkspace, 7 -bind = $mainMod SHIFT, 8, movetoworkspace, 8 -bind = $mainMod SHIFT, 9, movetoworkspace, 9 -bind = $mainMod SHIFT, 0, movetoworkspace, 10 - -# Scroll through existing workspaces with mainMod + scroll -bind = $mainMod, mouse_down, workspace, e+1 -bind = $mainMod, mouse_up, workspace, e-1 - -# Move/resize windows with mainMod + LMB/RMB and dragging -bindm = $mainMod, mouse:272, movewindow -bindm = $mainMod, mouse:273, resizewindow - diff --git a/chezmoi/dot_config/hypr/hyprpaper.conf b/chezmoi/dot_config/hypr/hyprpaper.conf deleted file mode 100644 index e71274d..0000000 --- a/chezmoi/dot_config/hypr/hyprpaper.conf +++ /dev/null @@ -1,4 +0,0 @@ -preload = ~/Pictures/wallpaper.jpg - -#set the default wallpaper(s) seen on inital workspace(s) --depending on the number of monitors used -wallpaper = ,~/Pictures/wallpaper.jpg diff --git a/chezmoi/dot_config/mako/config b/chezmoi/dot_config/mako/config deleted file mode 100644 index 1b7531f..0000000 --- a/chezmoi/dot_config/mako/config +++ /dev/null @@ -1,11 +0,0 @@ -default-timeout=5000 - -# Colors - -background-color=#24273a -text-color=#cad3f5 -border-color=#8aadf4 -progress-color=over #363a4f - -[urgency=high] -border-color=#f5a97f diff --git a/chezmoi/dot_config/nvim/init.lua b/chezmoi/dot_config/nvim/init.lua deleted file mode 100644 index a9b3bcc..0000000 --- a/chezmoi/dot_config/nvim/init.lua +++ /dev/null @@ -1,26 +0,0 @@ --- Loadnoptions before anything -require("aleidk.options") - --- Init PLugins - --- Install package manager https://github.com/folke/lazy.nvim -local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" -if not vim.loop.fs_stat(lazypath) then - vim.fn.system({ - "git", - "clone", - "--filter=blob:none", - "https://github.com/folke/lazy.nvim.git", - "--branch=stable", -- latest stable release - lazypath, - }) -end -vim.opt.rtp:prepend(lazypath) - --- Load plugins -require("lazy").setup("aleidk.plugins") - --- Rest of configuratin - -require("aleidk.keymaps") -require("aleidk.autocmds") diff --git a/chezmoi/dot_config/nvim/lua/aleidk/plugins/ai.lua b/chezmoi/dot_config/nvim/lua/aleidk/plugins/ai.lua deleted file mode 100644 index 9969c9c..0000000 --- a/chezmoi/dot_config/nvim/lua/aleidk/plugins/ai.lua +++ /dev/null @@ -1,78 +0,0 @@ -return { - "olimorris/codecompanion.nvim", - dependencies = { - "nvim-lua/plenary.nvim", - "nvim-treesitter/nvim-treesitter", - { - "zbirenbaum/copilot.lua", - cmd = "Copilot", - event = "InsertEnter", - config = function() - require("copilot").setup({ - suggestion = { enabled = false }, - panel = { enabled = true, auto_refresh = true }, - }) - end, - }, - "hrsh7th/nvim-cmp", -- Optional: For using slash commands and variables in the chat buffer - "nvim-telescope/telescope.nvim", -- Optional: For using slash commands - { "stevearc/dressing.nvim", opts = {} }, -- Optional: Improves `vim.ui.select` - }, - opts = { - strategies = { - chat = { - adapter = "copilot", - }, - inline = { - adapter = "copilot", - }, - agent = { adapter = "copilot" }, - }, - display = { - action_palette = { - prompt = " " - } - } - }, - keys = { - { - "at", - function() - require("codecompanion").toggle() - end, - desc = "Toggle AI chat", - mode = { "n", "v" } - }, - { - "aa", - "CodeCompanion", - desc = "Run an inline prompt", - mode = { "n", "v" } - }, - { - "aA", - function() - require("codecompanion").actions() - end, - desc = "Open AI actions", - mode = { "n", "v" } - }, - { - "av", - function() - require("codecompanion").add() - end, - desc = "Add visual selection to chat", - mode = "v" - }, - { - "ae", - function() - require("codecompanion").prompt("explain") - end, - desc = "Explain code", - mode = "v" - }, - } -} - diff --git a/chezmoi/dot_config/nvim/lua/aleidk/plugins/comments.lua b/chezmoi/dot_config/nvim/lua/aleidk/plugins/comments.lua deleted file mode 100644 index e9e3be9..0000000 --- a/chezmoi/dot_config/nvim/lua/aleidk/plugins/comments.lua +++ /dev/null @@ -1,49 +0,0 @@ -return { - { - "echasnovski/mini.comment", - version = "*", - event = "VeryLazy", - dependencies = { - { "nvim-treesitter/nvim-treesitter-context" }, - }, - opts = { - options = { - custom_commentstring = function() - return require("ts_context_commentstring.internal").calculate_commentstring() - or vim.bo.commentstring - end, - }, - }, - }, - { - "LudoPinelli/comment-box.nvim", - event = "VeryLazy", - config = function() - require("comment-box").setup({ - outer_blank_lines = true, - }) - - local cb = require("comment-box") - - -- left aligned fixed size box with left aligned text - MAP({ "n", "v" }, "gcb", cb.lcbox, "Create a comment box") - -- centered adapted box with centered text - MAP({ "n", "v" }, "gcl", cb.llline, "Create a comment line") - end, - }, - { - "danymat/neogen", - opts = { snippet_engine = "luasnip" }, - dependencies = { "nvim-treesitter/nvim-treesitter" }, - version = "*", -- stable releases - keys = { - { - "gcd", - function() - require("neogen").generate() - end, - desc = "Generate comment docstring", - }, - }, - }, -} diff --git a/chezmoi/dot_config/nvim/lua/aleidk/plugins/completion.lua b/chezmoi/dot_config/nvim/lua/aleidk/plugins/completion.lua deleted file mode 100644 index a267bfd..0000000 --- a/chezmoi/dot_config/nvim/lua/aleidk/plugins/completion.lua +++ /dev/null @@ -1,120 +0,0 @@ ----@diagnostic disable: missing-fields -return { - "hrsh7th/nvim-cmp", - version = false, -- last release is way too old - event = "InsertEnter", - dependencies = { - "L3MON4D3/LuaSnip", - "davidsierradz/cmp-conventionalcommits", - "hrsh7th/cmp-buffer", - "hrsh7th/cmp-cmdline", - "hrsh7th/cmp-nvim-lsp", - "hrsh7th/cmp-path", - "petertriho/cmp-git", - "saadparwaiz1/cmp_luasnip", - "windwp/nvim-autopairs", - { - "zbirenbaum/copilot-cmp", - config = function() - require("copilot_cmp").setup() - end - }, - }, - config = function() - vim.api.nvim_set_hl(0, "CmpGhostText", { link = "Comment", default = true }) - local cmp = require("cmp") - - local cmp_autopairs = require("nvim-autopairs.completion.cmp") - cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done()) - - local defaults = require("cmp.config.default")() - local window_opts = { - border = "rounded", - side_padding = 1, - -- fix colors for catppuccin colorscheme - winhighlight = "Normal:Pmenu,FloatBorder:FloatBorder,CursorLine:PmenuSel,Search:None", - } - local opts = { - visible_docs = false, - completion = { - completeopt = "menu,menuone,noinsert", - }, - snippet = { - expand = function(args) - require("luasnip").lsp_expand(args.body) - end, - }, - mapping = cmp.mapping.preset.insert({ - [""] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }), - [""] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }), - [""] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }), - [""] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }), - [""] = cmp.mapping.scroll_docs(-4), - [""] = cmp.mapping.scroll_docs(4), - [""] = function() - if cmp.visible_docs() then - cmp.close_docs() - else - cmp.open_docs() - end - end, - [""] = cmp.mapping.complete(), - [""] = cmp.mapping.abort(), - ["
"] = cmp.mapping.abort(), - [""] = cmp.mapping.confirm({ select = false }), -- Confirm only if selected an item - [""] = cmp.mapping.confirm({ - -- Auto confirms first item - behavior = cmp.ConfirmBehavior.Replace, - select = true, - }), - }), - sources = cmp.config.sources({ - { name = "conventionalcommits" }, - { name = "copilot" }, - { name = "nvim_lsp" }, - { name = "luasnip" }, - { name = "buffer" }, - { name = "path" }, - }), - formatting = { - fields = { "kind", "abbr", "menu" }, - format = function(_, item) - local icons = require("aleidk.constants").icons.kinds - if icons[item.kind] then - item.kind = icons[item.kind] .. item.kind - end - return item - end, - }, - window = { - completion = cmp.config.window.bordered(window_opts), - documentation = cmp.config.window.bordered(window_opts), - }, - experimental = { - ghost_text = { - hl_group = "CmpGhostText", - }, - }, - sorting = { - priority_weight = 2, - comparators = { - require("copilot_cmp.comparators").prioritize, - - -- Below is the default comparitor list and order for nvim-cmp - cmp.config.compare.offset, - -- cmp.config.compare.scopes, --this is commented in nvim-cmp too - cmp.config.compare.exact, - cmp.config.compare.score, - cmp.config.compare.recently_used, - cmp.config.compare.locality, - cmp.config.compare.kind, - cmp.config.compare.sort_text, - cmp.config.compare.length, - cmp.config.compare.order, - }, - }, - } - - cmp.setup(opts) - end, -} diff --git a/chezmoi/dot_config/nvim/lua/aleidk/plugins/dashboard.lua b/chezmoi/dot_config/nvim/lua/aleidk/plugins/dashboard.lua deleted file mode 100644 index db755d4..0000000 --- a/chezmoi/dot_config/nvim/lua/aleidk/plugins/dashboard.lua +++ /dev/null @@ -1,35 +0,0 @@ -return { - "goolord/alpha-nvim", - lazy = false, - opts = function() - local dashboard = require("alpha.themes.dashboard") - - dashboard.section.header.val = { - " ████ ███ █████ █████ ", - " ░░███ ░░░ ░░███ ░░███ ", - " ██████ ░███ ██████ ████ ███████ ░███ █████", - " ░░░░░███ ░███ ███░░███░░███ ███░░███ ░███░░███ ", - " ███████ ░███ ░███████ ░███ ░███ ░███ ░██████░ ", - " ███░░███ ░███ ░███░░░ ░███ ░███ ░███ ░███░░███ ", - "░░████████ █████░░██████ █████░░████████ ████ █████", - " ░░░░░░░░ ░░░░░ ░░░░░░ ░░░░░ ░░░░░░░░ ░░░░ ░░░░░ ", - } - dashboard.section.header.opts.hl = "DashboardHeader" - - dashboard.section.buttons.val = { - dashboard.button("LDR f f", " Find File ", "ff"), - dashboard.button("LDR LDR t", " Bookmars", "t"), - dashboard.button("LDR g g", " Git ", "gg"), - } - - dashboard.section.footer.val = - { " ", " ", " ", "Nvim loaded " .. require("lazy").stats().count .. " plugins " } - dashboard.section.footer.opts.hl = "DashboardFooter" - - dashboard.config.layout[1].val = vim.fn.max({ 2, vim.fn.floor(vim.fn.winheight(0) * 0.2) }) - dashboard.config.layout[3].val = 5 - dashboard.config.opts.noautocmd = true - - return dashboard.opts - end, -} diff --git a/chezmoi/dot_config/nvim/lua/aleidk/plugins/debugprint.lua b/chezmoi/dot_config/nvim/lua/aleidk/plugins/debugprint.lua deleted file mode 100644 index 757dbb1..0000000 --- a/chezmoi/dot_config/nvim/lua/aleidk/plugins/debugprint.lua +++ /dev/null @@ -1,7 +0,0 @@ -return { - "andrewferrier/debugprint.nvim", - opts = {}, - -- Remove the following line to use development versions, - -- not just the formal releases - version = "*", -} diff --git a/chezmoi/dot_config/nvim/lua/aleidk/plugins/dressing.lua b/chezmoi/dot_config/nvim/lua/aleidk/plugins/dressing.lua deleted file mode 100644 index 9d2a5e4..0000000 --- a/chezmoi/dot_config/nvim/lua/aleidk/plugins/dressing.lua +++ /dev/null @@ -1,10 +0,0 @@ -return { - -- better imputs - "stevearc/dressing.nvim", - opts = { - input = { - -- handle by noice - enabled = false, - }, - }, -} diff --git a/chezmoi/dot_config/nvim/lua/aleidk/plugins/file-browser.lua b/chezmoi/dot_config/nvim/lua/aleidk/plugins/file-browser.lua deleted file mode 100644 index f90f761..0000000 --- a/chezmoi/dot_config/nvim/lua/aleidk/plugins/file-browser.lua +++ /dev/null @@ -1,100 +0,0 @@ -return { - { - "nvim-tree/nvim-tree.lua", - enabled = false, - version = "*", - dependencies = { - "nvim-tree/nvim-web-devicons", - }, - keys = { - { "e", "NvimTreeToggle", desc = "Open file explorer" }, - }, - cmd = { "NvimTreeToggle", "Tree" }, - config = function() - local tree = require("nvim-tree") - local api = require("nvim-tree.api") - - tree.setup({ - hijack_unnamed_buffer_when_opening = true, - disable_netrw = false, - hijack_netrw = false, -- handle by telescope browser - hijack_cursor = true, -- cursor at the start of filename - sync_root_with_cwd = true, - respect_buf_cwd = true, - update_focused_file = { - enable = true, -- focus curren file - update_root = true, - }, - actions = { open_file = { quit_on_open = true } }, - renderer = { - full_name = true, -- show remaining name in floating text - group_empty = true, -- group empty folders - add_trailing = true, -- Trailing slash to folders - highlight_opened_files = "all", - highlight_git = true, - }, - view = { - centralize_selection = true, -- center current file on enter - width = 30, -- N° of columns or % - }, - on_attach = function(bufnr) - local function opts(desc) - return { - desc = "nvim-tree: " .. desc, - buffer = bufnr, - noremap = true, - silent = true, - nowait = true, - } - end - - -- Check defaults here: https://github.com/nvim-tree/nvim-tree.lua/wiki/Migrating-To-on_attach - api.config.mappings.default_on_attach(bufnr) - - vim.keymap.set("n", "l", api.node.open.edit, opts("Open")) - vim.keymap.set("n", "o", api.node.open.edit, opts("Open")) - vim.keymap.set("n", "", api.node.open.edit, opts("Open")) - vim.keymap.set("n", "<2-LeftMouse>", api.node.open.edit, opts("Open")) - vim.keymap.set("n", "s", api.node.open.vertical, opts("Open in vsplit")) - vim.keymap.set("n", "v", api.node.open.horizontal, opts("Open in hsplit")) - vim.keymap.set("n", "t", api.node.open.tab, opts("Open in tab")) - vim.keymap.set("n", "h", api.node.navigate.parent_close, opts("Close dir")) - vim.keymap.set("n", "", api.node.navigate.parent_close, opts("Close dir")) - vim.keymap.set("n", "i", api.tree.toggle_hidden_filter, opts("Toggle Dotfiles")) - vim.keymap.set("n", "I", api.tree.toggle_gitignore_filter, opts("Toggle Git Ignore")) - end, - }) - - -- Auto open when a dir is opened - - local function open_nvim_tree(data) - -- buffer is a directory - local directory = vim.fn.isdirectory(data.file) == 1 - - if not directory then - return - end - - -- create a new, empty buffer - vim.cmd.enew() - - -- wipe the directory buffer - vim.cmd.bw(data.buf) - - -- change to the directory - vim.cmd.cd(data.file) - - -- open the tree - require("nvim-tree.api").tree.open() - end - - vim.api.nvim_create_autocmd({ "VimEnter" }, { callback = open_nvim_tree }) - vim.api.nvim_create_user_command("Tree", "NvimTreeToggle", {}) - - -- bindings - -- disabled to discourage the use of this plugin without disabling it - -- vim.keymap.set("n", "e", ":NvimTreeToggle", { desc = "Toggle file tree", silent = true }) - -- vim.keymap.set("n", "", ":NvimTreeToggle", { desc = "Toggle file tree", silent = true }) - end, - }, -} diff --git a/chezmoi/dot_config/nvim/lua/aleidk/plugins/file-explorer.lua b/chezmoi/dot_config/nvim/lua/aleidk/plugins/file-explorer.lua deleted file mode 100644 index 2fe15eb..0000000 --- a/chezmoi/dot_config/nvim/lua/aleidk/plugins/file-explorer.lua +++ /dev/null @@ -1,66 +0,0 @@ -return { - "rolv-apneseth/tfm.nvim", - lazy = false, - opts = { - -- TFM to use - -- Possible choices: "ranger" | "nnn" | "lf" | "vifm" | "yazi" (default) - file_manager = "yazi", - -- Replace netrw entirely - -- Default: false - replace_netrw = true, - -- Enable creation of commands - -- Default: false - -- Commands: - -- Tfm: selected file(s) will be opened in the current window - -- TfmSplit: selected file(s) will be opened in a horizontal split - -- TfmVsplit: selected file(s) will be opened in a vertical split - -- TfmTabedit: selected file(s) will be opened in a new tab page - enable_cmds = true, - -- Custom keybindings only applied within the TFM buffer - -- Default: {} - keybindings = { - [""] = "q", - }, - -- Customise UI. The below options are the default - ui = { - border = "rounded", - height = 1, - width = 1, - x = 0.5, - y = 0.5, - }, - }, - keys = { - { - "e", - function() - require("tfm").open() - end, - desc = "TFM", - }, - { - "mh", - function() - local tfm = require("tfm") - tfm.open(nil, tfm.OPEN_MODE.split) - end, - desc = "TFM - horizontal split", - }, - { - "mv", - function() - local tfm = require("tfm") - tfm.open(nil, tfm.OPEN_MODE.vsplit) - end, - desc = "TFM - vertical split", - }, - { - "mt", - function() - local tfm = require("tfm") - tfm.open(nil, tfm.OPEN_MODE.tabedit) - end, - desc = "TFM - new tab", - }, - }, -} diff --git a/chezmoi/dot_config/nvim/lua/aleidk/plugins/git.lua b/chezmoi/dot_config/nvim/lua/aleidk/plugins/git.lua deleted file mode 100644 index db22509..0000000 --- a/chezmoi/dot_config/nvim/lua/aleidk/plugins/git.lua +++ /dev/null @@ -1,114 +0,0 @@ -return { - { - "lewis6991/gitsigns.nvim", - event = { "BufReadPre", "BufNewFile" }, - opts = { - -- See `:help gitsigns.txt` - signs = { - add = { text = "▎" }, - change = { text = "▎" }, - delete = { text = "" }, - topdelete = { text = "" }, - changedelete = { text = "▎" }, - untracked = { text = "▎" }, - }, - on_attach = function(buffer) - local gs = package.loaded.gitsigns - - local function map(mode, l, r, desc) - vim.keymap.set(mode, "g" .. l, r, { buffer = buffer, desc = desc }) - end - - -- stylua: ignore start - map("n", "j", gs.next_hunk, "Next Hunk") - map("n", "k", gs.prev_hunk, "Prev Hunk") - map({ "n", "v" }, "s", ":Gitsigns stage_hunk", "Stage Hunk") - map({ "n", "v" }, "r", ":Gitsigns reset_hunk", "Reset Hunk") - map("n", "u", gs.undo_stage_hunk, "Undo Stage Hunk") - map("n", "R", gs.reset_buffer, "Reset Buffer") - map("n", "", gs.preview_hunk, "Preview Hunk") - map("n", "l", function() gs.blame_line({full = true}) end, "Blame Line") - map("n", "d", gs.diffthis, "Diff This") - end, - }, - }, - { - "kdheepak/lazygit.nvim", - event = "VeryLazy", - dependencies = { - "nvim-lua/plenary.nvim", - }, - keys = { - { "gG", ":LazyGit", desc = "Lazygit" }, - }, - }, - { - "NeogitOrg/neogit", - dependencies = { - "nvim-lua/plenary.nvim", -- required - "nvim-telescope/telescope.nvim", -- optional - "sindrets/diffview.nvim", -- optional - }, - config = true, - opts = { - disable_line_numbers = false, - console_timeout = 8000, - graph_style = "unicode", - kind = "tab", - ignored_settings = { - "NeogitPushPopup--force", - "NeogitPullPopup--rebase", - "NeogitCommitPopup--allow-empty", - "NeogitCommitPopup--reuse-message", - "NeogitRevertPopup--no-edit", - }, - }, - keys = { - { - "gg", - function() - require("neogit").open() - end, - desc = "Neogit", - }, - { - "gc", - function() - require("neogit").open({ "commit" }) - end, - desc = "Commit", - }, - { - "gp", - function() - require("neogit").open({ "pull" }) - end, - desc = "Pull", - }, - { - "gP", - function() - require("neogit").open({ "push" }) - end, - desc = "Push", - }, - }, - }, - - { - "pwntester/octo.nvim", - dependencies = { - "nvim-lua/plenary.nvim", - "nvim-telescope/telescope.nvim", - "nvim-tree/nvim-web-devicons", - }, - opts = { enable_builtin = true }, - keys = { - { - "go", - "Octo", - desc = "Octo.nvim", - }, - }, - }, -} diff --git a/chezmoi/dot_config/nvim/lua/aleidk/plugins/http.lua b/chezmoi/dot_config/nvim/lua/aleidk/plugins/http.lua deleted file mode 100644 index 7c7516e..0000000 --- a/chezmoi/dot_config/nvim/lua/aleidk/plugins/http.lua +++ /dev/null @@ -1,38 +0,0 @@ -return { - "jellydn/hurl.nvim", - dependencies = { - "MunifTanjim/nui.nvim", - "nvim-lua/plenary.nvim", - "nvim-treesitter/nvim-treesitter" - }, - ft = "hurl", - opts = { - -- Show debugging info - debug = false, - -- Show notification on run - show_notification = false, - -- Show response in popup or split - mode = "popup", - -- Default formatter - formatters = { - json = { 'jq' }, -- Make sure you have install jq in your system, e.g: brew install jq - html = { - 'prettierd', -- Make sure you have install prettier in your system, e.g: npm install -g prettier - '--parser', - 'html', - }, - }, - env_file = { - 'hurl.env', - '.env', - '.env.local', - }, - }, - keys = { - -- Run API request - { "ph", "HurlRunnerAt", desc = "Run HTTP request" }, - { "pH", "HurlRunner", desc = "Run all HTTP requests" }, - -- Run Hurl request in visual mode - { "ph", ":HurlRunner", desc = "Run HTTP requests", mode = "v" }, - }, -} diff --git a/chezmoi/dot_config/nvim/lua/aleidk/plugins/init.lua b/chezmoi/dot_config/nvim/lua/aleidk/plugins/init.lua deleted file mode 100644 index 8dbb557..0000000 --- a/chezmoi/dot_config/nvim/lua/aleidk/plugins/init.lua +++ /dev/null @@ -1,99 +0,0 @@ -return { - -- Detect tabstop and shiftwidth automatically - "tpope/vim-sleuth", - { "nvim-tree/nvim-web-devicons", lazy = true }, - { - "mbbill/undotree", - config = function() - vim.g.undotree_WindowLayout = 2 - vim.g.undotree_ShortIndicators = 1 - vim.g.undotree_SetFocusWhenToggle = 1 - end, - keys = { - { "fu", vim.cmd.UndotreeToggle, desc = "Undo tree" }, - }, - }, - { - -- Highlight word under cursor - "RRethy/vim-illuminate", - event = { "BufReadPost", "BufNewFile" }, - opts = { delay = 200 }, - config = function(_, opts) - require("illuminate").configure(opts) - end, - }, - { - -- Color Picker - "uga-rosa/ccc.nvim", - event = "VeryLazy", - opts = { - auto_enable = true, - lsp = true, - }, - keys = { - { "uc", "CccPick", desc = "Open Color picker" }, - { "uC", "CccHighlighterToggle", desc = "Toggle Color highlight" }, - }, - }, - -- Dotfiles management - { - "xvzc/chezmoi.nvim", - dependencies = { "nvim-lua/plenary.nvim", "alker0/chezmoi.vim" }, - config = function() - require("chezmoi").setup({ - { - edit = { - watch = false, - force = false, - }, - notification = { - on_open = true, - on_apply = true, - on_watch = false, - }, - telescope = { - select = { "" }, - }, - }, - }) - - vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, { - -- INFO: this should be the same as $(chezmoi source-path) - pattern = { os.getenv("HOME") .. "/.local/share/chezmoi/chezmoi/*" }, - callback = function() - vim.schedule(require("chezmoi.commands.__edit").watch) - end, - }) - local telescope = require("telescope") - - telescope.load_extension("chezmoi") - vim.keymap.set("n", "fz", telescope.extensions.chezmoi.find_files, { desc = "Find dotfile" }) - end, - }, - { - "pmizio/typescript-tools.nvim", - dependencies = { "nvim-lua/plenary.nvim", "neovim/nvim-lspconfig" }, - opts = { - init_options = { - preferences = { - disableSuggestions = true, - }, - }, - settings = { - -- array of strings("fix_all"|"add_missing_imports"|"remove_unused"| - -- "remove_unused_imports"|"organize_imports") -- or string "all" - -- to include all supported code actions - -- specify commands exposed as code_actions - expose_as_code_action = "all", - }, - }, - }, - - { - "olexsmir/gopher.nvim", - ft = "go", - build = function() - vim.cmd([[silent! GoInstallDeps]]) - end, - }, -} diff --git a/chezmoi/dot_config/nvim/lua/aleidk/plugins/lsp.lua b/chezmoi/dot_config/nvim/lua/aleidk/plugins/lsp.lua deleted file mode 100644 index 8512c8d..0000000 --- a/chezmoi/dot_config/nvim/lua/aleidk/plugins/lsp.lua +++ /dev/null @@ -1,215 +0,0 @@ -return { - -- LSP Configuration & Plugins - "neovim/nvim-lspconfig", - event = { "BufReadPost", "BufNewFile", "BufWritePre" }, - dependencies = { - -- Automatically install LSPs to stdpath for neovim - { "williamboman/mason.nvim" }, - "williamboman/mason-lspconfig.nvim", - -- Additional lua configuration, makes nvim stuff amazing! - { "folke/neodev.nvim", opts = {} }, - }, - - config = function() - -- LSP settings. - local on_attach = function(_, bufnr) - local nmap = function(keys, func, desc) - if desc then - desc = "LSP: " .. desc - end - - vim.keymap.set("n", keys, func, { buffer = bufnr, desc = desc }) - end - - nmap("lr", vim.lsp.buf.rename, "Rename") - -- stylua: ignore - vim.keymap.set({ "n", "x", "v" }, "la", vim.lsp.buf.code_action, { buffer = bufnr, desc = "Code Action" }) - nmap("ld", vim.lsp.buf.type_definition, "Go to type definition") - nmap("lf", function() - vim.lsp.buf.format() - end, "Format") - - nmap("gd", vim.lsp.buf.definition, "Go to definition") - nmap("gr", require("telescope.builtin").lsp_references, "Goto References") - nmap("gI", vim.lsp.buf.implementation, "Go to Implementation") - - -- See `:help K` for why this keymap - nmap("K", vim.lsp.buf.hover, "Hover Documentation") - -- nmap("", vim.lsp.buf.signature_help, "Signature Documentation") - - -- Lesser used LSP functionality - nmap("gD", vim.lsp.buf.declaration, "Goto Declaration") - - nmap("lj", vim.diagnostic.goto_next, "Go to next diagnostic") - nmap("lk", vim.diagnostic.goto_prev, "Go to prev diagnostic") - nmap("lK", function() - -- execute twice to enter the float inmediatly - vim.diagnostic.open_float() - vim.diagnostic.open_float() - end, "Hover current diagnostic") - - -- Create a command `:Format` local to the LSP buffer - vim.api.nvim_buf_create_user_command(bufnr, "Format", function(_) - vim.lsp.buf.format() - end, { desc = "Format current buffer with LSP" }) - end - - -- Enable the following language servers - -- To see options and cofigurations: https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md - local servers = { - astro = {}, - bashls = {}, - cssls = {}, - dockerls = {}, - emmet_ls = { - filetypes = { - "astro", - "css", - "eruby", - "html", - "htmldjango", - "javascriptreact", - "less", - "pug", - "sass", - "scss", - "svelte", - "typescriptreact", - "vue", - "htmlangular", - "php", - "blade" - }, - }, - html = {}, - ["nil_ls"] = {}, - marksman = {}, - pyright = {}, - phpactor = {}, - gopls = { - settings = { - gopls = { - completeUnimported = true, - usePlaceholders = true, - analyses = { - unusedparams = true, - }, - }, - }, - }, - ruff = {}, - rust_analyzer = { - settings = { - ["rust-analyzer"] = { - imports = { - granularity = { - group = "module", - }, - prefix = "self", - }, - cargo = { - buildScripts = { - enable = true, - }, - }, - procMacro = { - enable = true, - }, - }, - }, - }, - sqlls = {}, - yamlls = {}, - tsserver = { - init_options = { - preferences = { - disableSuggestions = true, - }, - }, - }, - lua_ls = { - settings = { - Lua = { - runtime = { - -- Tell the language server which version of Lua you're using - -- (most likely LuaJIT in the case of Neovim) - version = "LuaJIT", - }, - -- Make the server aware of Neovim runtime files - workspace = { - checkThirdParty = false, - library = { - vim.env.VIMRUNTIME, - -- "${3rd}/luv/library" - -- "${3rd}/busted/library", - }, - }, - }, - }, - }, - } - - -- nvim-cmp supports additional completion capabilities, so broadcast that to servers - local capabilities = vim.lsp.protocol.make_client_capabilities() - capabilities = require("cmp_nvim_lsp").default_capabilities(capabilities) - - -- Ensure the servers above are installed - local mason_lspconfig = require("mason-lspconfig") - - mason_lspconfig.setup({ - ensure_installed = vim.tbl_keys(servers), - automatic_installation = { exclude = { "astro", "phpactor", "gopls", "rust_analyzer", "sqlls" } }, - }) - - mason_lspconfig.setup_handlers({ - function(server_name) - local _border = "single" - - local default_config = { - capabilities = capabilities, - on_attach = on_attach, - handlers = { - ["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { - border = _border, - }), - ["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { - border = _border, - }), - }, - } - - require("lspconfig")[server_name].setup( - vim.tbl_deep_extend("force", default_config, servers[server_name] or {}) - ) - end, - }) - - vim.diagnostic.config({ - update_in_insert = false, - underline = true, - float = { - source = true - }, - virtual_text = { - severity = vim.diagnostic.severity.ERROR, - source = true, - spacing = -1, - prefix = nil, - format = function(diagnostic) - -- show small error code instead of whole error that probably won't fit in the screen - -- to see the whole error use other keybindings - return tostring(diagnostic.code) - end, - virt_text_hide = true - }, - severity_sort = true, - }) - - -- Customize gutter icons - local signs = require("aleidk.constants").icons.diagnostics - for type, icon in pairs(signs) do - local hl = "DiagnosticSign" .. type - vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl }) - end - end, -} diff --git a/chezmoi/dot_config/nvim/lua/aleidk/plugins/markdown.lua b/chezmoi/dot_config/nvim/lua/aleidk/plugins/markdown.lua deleted file mode 100644 index 8a53320..0000000 --- a/chezmoi/dot_config/nvim/lua/aleidk/plugins/markdown.lua +++ /dev/null @@ -1,44 +0,0 @@ -return { - { - "MeanderingProgrammer/markdown.nvim", - name = "render-markdown", -- Only needed if you have another plugin named markdown.nvim - -- dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.nvim' }, -- if you use the mini.nvim suite - -- dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.icons' }, -- if you use standalone mini plugins - dependencies = { "nvim-treesitter/nvim-treesitter", "nvim-tree/nvim-web-devicons" }, -- if you prefer nvim-web-devicons - opts = { - file_types = { 'markdown', 'codecompanion' }, - sign = { - enabled = false, - }, - }, - }, - { - "zk-org/zk-nvim", - config = function() - require("zk").setup({ - picker = "select", - }) - - function MAP(mode, l, r, desc) - vim.keymap.set(mode, l, r, { desc = desc, silent = true }) - end - - MAP("n", "", "lua vim.lsp.buf.definition()", "Open the link under cursor") - - MAP("n", "zn", "ZkNew { dir = vim.fn.expand('%:p:h'), title = vim.fn.input('Title: ') }", - "Create new note") - MAP("v", "zN", - ":'<,'>ZkNewFromContentSelection { dir = vim.fn.expand('%:p:h'), title = vim.fn.input('Title: ') }", - "Create new note using selection as content") - - MAP("n", "zl", "ZkInsertLink", "Insert Link into cursor position") - MAP("v", "zl", ":'<,'>ZkInsertLinkAtSelection", "Insert Link into selection") - - MAP("n", "zb", "ZkBacklinks", "Backlinks") - MAP("n", "zo", "ZkLinks", "Outlinks") - - MAP("n", "zf", "ZkNotes", "Find note") - MAP("n", "zt", "ZkTags", "Find tags") - end - } -} diff --git a/chezmoi/dot_config/nvim/lua/aleidk/plugins/mason.lua b/chezmoi/dot_config/nvim/lua/aleidk/plugins/mason.lua deleted file mode 100644 index cee4bfd..0000000 --- a/chezmoi/dot_config/nvim/lua/aleidk/plugins/mason.lua +++ /dev/null @@ -1,18 +0,0 @@ -return { - "williamboman/mason.nvim", - cmd = "Mason", - keys = { { "um", "Mason", desc = "Mason" } }, - build = ":MasonUpdate", - opts = { - ensure_installed = { - "blue", - "ruff", - "eslint_d", - "markdownlint", - "nimlsp", - "prettierd", - "shellcheck", - "stylua", - }, - }, -} diff --git a/chezmoi/dot_config/nvim/lua/aleidk/plugins/noice.lua b/chezmoi/dot_config/nvim/lua/aleidk/plugins/noice.lua deleted file mode 100644 index 0ab9d7c..0000000 --- a/chezmoi/dot_config/nvim/lua/aleidk/plugins/noice.lua +++ /dev/null @@ -1,123 +0,0 @@ -return { - "folke/noice.nvim", - event = "VeryLazy", - dependencies = { - -- if you lazy-load any plugin below, make sure to add proper `module="..."` entries - "MunifTanjim/nui.nvim", - }, - opts = { - presets = { - bottom_search = true, - -- command_palette = true, - long_message_to_split = true, - inc_rename = true, - }, - lsp = { - override = { - ["vim.lsp.util.convert_input_to_markdown_lines"] = true, - ["vim.lsp.util.stylize_markdown"] = true, - ["cmp.entry.get_documentation"] = true, - }, - }, - routes = { - { - filter = { - event = "msg_show", - any = { - { find = "%d+L, %d+B" }, - { find = "; after #%d+" }, - { find = "; before #%d+" }, - }, - }, - view = "mini", - }, - { - filter = { - event = "msg_show", - kind = "search_count", - }, - opts = { skip = true }, - }, - }, - views = { - cmdline_popup = { - position = { - row = 5, - col = "50%", - }, - size = { - width = 60, - height = "auto", - }, - }, - popupmenu = { - relative = "editor", - position = { - row = 8, - col = "50%", - }, - size = { - width = 60, - height = 10, - }, - border = { - style = "rounded", - padding = { 0, 1 }, - }, - win_options = { - winhighlight = { Normal = "Normal", FloatBorder = "DiagnosticInfo" }, - }, - }, - notify = { - enabled = false, - }, - messages = { - enabled = false, - }, - }, - }, - -- stylua: ignore - keys = { - { - "", - function() require("noice").redirect(vim.fn.getcmdline()) end, - mode = "c", - desc = - "Redirect Cmdline" - }, - { - "unl", - function() require("noice").cmd("last") end, - desc = - "Noice Last Message" - }, - { - "unh", - function() require("noice").cmd("history") end, - desc = - "Noice History" - }, - { "una", function() require("noice").cmd("all") end, desc = "Noice All" }, - { "und", function() require("noice").cmd("dismiss") end, desc = "Dismiss All" }, - { - "", - function() if not require("noice.lsp").scroll(4) then return "" end end, - silent = true, - expr = true, - desc = - "Scroll forward", - mode = { - "i", "n", "s" } - }, - { - "", - function() if not require("noice.lsp").scroll(-4) then return "" end end, - silent = true, - expr = true, - desc = - "Scroll backward", - mode = { - "i", "n", "s" } - }, - }, -} diff --git a/chezmoi/dot_config/nvim/lua/aleidk/plugins/pretty-fold.lua b/chezmoi/dot_config/nvim/lua/aleidk/plugins/pretty-fold.lua deleted file mode 100644 index 665525c..0000000 --- a/chezmoi/dot_config/nvim/lua/aleidk/plugins/pretty-fold.lua +++ /dev/null @@ -1,43 +0,0 @@ -return { - enabled = false, - "anuvyklack/pretty-fold.nvim", - opts = { - sections = { - left = { - "+", - function() - return string.rep("-", vim.v.foldlevel) - end, - " ", - "content", - " ", - "number_of_folded_lines", - " ", - function() - return string.rep("-", vim.v.foldlevel) - end, - "+", - }, - }, - fill_char = " ", - - -- Possible values: - -- "delete" : Delete all comment signs from the fold string. - -- "spaces" : Replace all comment signs with equal number of spaces. - -- false : Do nothing with comment signs. - process_comment_signs = "delete", - - -- List of patterns that will be removed from content foldtext section. - stop_words = { - "@brief%s*", -- (for C++) Remove '@brief' and all spaces after. - }, - - matchup_patterns = { - { "{", "}" }, - { "%(", ")" }, -- % to escape lua pattern char - { "%[", "]" }, -- % to escape lua pattern char - }, - - ft_ignore = { "neorg" }, - }, -} diff --git a/chezmoi/dot_config/nvim/lua/aleidk/plugins/quickfix.lua b/chezmoi/dot_config/nvim/lua/aleidk/plugins/quickfix.lua deleted file mode 100644 index 7ce267a..0000000 --- a/chezmoi/dot_config/nvim/lua/aleidk/plugins/quickfix.lua +++ /dev/null @@ -1,89 +0,0 @@ -return { - { - "kevinhwang91/nvim-bqf", - event = "VeryLazy", - dependencies = {}, - config = function() - local fn = vim.fn - - function _G.qftf(info) - local items - local ret = {} - -- The name of item in list is based on the directory of quickfix window. - -- Change the directory for quickfix window make the name of item shorter. - -- It's a good opportunity to change current directory in quickfixtextfunc :) - -- - -- local alterBufnr = fn.bufname('#') -- alternative buffer is the buffer before enter qf window - -- local root = getRootByAlterBufnr(alterBufnr) - -- vim.cmd(('noa lcd %s'):format(fn.fnameescape(root))) - -- - if info.quickfix == 1 then - items = fn.getqflist({ id = info.id, items = 0 }).items - else - items = fn.getloclist(info.winid, { id = info.id, items = 0 }).items - end - local limit = 31 - local fnameFmt1, fnameFmt2 = "%-" .. limit .. "s", "…%." .. (limit - 1) .. "s" - local validFmt = "%s │%5d:%-3d│%s %s" - for i = info.start_idx, info.end_idx do - local e = items[i] - local fname = "" - local str - if e.valid == 1 then - if e.bufnr > 0 then - fname = fn.bufname(e.bufnr) - if fname == "" then - fname = "[No Name]" - else - fname = fname:gsub("^" .. vim.env.HOME, "~") - end - -- char in fname may occur more than 1 width, ignore this issue in order to keep performance - if #fname <= limit then - fname = fnameFmt1:format(fname) - else - fname = fnameFmt2:format(fname:sub(1 - limit)) - end - end - local lnum = e.lnum > 99999 and -1 or e.lnum - local col = e.col > 999 and -1 or e.col - local qtype = e.type == "" and "" or " " .. e.type:sub(1, 1):upper() - str = validFmt:format(fname, lnum, col, qtype, e.text) - else - str = e.text - end - table.insert(ret, str) - end - return ret - end - - vim.o.qftf = "{info -> v:lua._G.qftf(info)}" - - -- Adapt fzf's delimiter in nvim-bqf - require("bqf").setup({ - filter = { - fzf = { - extra_opts = { "--bind", "ctrl-o:toggle-all", "--delimiter", "│" }, - }, - }, - }) - - local toggle_qf = function() - local qf_open = false - for _, win in pairs(vim.fn.getwininfo()) do - if win["quickfix"] == 1 then - qf_open = true - end - end - if qf_open == true then - vim.cmd("cclose") - return - end - if not vim.tbl_isempty(vim.fn.getqflist()) then - vim.cmd("copen") - end - end - - MAP("n", "fQ", toggle_qf, "Toggle quickfix") - end, - }, -} diff --git a/chezmoi/dot_config/nvim/lua/aleidk/plugins/sessions.lua b/chezmoi/dot_config/nvim/lua/aleidk/plugins/sessions.lua deleted file mode 100644 index d6e19a8..0000000 --- a/chezmoi/dot_config/nvim/lua/aleidk/plugins/sessions.lua +++ /dev/null @@ -1,23 +0,0 @@ -return { - -- sessions - "rmagatti/auto-session", - config = function() - ---@diagnostic disable-next-line: missing-fields - require("auto-session").setup({ - log_level = "error", - auto_session_suppress_dirs = { - "/", - "~/", - "~/.config/**", - "~/.local/share/chezmoi/", - "~/.local/share/db_ui", - "~/.local/share/db_ui/**", - "~/Downloads", - }, - bypass_session_save_file_types = { - "NeogitStatus", - "Lazy", - }, - }) - end, -} diff --git a/chezmoi/dot_config/nvim/lua/aleidk/plugins/trouble.lua b/chezmoi/dot_config/nvim/lua/aleidk/plugins/trouble.lua deleted file mode 100644 index 86b58a9..0000000 --- a/chezmoi/dot_config/nvim/lua/aleidk/plugins/trouble.lua +++ /dev/null @@ -1,24 +0,0 @@ -return { - "folke/trouble.nvim", - dependencies = { "nvim-tree/nvim-web-devicons" }, - cmd = { "TroubleToggle", "Trouble" }, - keys = { - { "fq", "TroubleToggle", desc = "Toggle trouble" }, - { "fd", "TroubleToggle workspace_diagnostics", desc = "Find diagnostics" }, - { - "fD", - "TroubleToggle document_diagnostics", - desc = "Find diagnostics in workspace", - }, - }, - config = function() - require("trouble").setup({ - mode = "document_diagnostics", - action_keys = { - open_split = "s", - open_vsplit = "v", - open_tab = "t", - }, - }) - end, -} diff --git a/chezmoi/dot_config/nvim/lua/aleidk/plugins/zen.lua b/chezmoi/dot_config/nvim/lua/aleidk/plugins/zen.lua deleted file mode 100644 index 14374e5..0000000 --- a/chezmoi/dot_config/nvim/lua/aleidk/plugins/zen.lua +++ /dev/null @@ -1,81 +0,0 @@ -return { - "folke/zen-mode.nvim", - dependencies = { - { - "folke/twilight.nvim", - opts = { - -- your configuration comes here - -- or leave it empty to use the default settings - -- refer to the configuration section below - }, - }, - }, - keys = { - { - "uz", - function() - require("zen-mode").toggle({}) - end, - desc = "Toggle zen mode", - }, - }, - opts = { - window = { - backdrop = 0.95, -- shade the backdrop of the Zen window. Set to 1 to keep the same as Normal - -- height and width can be: - -- * an absolute number of cells when > 1 - -- * a percentage of the width / height of the editor when <= 1 - -- * a function that returns the width or the height - width = 0.8, -- width of the Zen window - height = 1, -- height of the Zen window - -- by default, no options are changed for the Zen window - -- uncomment any of the options below, or add other vim.wo options you want to apply - options = { - -- signcolumn = "no", -- disable signcolumn - -- number = false, -- disable number column - -- relativenumber = false, -- disable relative numbers - cursorline = false, -- disable cursorline - -- cursorcolumn = false, -- disable cursor column - -- foldcolumn = "0", -- disable fold column - list = false, -- disable whitespace characters - }, - }, - plugins = { - -- disable some global vim options (vim.o...) - -- comment the lines to not apply the options - options = { - enabled = true, - ruler = true, -- disables the ruler text in the cmd line area - showcmd = false, -- disables the command in the last line of the screen - -- you may turn on/off statusline in zen mode by setting 'laststatus' - -- statusline will be shown only if 'laststatus' == 3 - laststatus = 0, -- turn off the statusline in zen mode - }, - twilight = { enabled = true }, -- enable to start Twilight when zen mode opens - gitsigns = { enabled = false }, -- disables git signs - tmux = { enabled = true }, -- disables the tmux statusline - -- this will change the font size on kitty when in zen mode - -- to make this work, you need to set the following kitty options: - -- - allow_remote_control socket-only - -- - listen_on unix:/tmp/kitty - kitty = { - enabled = true, - font = "+8", -- font size increment - }, - -- this will change the font size on alacritty when in zen mode - -- requires Alacritty Version 0.10.0 or higher - -- uses `alacritty msg` subcommand to change font size - alacritty = { - enabled = true, - font = "14", -- font size - }, - -- this will change the font size on wezterm when in zen mode - -- See else also the Plugins/Wezterm section in this projects README - wezterm = { - enabled = true, - -- can be either an absolute font size or the number of incremental steps - font = "+4", -- (10% increase per step) - }, - }, - }, -} diff --git a/chezmoi/dot_config/nvim/original_lazy-lock.json b/chezmoi/dot_config/nvim/original_lazy-lock.json deleted file mode 100644 index 11840da..0000000 --- a/chezmoi/dot_config/nvim/original_lazy-lock.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "LuaSnip": { "branch": "master", "commit": "ce0a05ab4e2839e1c48d072c5236cce846a387bc" }, - "alpha-nvim": { "branch": "main", "commit": "41283fb402713fc8b327e60907f74e46166f4cfd" }, - "auto-session": { "branch": "main", "commit": "4b0728715e674ad9c18f1519127dcaed59f9981b" }, - "ccc.nvim": { "branch": "main", "commit": "4fb5abaef2f2e0540fe22d4d74a9841205fff9e4" }, - "chezmoi.nvim": { "branch": "main", "commit": "faf61465718424696269b2647077331b3e4605f1" }, - "chezmoi.vim": { "branch": "main", "commit": "10f2692791b5e512a2c1bb4dc560b42ca5bf71fd" }, - "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, - "cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, - "cmp-conventionalcommits": { "branch": "master", "commit": "a4dfacf0601130b7f8afa7c948d735c27802fb7f" }, - "cmp-git": { "branch": "main", "commit": "22116bdffbe68bfc6ca05d52e9f217587cbfea8b" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, - "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, - "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, - "codecompanion.nvim": { "branch": "main", "commit": "ade8d29c94f6ad3c5b4ccf38517cec13126a6f0d" }, - "comment-box.nvim": { "branch": "main", "commit": "06bb771690bc9df0763d14769b779062d8f12bc5" }, - "conform.nvim": { "branch": "master", "commit": "0ebe875d9c306f5fc829db38492ffff2a70d8e9d" }, - "copilot-cmp": { "branch": "master", "commit": "b6e5286b3d74b04256d0a7e3bd2908eabec34b44" }, - "copilot-lualine": { "branch": "main", "commit": "f40450c3e138766026327e7807877ea860618258" }, - "copilot.lua": { "branch": "master", "commit": "f8d8d872bb319f640d5177dad5fbf01f7a16d7d0" }, - "debugprint.nvim": { "branch": "main", "commit": "8f2a335fb0e6ebf0291a3551e0198363437e3a38" }, - "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, - "dressing.nvim": { "branch": "master", "commit": "6741f1062d3dc6e4755367a7e9b347b553623f04" }, - "flash.nvim": { "branch": "main", "commit": "d0799ae43a581d9f190e182e2a1f389d2887c42a" }, - "friendly-snippets": { "branch": "main", "commit": "45a1b96e46efe5fce8af325d4bed45feb9d29d0f" }, - "gitsigns.nvim": { "branch": "main", "commit": "e9c4187c3774a46df2d086a66cf3a7e6bea4c432" }, - "gopher.nvim": { "branch": "main", "commit": "f55c15ada8e02398000c04a96ef44d986cd01051" }, - "grapple.nvim": { "branch": "main", "commit": "7aedc261b05a6c030397c4bc26416efbe746ebf1" }, - "hurl.nvim": { "branch": "main", "commit": "d708158dda9a175c0f83cd106ea232301f4317cb" }, - "indent-blankline.nvim": { "branch": "master", "commit": "65e20ab94a26d0e14acac5049b8641336819dfc7" }, - "lazy.nvim": { "branch": "main", "commit": "b02c9eae6a250f98908c146d1dc1a891f5019f0a" }, - "lazygit.nvim": { "branch": "main", "commit": "dc56df433bfbf107fee0139e187eb9750878fa84" }, - "lualine.nvim": { "branch": "master", "commit": "6a40b530539d2209f7dc0492f3681c8c126647ad" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "37a336b653f8594df75c827ed589f1c91d91ff6c" }, - "mason.nvim": { "branch": "main", "commit": "f96a31855fa8aea55599cea412fe611b85a874ed" }, - "mini.clue": { "branch": "main", "commit": "08f792869781b4bfdfcaa55eb905b9635c0a243f" }, - "mini.comment": { "branch": "main", "commit": "c8406379987c321ecdef9f53e1ca741a55002104" }, - "mini.surround": { "branch": "main", "commit": "3cb5b509ad34f2402df4b977be607a614c8c7524" }, - "neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" }, - "neogen": { "branch": "main", "commit": "0daffcec249bf42275e322361fe55b89a05ff278" }, - "neogit": { "branch": "master", "commit": "a20031fb5d7d12148764764059243135085e5c9b" }, - "noice.nvim": { "branch": "main", "commit": "6263b6696811f0b11c88d8d2371134b1cc1762fc" }, - "nui.nvim": { "branch": "main", "commit": "61574ce6e60c815b0a0c4b5655b8486ba58089a1" }, - "nvim": { "branch": "main", "commit": "7946d1a195c66fed38b3e34f9fa8e0c5a2da0700" }, - "nvim-autopairs": { "branch": "master", "commit": "78a4507bb9ffc9b00f11ae0ac48243d00cb9194d" }, - "nvim-bqf": { "branch": "main", "commit": "1b24dc6050c34e8cd377b6b4cd6abe40509e0187" }, - "nvim-cmp": { "branch": "main", "commit": "a110e12d0b58eefcf5b771f533fc2cf3050680ac" }, - "nvim-lint": { "branch": "master", "commit": "efc6fc83f0772283e064c53a8f9fb5645bde0bc0" }, - "nvim-lspconfig": { "branch": "master", "commit": "216deb2d1b5fbf24398919228208649bbf5cbadf" }, - "nvim-treesitter": { "branch": "master", "commit": "7f4ac678770175cdf0d42c015f4a5b6e18b6cb33" }, - "nvim-treesitter-context": { "branch": "master", "commit": "f56a1430f21334868a86eb980b12e0af55690e98" }, - "nvim-treesitter-textobjects": { "branch": "master", "commit": "34867c69838078df7d6919b130c0541c0b400c47" }, - "nvim-ts-autotag": { "branch": "main", "commit": "323a3e16ed603e2e17b26b1c836d1e86c279f726" }, - "nvim-ts-context-commentstring": { "branch": "main", "commit": "6b5f95aa4d24f2c629a74f2c935c702b08dbde62" }, - "nvim-web-devicons": { "branch": "master", "commit": "c0cfc1738361b5da1cd0a962dd6f774cc444f856" }, - "octo.nvim": { "branch": "master", "commit": "aa5dfa573220a0a511a25ee14ce1570b6c23e56a" }, - "overseer.nvim": { "branch": "master", "commit": "15b6249eaf71ebbc8bf0ed279e045f2bc1f28007" }, - "plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" }, - "pretty-fold.nvim": { "branch": "master", "commit": "a7d8b424abe0eedf50116c460fbe6dfd5783b1d5" }, - "remote-sshfs.nvim": { "branch": "main", "commit": "8f05563150fbd713027471eed56f391b053ba8b8" }, - "render-markdown": { "branch": "main", "commit": "123048b428eb85618780fcef9ea9f4d68b5d2508" }, - "smart-splits.nvim": { "branch": "master", "commit": "95833675cd92538bf9cded1d2d58d1fc271c5428" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, - "telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, - "tfm.nvim": { "branch": "main", "commit": "fb0de2c96bf303216ac5d91ce9bdb7f430030f8b" }, - "todo-comments.nvim": { "branch": "main", "commit": "d61567557e2ff5c548c74e96b2d9f8d33e5fcb34" }, - "treesj": { "branch": "main", "commit": "6e8bd008bacd5ad001c3953017c1dca20709e915" }, - "trouble.nvim": { "branch": "main", "commit": "03c1fbf518bef683422a3be9643c3da190903488" }, - "ts-node-action": { "branch": "master", "commit": "6d3b60754fd87963d70eadaa2f77873b447eac26" }, - "twilight.nvim": { "branch": "main", "commit": "2b632c169a4b51b1eba5be90fde22a80c51c990e" }, - "typescript-tools.nvim": { "branch": "master", "commit": "5da4d695d66f676eb6ea766b946e86f93baaafe7" }, - "undotree": { "branch": "master", "commit": "56c684a805fe948936cda0d1b19505b84ad7e065" }, - "vim-dadbod": { "branch": "master", "commit": "7888cb7164d69783d3dce4e0283decd26b82538b" }, - "vim-dadbod-completion": { "branch": "master", "commit": "8c9051c1cfc73fcf5bfe9a84db7097e4f7c0180d" }, - "vim-dadbod-ui": { "branch": "master", "commit": "f74a31e8c6c5a9dccc63450a09d5cd64a9294330" }, - "vim-illuminate": { "branch": "master", "commit": "5eeb7951fc630682c322e88a9bbdae5c224ff0aa" }, - "vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" }, - "zen-mode.nvim": { "branch": "main", "commit": "2694c5a2bc4dc26c7a9e74b9e2b812920c90a830" }, - "zk-nvim": { "branch": "main", "commit": "dbf4eeab55b08856c9d6b6722dbff39630bb35eb" } -} diff --git a/chezmoi/dot_config/nvim/symlink_lazy-lock.json.tmpl b/chezmoi/dot_config/nvim/symlink_lazy-lock.json.tmpl deleted file mode 100644 index efac3ee..0000000 --- a/chezmoi/dot_config/nvim/symlink_lazy-lock.json.tmpl +++ /dev/null @@ -1,2 +0,0 @@ -{{ .chezmoi.sourceDir }}/dot_config/nvim/original_lazy-lock.json - diff --git a/chezmoi/dot_config/php-cs-fixer-conf.php b/chezmoi/dot_config/php-cs-fixer-conf.php deleted file mode 100644 index d9bed33..0000000 --- a/chezmoi/dot_config/php-cs-fixer-conf.php +++ /dev/null @@ -1,5 +0,0 @@ -setIndent(" "); diff --git a/chezmoi/dot_config/pycodestyle b/chezmoi/dot_config/pycodestyle deleted file mode 100644 index 62e7381..0000000 --- a/chezmoi/dot_config/pycodestyle +++ /dev/null @@ -1,2 +0,0 @@ -[pycodestyle] -max-line-length = 100 diff --git a/chezmoi/dot_config/river/executable_init b/chezmoi/dot_config/river/executable_init deleted file mode 100644 index 4f28cd0..0000000 --- a/chezmoi/dot_config/river/executable_init +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -# Wrapper for launching the configuration from lua. This will add the river -# directory to the LUA_PATH global variable so the configuration can be -# splitted into multiple files - -config_dir="${XDG_CONFIG_HOME:-$HOME/.config}/river" -export LUA_PATH="$config_dir/?.lua;$config_dir/?/init.lua;$LUA_PATH" - -lua "$config_dir"/init.lua diff --git a/chezmoi/dot_config/river/init.lua b/chezmoi/dot_config/river/init.lua deleted file mode 100644 index cd73a7c..0000000 --- a/chezmoi/dot_config/river/init.lua +++ /dev/null @@ -1,40 +0,0 @@ -local River = require('river') -local Logger = require('logger') - -local logger = Logger:new() -logger:log( - [[ - +---------------------------------------------------------+ - | Initializing River... | - +---------------------------------------------------------+ - ]] -) - -local config = { - -} - -local river = River:new() -print(type(river)) - -river:set_bg("$HOME/Pictures/Minimalist__cron.png") - --- ╭─────────────────────────────────────────────────────────╮ --- │ Keymaps │ --- ╰─────────────────────────────────────────────────────────╯ - -local mods = river.keys.modifiers -river:map { mods.super, "Return", "spawn kitty" } -river:map { mods.super_shift, "q", "exit" } - --- river:exec("rivertile -view-padding 2 -outer-padding 2 -main-ratio 0.5 -main-count 1 &") - -local cmds = { - "waybar", -} - -for _, cmd in ipairs(cmds) do - river:spawn(cmd) -end - -logger:close() diff --git a/chezmoi/dot_config/river/logger.lua b/chezmoi/dot_config/river/logger.lua deleted file mode 100644 index 4f43c93..0000000 --- a/chezmoi/dot_config/river/logger.lua +++ /dev/null @@ -1,49 +0,0 @@ ---- Logger interface ----@class Logger ----@field available_outputs table Available outputs to use in the logger ----@field output file* The open file to write to -local Logger = { - available_outputs = { - stdout = io.stdout - }, - output = io.stdout -} - -Logger.__index = Logger - ---- Create a new logger instance ----@param output? file* io.stdout by default, [see Logger.available_outputs](lua://Logger.available_outputs) for possible values ----@return Logger -function Logger:new(output) - local obj = { - output = output or Logger.available_outputs.stdout - } - - setmetatable(obj, self) - self.__index = self - - self:open() - - return obj -end - -function Logger:open() - self:log("\n\n") - self:log("Opening logger...\n") -end - -function Logger:close() - self:log("Closing logger...") - self:log("\n\n") - self.output:close() -end - ---- Write data to ouput, it passes the arguments directly to file:write(...) ----@param ... string|number the data to write -function Logger:log(...) - self.output:write(...) - self.output:write("\n") - self.output:flush() -end - -return Logger diff --git a/chezmoi/dot_config/river/river.lua b/chezmoi/dot_config/river/river.lua deleted file mode 100644 index 5cbc9e4..0000000 --- a/chezmoi/dot_config/river/river.lua +++ /dev/null @@ -1,80 +0,0 @@ ----@enum Modifiers -local modifiers = { - super = "Super ", - ctrl = "Control ", - shift = "Shift ", - alt = "Alt ", - - super_shift = "Super+Shift ", - super_ctrl = "Super+Control ", - super_ctrl_shift = "Super+Control+Shift ", - - ctrl_shift = "Control+Shift ", - - none = "None ", -} - - ---- Wrapper around the riverctl cmd ----@class River -local River = { - cmds = { - background = "swaybg -i %s" - }, - keys = { - modifiers = modifiers - } -} - -River.__index = River - ---- River class constructor ----@param new? River to override properties ----@return River -function River:new(new) - local obj = new or {} - - setmetatable(obj, self) - self.__index = self - - return obj -end - ---- Exec an arbitrary system command ----@param cmd string the command to execute ----@private ----@return string? -function River:exec(cmd) - os.execute(cmd) -end - ---- Execute the given command with riverctl spawn ----@param cmd string the command to execute -function River:spawn(cmd) - self:exec(string.format([[riverctl spawn "%s"]], cmd)) -end - ---- Set a new wallpaper with the default cmds.background ----@param path string The path to the image -function River:set_bg(path) - self:spawn(string.format(self.cmds.background, path)) -end - ----@class MapArgs ----@field [1] Modifiers The modifier to use ----@field [2] string ----@field [3] string ----@field mode? ("normal"|"locked")[], } - ---- Create a new mapping ---- @param args MapArgs -function River:map(args) - local modes = args.mode or { "normal" } - - for _, mode in ipairs(modes) do - local map = string.format([[riverctl map %s %s %s %s]], mode, args[1], args[2], args[3]) - self:exec(map) - end -end - -return River diff --git a/chezmoi/dot_config/starship.toml b/chezmoi/dot_config/starship.toml deleted file mode 100644 index 8b3da4d..0000000 --- a/chezmoi/dot_config/starship.toml +++ /dev/null @@ -1,149 +0,0 @@ -# Get editor completions based on the config schema -"$schema" = 'https://starship.rs/config-schema.json' - -# Inserts a blank line between shell prompts -add_newline = true - -# Replace the '❯' symbol in the prompt with '➜' -[character] # The name of the module we are configuring is 'character' -success_symbol = '[➜](bold green)' # The 'success_symbol' segment is being set to '➜' with the color 'bold green' - -[aws] -symbol = " " - -[buf] -symbol = " " - -[c] -symbol = " " - -[conda] -symbol = " " - -[dart] -symbol = " " - -[directory] -read_only = " " - -[docker_context] -symbol = " " - -[elixir] -symbol = " " - -[elm] -symbol = " " - -[fossil_branch] -symbol = " " - -[git_branch] -symbol = " " - -[golang] -symbol = " " - -[guix_shell] -symbol = " " - -[haskell] -symbol = " " - -[haxe] -symbol = "⌘ " - -[hg_branch] -symbol = " " - -[hostname] -ssh_symbol = " " - -[java] -symbol = " " - -[julia] -symbol = " " - -[lua] -symbol = " " - -[memory_usage] -symbol = " " - -[meson] -symbol = "喝 " - -[nim] -symbol = " " - -[nix_shell] -symbol = " " - -[nodejs] -symbol = " " - -[os.symbols] -Alpaquita = " " -Alpine = " " -Amazon = " " -Android = " " -Arch = " " -Artix = " " -CentOS = " " -Debian = " " -DragonFly = " " -Emscripten = " " -EndeavourOS = " " -Fedora = " " -FreeBSD = " " -Garuda = "﯑ " -Gentoo = " " -HardenedBSD = "ﲊ " -Illumos = " " -Linux = " " -Mabox = " " -Macos = " " -Manjaro = " " -Mariner = " " -MidnightBSD = " " -Mint = " " -NetBSD = " " -NixOS = " " -OpenBSD = " " -openSUSE = " " -OracleLinux = " " -Pop = " " -Raspbian = " " -Redhat = " " -RedHatEnterprise = " " -Redox = " " -Solus = "ﴱ " -SUSE = " " -Ubuntu = " " -Unknown = " " -Windows = " " - -[package] -symbol = " " - -[pijul_channel] -symbol = "🪺 " - -[python] -symbol = " " - -[rlang] -symbol = "ﳒ " - -[ruby] -symbol = " " - -[rust] -symbol = " " - -[scala] -symbol = " " - -[spack] -symbol = "🅢 " diff --git a/chezmoi/dot_config/swappy/config b/chezmoi/dot_config/swappy/config deleted file mode 100644 index d0fa954..0000000 --- a/chezmoi/dot_config/swappy/config +++ /dev/null @@ -1,10 +0,0 @@ -[Default] -save_dir=$HOME/Pictures -save_filename_format=screenshot-%Y%m%d-%H%M%S.png -show_panel=true -line_size=5 -text_size=20 -text_font=sans-serif -paint_mode=arrow -early_exit=true -fill_shape=false diff --git a/chezmoi/dot_config/sway/config b/chezmoi/dot_config/sway/config deleted file mode 100644 index 8e7d066..0000000 --- a/chezmoi/dot_config/sway/config +++ /dev/null @@ -1,283 +0,0 @@ - -### Variables -# -# Logo key. Use Mod1 for Alt. -set $mod Mod4 - -# Home row direction keys, like vim -set $left h -set $down j -set $up k -set $right l - -# Your preferred terminal emulator -set $term alacritty - -# Your preferred application launcher -# Note: pass the final command to swaymsg so that the resulting window can be opened -# on the original workspace that the command was run on. -set $menu bemenu-run -iw -l 20 -P '>' -p 'Open:' \ ---fn "JetBrainsMono 13" \ ---ab "#24273add" \ ---af "#f4dbd6" \ ---fb "#24273add" \ ---ff "#8bd5ca" \ ---hb "#24273add" \ ---hf "#a6da95" \ ---nb "#24273add" \ ---nf "#f4dbd6" \ ---nf "#f4dbd6" \ ---tb "#24273add" \ ---tf "#c6a0f6dd" \ ---scb "#24273add" \ ---scf "#c6a0f6" - -### Output configuration -# -# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/) -output * bg ~/Pictures/wallpaper.png fill -# -# Example configuration: -# -# output HDMI-A-1 resolution 1920x1080 position 1920,0 -# -# You can get the names of your outputs by running: swaymsg -t get_outputs - -### Idle configuration -# -# Example configuration: -# -exec swayidle -w \ - timeout 300 'systemctl suspend' \ - before-sleep '~/.config/sway/lock.sh' - -# This will lock your screen after 300 seconds of inactivity, then turn off -# your displays after another 300 seconds, and turn your screens back on when -# resumed. It will also lock your screen before your computer goes to sleep. - -### Input configuration -# -# Example configuration: -# -input "type:touchpad" { - dwt enabled - tap enabled - natural_scroll enabled - middle_emulation enabled -} - -input "type:keyboard" { - xkb_layout latam - xkb_options caps:escape -} -# -# You can get the names of your inputs by running: swaymsg -t get_inputs -# Read `man 5 sway-input` for more information about this section. - -### Key bindings -# -# Basics: -# - # Start a terminal - bindsym $mod+Return exec $term - - # Kill focused window - bindsym $mod+Shift+q kill - - # Start your launcher - bindsym $mod+d exec $menu - - # Drag floating windows by holding down $mod and left mouse button. - # Resize them with right mouse button + $mod. - # Despite the name, also works for non-floating windows. - # Change normal to inverse to use left mouse button for resizing and right - # mouse button for dragging. - floating_modifier $mod normal - - # Exit sway (logs you out of your Wayland session) - bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit' - bindsym $mod+Shift+r reload -# -# Moving around: -# - # Move your focus around - bindsym $mod+$left focus left - bindsym $mod+$down focus down - bindsym $mod+$up focus up - bindsym $mod+$right focus right - # Or use $mod+[up|down|left|right] - bindsym $mod+Left focus left - bindsym $mod+Down focus down - bindsym $mod+Up focus up - bindsym $mod+Right focus right - - # Move the focused window with the same, but add Shift - bindsym $mod+Shift+$left move left - bindsym $mod+Shift+$down move down - bindsym $mod+Shift+$up move up - bindsym $mod+Shift+$right move right - # Ditto, with arrow keys - bindsym $mod+Shift+Left move left - bindsym $mod+Shift+Down move down - bindsym $mod+Shift+Up move up - bindsym $mod+Shift+Right move right -# -# Workspaces: -# - # Switch to workspace - bindsym $mod+bar workspace back_and_forth - bindsym $mod+1 workspace number 1 - bindsym $mod+2 workspace number 2 - bindsym $mod+3 workspace number 3 - bindsym $mod+4 workspace number 4 - bindsym $mod+5 workspace number 5 - bindsym $mod+6 workspace number 6 - bindsym $mod+7 workspace number 7 - bindsym $mod+8 workspace number 8 - bindsym $mod+9 workspace number 9 - bindsym $mod+0 workspace number 10 - # Move focused container to workspace - bindsym $mod+Shift+1 move container to workspace number 1 - bindsym $mod+Shift+2 move container to workspace number 2 - bindsym $mod+Shift+3 move container to workspace number 3 - bindsym $mod+Shift+4 move container to workspace number 4 - bindsym $mod+Shift+5 move container to workspace number 5 - bindsym $mod+Shift+6 move container to workspace number 6 - bindsym $mod+Shift+7 move container to workspace number 7 - bindsym $mod+Shift+8 move container to workspace number 8 - bindsym $mod+Shift+9 move container to workspace number 9 - bindsym $mod+Shift+0 move container to workspace number 10 - # Note: workspaces can have any name you want, not just numbers. - # We just use 1-10 as the default. -# -# Layout stuff: -# - - # Switch the current container between different layout styles - bindsym $mod+s layout stacking - bindsym $mod+w layout tabbed - bindsym $mod+v layout toggle split - - # Make the current focus fullscreen - bindsym $mod+f fullscreen - - # Toggle the current focus between tiling and floating mode - bindsym $mod+Shift+space floating toggle - - # Swap focus between the tiling area and the floating area - bindsym $mod+space focus mode_toggle - - # Move focus to the parent container - bindsym $mod+a focus parent -# -# Scratchpad: -# - # Sway has a "scratchpad", which is a bag of holding for windows. - # You can send windows there and get them back later. - - # Move the currently focused window to the scratchpad - bindsym $mod+Shift+minus move scratchpad - - # Show the next scratchpad window or hide the focused scratchpad window. - # If there are multiple scratchpad windows, this command cycles through them. - bindsym $mod+minus scratchpad show - -# -# System: -# - # screenshot current window - bindsym print exec grim -g "$(swaymsg -t get_tree | jq -j '.. | select(.type?) | select(.focused).rect | "\(.x),\(.y) \(.width)x\(.height)"')" - | wl-copy - # screenshot area - bindsym print+shift exec grim -g "$(slurp)" - | wl-copy - # screenshot area and edit it - bindsym print+ctrl exec grim -g "$(slurp)" - | swappy -f - - - bindsym XF86AudioRaiseVolume exec wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 5%+ - bindsym XF86AudioLowerVolume exec wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 5%- - bindsym XF86AudioMute exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle - bindsym XF86AudioMicMute exec wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle - bindsym XF86AudioPlay exec playerctl play-pause - bindsym XF86AudioNext exec playerctl next - bindsym XF86AudioPrev exec playerctl previous - bindsym XF86MonBrightnessUp exec brightnessctl set +5% - bindsym XF86MonBrightnessDown exec brightnessctl set 5%- - - -# -# Resizing containers: -# -mode "resize" { - # left will shrink the containers width - # right will grow the containers width - # up will shrink the containers height - # down will grow the containers height - bindsym $left resize shrink width 10px - bindsym $down resize grow height 10px - bindsym $up resize shrink height 10px - bindsym $right resize grow width 10px - - # Ditto, with arrow keys - bindsym Left resize shrink width 10px - bindsym Down resize grow height 10px - bindsym Up resize shrink height 10px - bindsym Right resize grow width 10px - - # Return to default mode - bindsym Return mode "default" - bindsym Escape mode "default" -} -bindsym $mod+r mode "resize" - -# -# Status Bar: -# -# Read `man 5 sway-bar` for more information about this section. -bar { - position top - - swaybar_command waybar - - colors { - statusline #ffffff - background #323232 - inactive_workspace #32323200 #32323200 #5c5c5c - } -} - -# Start Stuff - -# create a master stack layout -exec_always autotiling -l 2 -exec dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK -exec mako - -# Auto rotate screen -# 1 option uses accelerometer (requires iio-sensors-proxy) -# 2 option uses tablet events - -# exec monitor-sensor | bash $DOTS/config/sway/autorotate &> /tmp/autorotate.log -bindswitch tablet:toggle output "eDP-1" transform 180 clockwise ; input "type:touch" map_to_output "eDP-1" ; input "type:tablet_tool" map_to_output "eDP-1" -# bindswitch tablet:on busctl call --user sm.puri.OSK0 /sm/puri/OSK0 sm.puri.OSK0 SetVisible b true -# bindswitch tablet:off busctl call --user sm.puri.OSK0 /sm/puri/OSK0 sm.puri.OSK0 SetVisible b false - -bindgesture swipe:left workspace prev -bindgesture swipe:right workspace next -bindgesture swipe:up scratchpad show - -gaps inner 10 -gaps outer 2 -default_border pixel 2 -smart_borders on -default_floating_border pixel 2 - -xwayland enable - -include ./themes/catppuccin/themes/catppuccin-macchiato - -# target title bg text indicator border -client.focused $teal $base $text $teal $teal -client.focused_inactive $base $base $text $base $base -client.unfocused $base $base $text $base $base -client.urgent $peach $base $peach $peach $peach -client.placeholder $overlay0 $base $text $overlay0 $overlay0 -client.background $base diff --git a/chezmoi/dot_config/sway/executable_autorotate b/chezmoi/dot_config/sway/executable_autorotate deleted file mode 100644 index b734d9c..0000000 --- a/chezmoi/dot_config/sway/executable_autorotate +++ /dev/null @@ -1,61 +0,0 @@ - -#!/bin/bash - -# This script handles rotation of the screen and related input devices automatically -# using the output of the monitor-sensor command (part of the iio-sensor-proxy package) -# for sway. -# The target screen and input device names should be configured in the below variables. -# Note: input devices using the libinput driver (e.g. touchscreens) should be included -# in the WAYLANDINPUT array. -# -# You can get a list of input devices with the `swaymsg -t output` command. -# -# This scritp was frok from https://gitlab.com/snippets/1793649 by Fishonadish - - -SCREEN="eDP-1" -WAYLANDINPUT=( - "type:mouse" - "type:touchpad" - "type:tablet_tool" - "type:touch" -) - - -function rotate_ms { - case $1 in - "normal") - rotate 0 - ;; - "right-up") - rotate 90 - ;; - "bottom-up") - rotate 180 - ;; - "left-up") - rotate 270 - ;; - esac -} - -function rotate { - - TARGET_ORIENTATION=$1 - - echo "Rotating to" $TARGET_ORIENTATION - - swaymsg output $SCREEN transform $TARGET_ORIENTATION - - for i in "${WAYLANDINPUT[@]}" - do - swaymsg input "$i" map_to_output "$SCREEN" - done - -} - -while IFS='$\n' read -r line; do - rotation="$(echo $line | sed -En "s/^.*orientation changed: (.*)/\1/p")" - [[ ! -z $rotation ]] && rotate_ms $rotation -done < <(stdbuf -oL monitor-sensor) - diff --git a/chezmoi/dot_config/sway/executable_lock.sh b/chezmoi/dot_config/sway/executable_lock.sh deleted file mode 100644 index 2cef125..0000000 --- a/chezmoi/dot_config/sway/executable_lock.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash - -swaylock \ - --screenshots \ - --clock \ - --indicator \ - --indicator-radius 100 \ - --indicator-thickness 7 \ - --effect-blur 7x5 \ - --effect-vignette 0.5:0.5 \ - --ring-color 3b4252 \ - --key-hl-color 880033 \ - --line-color 00000000 \ - --inside-color 00000088 \ - --separator-color 00000000 \ - --grace 2 diff --git a/chezmoi/dot_config/sway/executable_sway-bar.sh b/chezmoi/dot_config/sway/executable_sway-bar.sh deleted file mode 100644 index ffc6ce1..0000000 --- a/chezmoi/dot_config/sway/executable_sway-bar.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash - -# Date -date=$(date "+%a %F %R") - -# Battery -battery=$(cat /sys/class/power_supply/BAT*/capacity) - -# Alsa master volume -volume=$(amixer get Master | grep "Right:" | cut -f 7,8 -d " ") - -# Status bar -echo "Vol: $volume | Bat: ${battery}% | $date" diff --git a/chezmoi/dot_config/waybar/config b/chezmoi/dot_config/waybar/config deleted file mode 100644 index ef406f2..0000000 --- a/chezmoi/dot_config/waybar/config +++ /dev/null @@ -1,160 +0,0 @@ -{ - // "layer": "top", // Waybar at top layer - // "height": 30, // Waybar height (to be removed for auto height) - "spacing": 4, // Gaps between modules (4px) - // Choose the order of the modules - "modules-left": [ - "hyprland/workspaces", - "custom/media" - ], - "modules-center": [ - "tray" - ], - "modules-right": [ - "idle_inhibitor", - "pulseaudio", - "network", - "battery", - "clock" - ], - // Modules configuration - "hyprland/workspaces": { - "disable-scroll": true, - "warp-on-scroll": true, - "format": "{icon}", - "format-icons": { - "1": "", - "2": "", - "3": "", - "9": "", - "10": "󰌳", - "default": "" - } - }, - "keyboard-state": { - "numlock": true, - "capslock": true, - "format": "{name} {icon}", - "format-icons": { - "locked": "", - "unlocked": "" - } - }, - "mpd": { - "format": "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ⸨{songPosition}|{queueLength}⸩ {volume}% ", - "format-disconnected": "Disconnected ", - "format-stopped": "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped ", - "unknown-tag": "N/A", - "interval": 2, - "consume-icons": { - "on": " " - }, - "random-icons": { - "off": " ", - "on": " " - }, - "repeat-icons": { - "on": " " - }, - "single-icons": { - "on": "1 " - }, - "state-icons": { - "paused": "", - "playing": "" - }, - "tooltip-format": "MPD (connected)", - "tooltip-format-disconnected": "MPD (disconnected)" - }, - "idle_inhibitor": { - "format": "{icon}", - "format-icons": { - "activated": "󰅶", - "deactivated": "󰾪" - } - }, - "tray": { - // "icon-size": 21, - "spacing": 10 - }, - "clock": { - // "timezone": "America/New_York", - "format": "{:%I:%M}", - "tooltip-format": "{:%Y %B}\n{calendar}", - "format-alt": "{:%Y-%m-%d}" - }, - "cpu": { - "format": "{usage}% ", - "tooltip": false - }, - "memory": { - "format": "{}% " - }, - "temperature": { - // "thermal-zone": 2, - // "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input", - "critical-threshold": 80, - // "format-critical": "{temperatureC}°C {icon}", - "format": "{temperatureC}°C {icon}", - "format-icons": ["", "", ""] - }, - "backlight": { - // "device": "acpi_video1", - "format": "{percent}% {icon}", - "format-icons": ["", "", "", "", "", "", "", "", ""] - }, - "battery": { - "states": { - // "good": 95, - "warning": 30, - "critical": 15 - }, - "format": "{capacity}% {icon}", - "format-charging": "{capacity}% ", - "format-plugged": "{capacity}% ", - "format-alt": "{time} {icon}", - // "format-good": "", // An empty format will hide the module - // "format-full": "", - "format-icons": ["", "", "", "", ""] - }, - "network": { - // "interface": "wlp2*", // (Optional) To force the use of this interface - "format-wifi": "{essid} ({signalStrength}%) ", - "format-ethernet": "{ipaddr}/{cidr} ", - "tooltip-format": "{ifname} via {gwaddr} ", - "format-linked": "{ifname} (No IP) ", - "format-disconnected": "Disconnected ⚠", - "format-alt": "{ifname}: {ipaddr}/{cidr}" - }, - "pulseaudio": { - // "scroll-step": 1, // %, can be a float - "format": "{volume}% {icon} {format_source}", - "format-bluetooth": "{volume}% {icon} {format_source}", - "format-bluetooth-muted": " {icon} {format_source}", - "format-muted": " {format_source}", - "format-source": "{volume}% ", - "format-source-muted": "", - "format-icons": { - "headphone": "", - "hands-free": "", - "headset": "", - "phone": "", - "portable": "", - "car": "", - "default": ["", "", ""] - }, - "on-click": "pavucontrol" - }, - "custom/media": { - "format": "{icon} {}", - "return-type": "json", - "max-length": 40, - "format-icons": { - "spotify": "", - "default": "🎜" - }, - "escape": true, - "exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null" // Script in resources folder - // "exec": "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" // Filter player based on name - } -} diff --git a/chezmoi/dot_config/waybar/style.css b/chezmoi/dot_config/waybar/style.css deleted file mode 100644 index 0781fd4..0000000 --- a/chezmoi/dot_config/waybar/style.css +++ /dev/null @@ -1,179 +0,0 @@ -@import "./themes/catppuccin/themes/macchiato.css"; - -@keyframes blink_red { - to { - background-color: @red; - color: @base; - } -} - -* { - /* `otf-font-awesome` is required to be installed for icons */ - font-family: JetBrainsMono Roboto, Helvetica, Arial, sans-serif; - font-size: 1rem; -} - -box.modules-left, -box.modules-center, -box.modules-right { - border-radius: 1rem; - background-color: @base; -} - -.warning, -.critical, -.urgent { - animation-name: blink_red; - animation-duration: 800ms; - animation-timing-function: linear; - animation-iteration-count: infinite; - animation-direction: alternate; -} - -#mode, -#clock, -#memory, -#temperature, -#cpu, -#custom-weather, -#mpd, -#idle_inhibitor, -#backlight, -#pulseaudio, -#network, -#battery, -#custom-powermenu, -#custom-cava-internal, -#custom-launcher, -#tray, -#disk, -#custom-pacman, -#custom-scratchpad-indicator { - padding: 0 0.6rem; - background-color: @red; -} - -/* Bar */ -window#waybar { - background-color: transparent; -} - -window > box { - background-color: transparent; - margin: 5px 11px; - margin-bottom: 0; -} - -window#waybar button:not(:first-child), -window#waybar button:not(:last-child) { - border-radius: 0; -} - -window#waybar button:first-child { - border-radius: 1rem 0 0 1rem; -} - -window#waybar button:last-child { - border-radius: 0 1rem 1rem 0; -} - -/* Workspaces */ -#workspaces button { - padding: 0.2rem 0.75rem; - color: @text; -} - -#workspaces button label { - background-color: transparent; - font-size: 1.2rem; -} - -#workspaces button:not(:first-child) label { - /* Fix fontawesome miss alignment, depends of the padding above and font size */ - margin-right: 0.45rem; -} - -#workspaces button.focused { - color: @teal; - background-color: alpha(@teal, 0.15); -} - -#workspaces button:hover { - /* border: .2px solid transparent; */ - background: alpha(@blue, 0.15); - color: @blue; - border-color: transparent; - box-shadow: inherit; - text-shadow: inherit; -} - -/* Tooltip */ -tooltip { - background-color: @base; -} - -tooltip label { - color: @rosewater; -} - -/* battery */ -#battery { - color: @mauve; - padding-right: 1.15rem; -} -#battery.full { - color: @green; -} -#battery.charging { - color: @teal; -} -#battery.discharging { - color: @peach; -} -#battery.critical:not(.charging) { - color: @pink; -} -#custom-powermenu { - color: @red; -} - -#memory { - color: @peach; -} -#cpu { - color: @blue; -} -#clock { - color: @rosewater; -} -#idle_inhibitor { - color: @green; - padding-right: 0.9rem; -} -#temperature { - color: @sapphire; -} -#backlight { - color: @green; -} -#pulseaudio { - color: @mauve; /* not active */ -} -#network { - color: @pink; /* not active */ -} -#network.disconnected { - color: @foreground; /* not active */ -} -#disk { - color: @maroon; -} -#custom-pacman { - color: @sky; -} -#custom-scratchpad-indicator { - color: @yellow; -} -#custom-weather { - color: @red; -} diff --git a/chezmoi/dot_config/waybar/themes/catppuccin/LICENSE b/chezmoi/dot_config/waybar/themes/catppuccin/LICENSE deleted file mode 100644 index 006383b..0000000 --- a/chezmoi/dot_config/waybar/themes/catppuccin/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2021 Catppuccin - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/chezmoi/dot_config/waybar/themes/catppuccin/README.md b/chezmoi/dot_config/waybar/themes/catppuccin/README.md deleted file mode 100644 index 8144e63..0000000 --- a/chezmoi/dot_config/waybar/themes/catppuccin/README.md +++ /dev/null @@ -1,79 +0,0 @@ -

- Logo
- - Catppuccin for Waybar - -

- -

- - - -

- -

- -

- -## Previews - -
-🌻 Latte - -
-
-🪴 Frappé - -
-
-🌺 Macchiato - -
-
-🌿 Mocha - -
- -## Usage - -1. Download the file with your desired flavor e.g. `mocha.css` (to be found in the [release](https://github.com/catppuccin/waybar/releases/latest) or after cloning the repository) -2. Copy it into your waybar config e.g. `~/.config/waybar/` -3. Include the file at the top of your `style.css` - ```css - @import ".css"; - ``` -4. Use the colors in your Waybar `style.css`. Waybar uses [GTK3 CSS](https://docs.gtk.org/gtk3/css-overview.html#colors). - ```css - * { - /* reference the color by using @color-name */ - color: @text; - } - - window#waybar { - /* you can also GTK3 CSS functions! */ - background-color: shade(@base, 0.9); - border: 2px solid alpha(@crust, 0.3); - } - ``` - -## 🙋 FAQ - -- Q: **_"Waybar doesn't work with the colors"_**\ - A: Make sure you included the file in the right place and you are using `@COLOR` -## 💝 Thanks to - -- [rubyowo](https://github.com/rubyowo) - -  - -

- -

- -

- Copyright © 2021-present Catppuccin Org -

- -

- -

diff --git a/chezmoi/dot_config/waybar/themes/catppuccin/assets/empty_dot_gitkeep b/chezmoi/dot_config/waybar/themes/catppuccin/assets/empty_dot_gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/chezmoi/dot_config/waybar/themes/catppuccin/assets/frappe.webp b/chezmoi/dot_config/waybar/themes/catppuccin/assets/frappe.webp deleted file mode 100644 index 7c7fea9..0000000 Binary files a/chezmoi/dot_config/waybar/themes/catppuccin/assets/frappe.webp and /dev/null differ diff --git a/chezmoi/dot_config/waybar/themes/catppuccin/assets/latte.webp b/chezmoi/dot_config/waybar/themes/catppuccin/assets/latte.webp deleted file mode 100644 index 7e549fd..0000000 Binary files a/chezmoi/dot_config/waybar/themes/catppuccin/assets/latte.webp and /dev/null differ diff --git a/chezmoi/dot_config/waybar/themes/catppuccin/assets/macchiato.webp b/chezmoi/dot_config/waybar/themes/catppuccin/assets/macchiato.webp deleted file mode 100644 index 53d7fa7..0000000 Binary files a/chezmoi/dot_config/waybar/themes/catppuccin/assets/macchiato.webp and /dev/null differ diff --git a/chezmoi/dot_config/waybar/themes/catppuccin/assets/mocha.webp b/chezmoi/dot_config/waybar/themes/catppuccin/assets/mocha.webp deleted file mode 100644 index 970778d..0000000 Binary files a/chezmoi/dot_config/waybar/themes/catppuccin/assets/mocha.webp and /dev/null differ diff --git a/chezmoi/dot_config/waybar/themes/catppuccin/assets/preview.webp b/chezmoi/dot_config/waybar/themes/catppuccin/assets/preview.webp deleted file mode 100644 index 5e18fe9..0000000 Binary files a/chezmoi/dot_config/waybar/themes/catppuccin/assets/preview.webp and /dev/null differ diff --git a/chezmoi/dot_config/waybar/themes/catppuccin/dot_catppuccin.yaml b/chezmoi/dot_config/waybar/themes/catppuccin/dot_catppuccin.yaml deleted file mode 100644 index 0b1a5a0..0000000 --- a/chezmoi/dot_config/waybar/themes/catppuccin/dot_catppuccin.yaml +++ /dev/null @@ -1,26 +0,0 @@ -# A catppuccin RC for waybar. In beta, specs may change. -app_name: waybar -binary_name: waybar -installation: - location: - macos: %appdata%/waybar/ - linux: %appdata%/waybar/ - flavours: - all: - default: - - themes/ - latte: - default: - - themes/latte.css - frappe: - default: - - themes/frappe.css - macchiato: - default: - - themes/macchiato.css - mocha: - default: - - themes/mocha.css - to: ./ - one_flavour: false - comments: "Add `@import \"$HOME/.config/waybar/.css\";` to include the file in your style.css" diff --git a/chezmoi/dot_config/waybar/themes/catppuccin/dot_editorconfig b/chezmoi/dot_config/waybar/themes/catppuccin/dot_editorconfig deleted file mode 100644 index d86ac02..0000000 --- a/chezmoi/dot_config/waybar/themes/catppuccin/dot_editorconfig +++ /dev/null @@ -1,34 +0,0 @@ -# EditorConfig helps developers define and maintain consistent -# coding styles between different editors and IDEs -# EditorConfig is awesome: https://EditorConfig.org - -root = true - -[*] -charset = utf-8 -indent_size = 2 -indent_style = space -end_of_line = lf -insert_final_newline = true -trim_trailing_whitespace = true - -# go -[*.go] -indent_style = tab -indent_size = 4 - -# python -[*.{ini,py,py.tpl,rst}] -indent_size = 4 - -# rust -[*.rs] -indent_size = 4 - -# documentation, utils -[*.{md,mdx,diff}] -trim_trailing_whitespace = false - -# windows shell scripts -[*.{cmd,bat,ps1}] -end_of_line = crlf diff --git a/chezmoi/dot_config/waybar/themes/catppuccin/dot_git b/chezmoi/dot_config/waybar/themes/catppuccin/dot_git deleted file mode 100644 index b8f00b3..0000000 --- a/chezmoi/dot_config/waybar/themes/catppuccin/dot_git +++ /dev/null @@ -1 +0,0 @@ -gitdir: ../../../../.git/modules/Waybar Catppuccin Theme diff --git a/chezmoi/dot_config/waybar/themes/catppuccin/themes/frappe.css b/chezmoi/dot_config/waybar/themes/catppuccin/themes/frappe.css deleted file mode 100644 index 18520fb..0000000 --- a/chezmoi/dot_config/waybar/themes/catppuccin/themes/frappe.css +++ /dev/null @@ -1,37 +0,0 @@ -/* -* -* Catppuccin Frappe palette -* Maintainer: rubyowo -* -*/ - -@define-color base #303446; -@define-color mantle #292c3c; -@define-color crust #232634; - -@define-color text #c6d0f5; -@define-color subtext0 #a5adce; -@define-color subtext1 #b5bfe2; - -@define-color surface0 #414559; -@define-color surface1 #51576d; -@define-color surface2 #626880; - -@define-color overlay0 #737994; -@define-color overlay1 #838ba7; -@define-color overlay2 #949cbb; - -@define-color blue #8caaee; -@define-color lavender #babbf1; -@define-color sapphire #85c1dc; -@define-color sky #99d1db; -@define-color teal #81c8be; -@define-color green #a6d189; -@define-color yellow #e5c890; -@define-color peach #ef9f76; -@define-color maroon #ea999c; -@define-color red #e78284; -@define-color mauve #ca9ee6; -@define-color pink #f4b8e4; -@define-color flamingo #eebebe; -@define-color rosewater #f2d5cf; diff --git a/chezmoi/dot_config/waybar/themes/catppuccin/themes/latte.css b/chezmoi/dot_config/waybar/themes/catppuccin/themes/latte.css deleted file mode 100644 index 085cc3e..0000000 --- a/chezmoi/dot_config/waybar/themes/catppuccin/themes/latte.css +++ /dev/null @@ -1,37 +0,0 @@ -/* -* -* Catppuccin Latte palette -* Maintainer: rubyowo -* -*/ - -@define-color base #eff1f5; -@define-color mantle #e6e9ef; -@define-color crust #dce0e8; - -@define-color text #4c4f69; -@define-color subtext0 #6c6f85; -@define-color subtext1 #5c5f77; - -@define-color surface0 #ccd0da; -@define-color surface1 #bcc0cc; -@define-color surface2 #acb0be; - -@define-color overlay0 #9ca0b0; -@define-color overlay1 #8c8fa1; -@define-color overlay2 #7c7f93; - -@define-color blue #1e66f5; -@define-color lavender #7287fd; -@define-color sapphire #209fb5; -@define-color sky #04a5e5; -@define-color teal #179299; -@define-color green #40a02b; -@define-color yellow #df8e1d; -@define-color peach #fe640b; -@define-color maroon #e64553; -@define-color red #d20f39; -@define-color mauve #8839ef; -@define-color pink #ea76cb; -@define-color flamingo #dd7878; -@define-color rosewater #dc8a78; diff --git a/chezmoi/dot_config/waybar/themes/catppuccin/themes/macchiato.css b/chezmoi/dot_config/waybar/themes/catppuccin/themes/macchiato.css deleted file mode 100644 index 6880473..0000000 --- a/chezmoi/dot_config/waybar/themes/catppuccin/themes/macchiato.css +++ /dev/null @@ -1,37 +0,0 @@ -/* -* -* Catppuccin Macchiato palette -* Maintainer: rubyowo -* -*/ - -@define-color base #24273a; -@define-color mantle #1e2030; -@define-color crust #181926; - -@define-color text #cad3f5; -@define-color subtext0 #a5adcb; -@define-color subtext1 #b8c0e0; - -@define-color surface0 #363a4f; -@define-color surface1 #494d64; -@define-color surface2 #5b6078; - -@define-color overlay0 #6e738d; -@define-color overlay1 #8087a2; -@define-color overlay2 #939ab7; - -@define-color blue #8aadf4; -@define-color lavender #b7bdf8; -@define-color sapphire #7dc4e4; -@define-color sky #91d7e3; -@define-color teal #8bd5ca; -@define-color green #a6da95; -@define-color yellow #eed49f; -@define-color peach #f5a97f; -@define-color maroon #ee99a0; -@define-color red #ed8796; -@define-color mauve #c6a0f6; -@define-color pink #f5bde6; -@define-color flamingo #f0c6c6; -@define-color rosewater #f4dbd6; diff --git a/chezmoi/dot_config/waybar/themes/catppuccin/themes/mocha.css b/chezmoi/dot_config/waybar/themes/catppuccin/themes/mocha.css deleted file mode 100644 index 98e218a..0000000 --- a/chezmoi/dot_config/waybar/themes/catppuccin/themes/mocha.css +++ /dev/null @@ -1,37 +0,0 @@ -/* -* -* Catppuccin Mocha palette -* Maintainer: rubyowo -* -*/ - -@define-color base #1e1e2e; -@define-color mantle #181825; -@define-color crust #11111b; - -@define-color text #cdd6f4; -@define-color subtext0 #a6adc8; -@define-color subtext1 #bac2de; - -@define-color surface0 #313244; -@define-color surface1 #45475a; -@define-color surface2 #585b70; - -@define-color overlay0 #6c7086; -@define-color overlay1 #7f849c; -@define-color overlay2 #9399b2; - -@define-color blue #89b4fa; -@define-color lavender #b4befe; -@define-color sapphire #74c7ec; -@define-color sky #89dceb; -@define-color teal #94e2d5; -@define-color green #a6e3a1; -@define-color yellow #f9e2af; -@define-color peach #fab387; -@define-color maroon #eba0ac; -@define-color red #f38ba8; -@define-color mauve #cba6f7; -@define-color pink #f5c2e7; -@define-color flamingo #f2cdcd; -@define-color rosewater #f5e0dc; diff --git a/chezmoi/dot_config/yazi/original_package.toml b/chezmoi/dot_config/yazi/original_package.toml deleted file mode 100644 index cecdf3a..0000000 --- a/chezmoi/dot_config/yazi/original_package.toml +++ /dev/null @@ -1,5 +0,0 @@ -[plugin] -deps = [{ use = "yazi-rs/plugins:full-border", rev = "39f2753" }] - -[flavor] -deps = [{ use = "yazi-rs/flavors:catppuccin-macchiato", rev = "2d7dd2a" }] diff --git a/chezmoi/dot_config/yazi/symlink_package.toml.tmpl b/chezmoi/dot_config/yazi/symlink_package.toml.tmpl deleted file mode 100644 index 716b5a9..0000000 --- a/chezmoi/dot_config/yazi/symlink_package.toml.tmpl +++ /dev/null @@ -1,2 +0,0 @@ -{{ .chezmoi.sourceDir }}/dot_config/yazi/original_package.toml - diff --git a/chezmoi/dot_config/zed/themes/.keep b/chezmoi/dot_config/zed/themes/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/chezmoi/dot_config/zk/config.toml b/chezmoi/dot_config/zk/config.toml deleted file mode 100644 index e97936f..0000000 --- a/chezmoi/dot_config/zk/config.toml +++ /dev/null @@ -1,205 +0,0 @@ -# zk configuration file -# -# Uncomment the properties you want to customize. - -# NOTE SETTINGS -# -# Defines the default options used when generating new notes. -[note] - -# Language used when writing notes. -# This is used to generate slugs or with date formats. -#language = "en" - -# The default title used for new note, if no `--title` flag is provided. -#default-title = "Untitled" - -# Template used to generate a note's filename, without extension. -filename = "{{slug title}}" - -# The file extension used for the notes. -#extension = "md" - -# Template used to generate a note's content. -# If not an absolute path, it is relative to .zk/templates/ -template = "default.md" - -# Path globs ignored while indexing existing notes. -#ignore = [ -# "drafts/*", -# "log.md" -#] - -# Configure random ID generation. - -# The charset used for random IDs. You can use: -# * letters: only letters from a to z. -# * numbers: 0 to 9 -# * alphanum: letters + numbers -# * hex: hexadecimal, from a to f and 0 to 9 -# * custom string: will use any character from the provided value -#id-charset = "alphanum" - -# Length of the generated IDs. -id-length = 8 - -# Letter case for the random IDs, among lower, upper or mixed. -#id-case = "lower" - - -# EXTRA VARIABLES -# -# A dictionary of variables you can use for any custom values when generating -# new notes. They are accessible in templates with {{extra.}} -[extra] - -#key = "value" - - -# GROUP OVERRIDES -# -# You can override global settings from [note] and [extra] for a particular -# group of notes by declaring a [group.""] section. -# -# Specify the list of directories which will automatically belong to the group -# with the optional `paths` property. -# -# Omitting `paths` is equivalent to providing a single path equal to the name of -# the group. This can be useful to quickly declare a group by the name of the -# directory it applies to. - -#[group.""] -#paths = ["", ""] -#[group."".note] -#filename = "{{format-date now}}" -#[group."".extra] -#key = "value" - - -# MARKDOWN SETTINGS -[format.markdown] - -# Format used to generate links between notes. -# Either "wiki", "markdown" or a custom template. Default is "markdown". -link-format = "wiki" -# Indicates whether a link's path will be percent-encoded. -# Defaults to true for "markdown" format and false for "wiki" format. -#link-encode-path = true -# Indicates whether a link's path file extension will be removed. -# Defaults to true. -#link-drop-extension = true - -# Enable support for #hashtags. -hashtags = true -# Enable support for :colon:separated:tags:. -colon-tags = false -# Enable support for Bear's #multi-word tags# -# Hashtags must be enabled for multi-word tags to work. -multiword-tags = false - - -# EXTERNAL TOOLS -[tool] - -# Default editor used to open notes. When not set, the EDITOR or VISUAL -# environment variables are used. -#editor = "vim" - -# Pager used to scroll through long output. If you want to disable paging -# altogether, set it to an empty string "". -#pager = "less -FIRX" - -fzf-line = "{{style 'title' title}}{{#each tags}} #{{this}}{{/each}}" -fzf-preview = "bat -p --color always --style header,grid {-1}" -fzf-bind-new = "" -fzf-options = """ - --layout reverse - --height 100% - --no-hscroll - --preview-window down,wrap,border-none,70% - --header "C-A: New note in root with query as slug\nC-N: New note respecting query path" - --bind "ctrl-n:abort+execute(mkdir -p $(dirname '{q}') && zk new $(dirname '{q}') --title $(basename '{q}'))" - --bind "ctrl-a:abort+execute(mkdir -p $(dirname '{q}') && zk new $(dirname '{q}') --title $(basename '{q}'))" -""" - - -# LSP -# -# Configure basic editor integration for LSP-compatible editors. -# See https://github.com/zk-org/zk/blob/main/docs/editors-integration.md -# -[lsp] - -[lsp.diagnostics] -# Each diagnostic can have for value: none, hint, info, warning, error - -# Report titles of wiki-links as hints. -# wiki-title = "hint" -# Warn for dead links between notes. -dead-link = "error" - -[lsp.completion] -# Customize the completion pop-up of your LSP client. - -# Show the note title in the completion pop-up, or fallback on its path if empty. -#note-label = "" -# Filter out the completion pop-up using the note title or its path. -#note-filter-text = " " -# Show the note filename without extension as detail. -#note-detail = "" - - -# NAMED FILTERS -# -# A named filter is a set of note filtering options used frequently together. -# -[filter] - -# Matches the notes created the last two weeks. For example: -# $ zk list recents --limit 15 -# $ zk edit recents --interactive -#recents = "--sort created- --created-after 'last two weeks'" - - -# COMMAND ALIASES -# -# Aliases are user commands called with `zk [] []`. -# -# The alias will be executed with `$SHELL -c`, please refer to your shell's -# man page to see the available syntax. In most shells: -# * $@ can be used to expand all the provided flags and arguments -# * you can pipe commands together with the usual | character -# -[alias] -# Here are a few aliases to get you started. - -# Shortcut to a command. -ls = "zk list --interactive --sort path+ $@" - -e = "zk edit --interactive --sort path+ $@" - -# Default flags for an existing command. -#list = "zk list --quiet $@" - -# Edit the last modified note. -#editlast = "zk edit --limit 1 --sort modified- $@" - -# Edit the notes selected interactively among the notes created the last two weeks. -# This alias doesn't take any argument, so we don't use $@. -#recent = "zk edit --sort created- --created-after 'last two weeks' --interactive" - -# Print paths separated with colons for the notes found with the given -# arguments. This can be useful to expand a complex search query into a flag -# taking only paths. For example: -# zk list --link-to "`zk path -m potatoe`" -#path = "zk list --quiet --format {{path}} --delimiter , $@" - -# Show a random note. -#lucky = "zk list --quiet --format full --sort random --limit 1" - -# Returns the Git history for the notes found with the given arguments. -# Note the use of a pipe and the location of $@. -#hist = "zk list --format path --delimiter0 --quiet $@ | xargs -t -0 git log --patch --" - -# Edit this configuration file. -#conf = '$EDITOR "$ZK_NOTEBOOK_DIR/.zk/config.toml"' diff --git a/chezmoi/dot_config/alacritty/alacritty.toml b/config/alacritty/alacritty.toml similarity index 100% rename from chezmoi/dot_config/alacritty/alacritty.toml rename to config/alacritty/alacritty.toml diff --git a/chezmoi/dot_config/alacritty/alacritty.yml b/config/alacritty/alacritty.yml similarity index 100% rename from chezmoi/dot_config/alacritty/alacritty.yml rename to config/alacritty/alacritty.yml diff --git a/chezmoi/dot_config/alacritty/themes/.keep b/config/alacritty/themes/.keep similarity index 100% rename from chezmoi/dot_config/alacritty/themes/.keep rename to config/alacritty/themes/.keep diff --git a/chezmoi/dot_config/bat/config b/config/bat/config similarity index 100% rename from chezmoi/dot_config/bat/config rename to config/bat/config diff --git a/chezmoi/dot_config/foot/foot.ini b/config/foot/foot.ini similarity index 100% rename from chezmoi/dot_config/foot/foot.ini rename to config/foot/foot.ini diff --git a/chezmoi/dot_config/foot/themes/catppuccin/LICENSE b/config/foot/themes/catppuccin/LICENSE similarity index 100% rename from chezmoi/dot_config/foot/themes/catppuccin/LICENSE rename to config/foot/themes/catppuccin/LICENSE diff --git a/chezmoi/dot_config/foot/themes/catppuccin/README.md b/config/foot/themes/catppuccin/README.md similarity index 100% rename from chezmoi/dot_config/foot/themes/catppuccin/README.md rename to config/foot/themes/catppuccin/README.md diff --git a/chezmoi/dot_config/foot/themes/catppuccin/assets/empty_dot_gitkeep b/config/foot/themes/catppuccin/assets/empty_dot_gitkeep similarity index 100% rename from chezmoi/dot_config/foot/themes/catppuccin/assets/empty_dot_gitkeep rename to config/foot/themes/catppuccin/assets/empty_dot_gitkeep diff --git a/chezmoi/dot_config/foot/themes/catppuccin/assets/foot.png b/config/foot/themes/catppuccin/assets/foot.png similarity index 100% rename from chezmoi/dot_config/foot/themes/catppuccin/assets/foot.png rename to config/foot/themes/catppuccin/assets/foot.png diff --git a/chezmoi/dot_config/foot/themes/catppuccin/catppuccin-frappe.conf b/config/foot/themes/catppuccin/catppuccin-frappe.conf similarity index 100% rename from chezmoi/dot_config/foot/themes/catppuccin/catppuccin-frappe.conf rename to config/foot/themes/catppuccin/catppuccin-frappe.conf diff --git a/chezmoi/dot_config/foot/themes/catppuccin/catppuccin-latte.conf b/config/foot/themes/catppuccin/catppuccin-latte.conf similarity index 100% rename from chezmoi/dot_config/foot/themes/catppuccin/catppuccin-latte.conf rename to config/foot/themes/catppuccin/catppuccin-latte.conf diff --git a/chezmoi/dot_config/foot/themes/catppuccin/catppuccin-macchiato.conf b/config/foot/themes/catppuccin/catppuccin-macchiato.conf similarity index 100% rename from chezmoi/dot_config/foot/themes/catppuccin/catppuccin-macchiato.conf rename to config/foot/themes/catppuccin/catppuccin-macchiato.conf diff --git a/chezmoi/dot_config/foot/themes/catppuccin/catppuccin-mocha.conf b/config/foot/themes/catppuccin/catppuccin-mocha.conf similarity index 100% rename from chezmoi/dot_config/foot/themes/catppuccin/catppuccin-mocha.conf rename to config/foot/themes/catppuccin/catppuccin-mocha.conf diff --git a/chezmoi/dot_config/foot/themes/catppuccin/dot_editorconfig b/config/foot/themes/catppuccin/dot_editorconfig similarity index 100% rename from chezmoi/dot_config/foot/themes/catppuccin/dot_editorconfig rename to config/foot/themes/catppuccin/dot_editorconfig diff --git a/chezmoi/dot_config/foot/themes/catppuccin/dot_git b/config/foot/themes/catppuccin/dot_git similarity index 100% rename from chezmoi/dot_config/foot/themes/catppuccin/dot_git rename to config/foot/themes/catppuccin/dot_git diff --git a/chezmoi/dot_config/fzf/forgitrc b/config/fzf/forgitrc similarity index 100% rename from chezmoi/dot_config/fzf/forgitrc rename to config/fzf/forgitrc diff --git a/chezmoi/dot_config/fzf/fzfrc b/config/fzf/fzfrc similarity index 100% rename from chezmoi/dot_config/fzf/fzfrc rename to config/fzf/fzfrc diff --git a/chezmoi/dot_config/fzf/widgets/alias_widget.zsh b/config/fzf/widgets/alias_widget.zsh similarity index 100% rename from chezmoi/dot_config/fzf/widgets/alias_widget.zsh rename to config/fzf/widgets/alias_widget.zsh diff --git a/chezmoi/dot_config/fzf/widgets/atuin-history_widget.zsh b/config/fzf/widgets/atuin-history_widget.zsh similarity index 100% rename from chezmoi/dot_config/fzf/widgets/atuin-history_widget.zsh rename to config/fzf/widgets/atuin-history_widget.zsh diff --git a/chezmoi/dot_config/fzf/widgets/cd-recent-dir_widget.zsh b/config/fzf/widgets/cd-recent-dir_widget.zsh similarity index 100% rename from chezmoi/dot_config/fzf/widgets/cd-recent-dir_widget.zsh rename to config/fzf/widgets/cd-recent-dir_widget.zsh diff --git a/chezmoi/dot_config/fzf/widgets/cd_widget.zsh b/config/fzf/widgets/cd_widget.zsh similarity index 100% rename from chezmoi/dot_config/fzf/widgets/cd_widget.zsh rename to config/fzf/widgets/cd_widget.zsh diff --git a/chezmoi/dot_config/fzf/widgets/dictionary_widget.zsh b/config/fzf/widgets/dictionary_widget.zsh similarity index 100% rename from chezmoi/dot_config/fzf/widgets/dictionary_widget.zsh rename to config/fzf/widgets/dictionary_widget.zsh diff --git a/chezmoi/dot_config/fzf/widgets/fzf-rg-launcher.zsh b/config/fzf/widgets/fzf-rg-launcher.zsh similarity index 100% rename from chezmoi/dot_config/fzf/widgets/fzf-rg-launcher.zsh rename to config/fzf/widgets/fzf-rg-launcher.zsh diff --git a/chezmoi/dot_config/fzf/widgets/locate_widget.zsh b/config/fzf/widgets/locate_widget.zsh similarity index 100% rename from chezmoi/dot_config/fzf/widgets/locate_widget.zsh rename to config/fzf/widgets/locate_widget.zsh diff --git a/chezmoi/dot_config/fzf/widgets/man_widget.zsh b/config/fzf/widgets/man_widget.zsh similarity index 100% rename from chezmoi/dot_config/fzf/widgets/man_widget.zsh rename to config/fzf/widgets/man_widget.zsh diff --git a/chezmoi/dot_config/git/config b/config/git/config similarity index 71% rename from chezmoi/dot_config/git/config rename to config/git/config index 0c713a8..faff1ec 100644 --- a/chezmoi/dot_config/git/config +++ b/config/git/config @@ -8,3 +8,9 @@ [includeIf "gitdir:~/Repos/Work/"] path = ~/.config/git/config-work +[merge] + autoStash = true + edit = no + ff = no +[rebase] + autoStash = true diff --git a/chezmoi/dot_config/git/ignore b/config/git/ignore similarity index 100% rename from chezmoi/dot_config/git/ignore rename to config/git/ignore diff --git a/chezmoi/dot_config/kitty/current-theme.conf b/config/kitty/current-theme.conf similarity index 100% rename from chezmoi/dot_config/kitty/current-theme.conf rename to config/kitty/current-theme.conf diff --git a/chezmoi/dot_config/kitty/kitty.conf b/config/kitty/kitty.conf similarity index 100% rename from chezmoi/dot_config/kitty/kitty.conf rename to config/kitty/kitty.conf diff --git a/chezmoi/dot_config/kitty/private_kitty.conf.bak b/config/kitty/private_kitty.conf.bak similarity index 100% rename from chezmoi/dot_config/kitty/private_kitty.conf.bak rename to config/kitty/private_kitty.conf.bak diff --git a/chezmoi/dot_config/lazygit/config.yml b/config/lazygit/config.yml similarity index 100% rename from chezmoi/dot_config/lazygit/config.yml rename to config/lazygit/config.yml diff --git a/chezmoi/dot_config/mise/config.toml b/config/mise/config.toml similarity index 96% rename from chezmoi/dot_config/mise/config.toml rename to config/mise/config.toml index 981db02..33a93e4 100644 --- a/chezmoi/dot_config/mise/config.toml +++ b/config/mise/config.toml @@ -2,7 +2,7 @@ node = 'lts' # python = {version='3', virtualenv='.venv'} python = {version='3'} # setting virtualenv adds a virtualenv in every directory -php = "8.2" +# php = "8.2" go = "latest" [settings] diff --git a/chezmoi/dot_config/mpv/encoding.rst b/config/mpv/encoding.rst similarity index 100% rename from chezmoi/dot_config/mpv/encoding.rst rename to config/mpv/encoding.rst diff --git a/chezmoi/dot_config/mpv/input.conf b/config/mpv/input.conf similarity index 100% rename from chezmoi/dot_config/mpv/input.conf rename to config/mpv/input.conf diff --git a/chezmoi/dot_config/mpv/mplayer-input.conf b/config/mpv/mplayer-input.conf similarity index 100% rename from chezmoi/dot_config/mpv/mplayer-input.conf rename to config/mpv/mplayer-input.conf diff --git a/chezmoi/dot_config/mpv/mpv.conf b/config/mpv/mpv.conf similarity index 100% rename from chezmoi/dot_config/mpv/mpv.conf rename to config/mpv/mpv.conf diff --git a/chezmoi/dot_config/mpv/restore-old-bindings.conf b/config/mpv/restore-old-bindings.conf similarity index 100% rename from chezmoi/dot_config/mpv/restore-old-bindings.conf rename to config/mpv/restore-old-bindings.conf diff --git a/chezmoi/dot_config/mpv/script-opts/mpv_thumbnail_script.conf b/config/mpv/script-opts/mpv_thumbnail_script.conf similarity index 100% rename from chezmoi/dot_config/mpv/script-opts/mpv_thumbnail_script.conf rename to config/mpv/script-opts/mpv_thumbnail_script.conf diff --git a/chezmoi/dot_config/mpv/scripts/mpv-i3-floating-centered.lua b/config/mpv/scripts/mpv-i3-floating-centered.lua similarity index 100% rename from chezmoi/dot_config/mpv/scripts/mpv-i3-floating-centered.lua rename to config/mpv/scripts/mpv-i3-floating-centered.lua diff --git a/chezmoi/dot_config/mpv/scripts/mpv_thumbnail_script_client_osc.lua b/config/mpv/scripts/mpv_thumbnail_script_client_osc.lua similarity index 100% rename from chezmoi/dot_config/mpv/scripts/mpv_thumbnail_script_client_osc.lua rename to config/mpv/scripts/mpv_thumbnail_script_client_osc.lua diff --git a/chezmoi/dot_config/mpv/scripts/mpv_thumbnail_script_server-1.lua b/config/mpv/scripts/mpv_thumbnail_script_server-1.lua similarity index 100% rename from chezmoi/dot_config/mpv/scripts/mpv_thumbnail_script_server-1.lua rename to config/mpv/scripts/mpv_thumbnail_script_server-1.lua diff --git a/chezmoi/dot_config/mpv/scripts/mpv_thumbnail_script_server-2.lua b/config/mpv/scripts/mpv_thumbnail_script_server-2.lua similarity index 100% rename from chezmoi/dot_config/mpv/scripts/mpv_thumbnail_script_server-2.lua rename to config/mpv/scripts/mpv_thumbnail_script_server-2.lua diff --git a/chezmoi/dot_config/mpv/scripts/mpv_thumbnail_script_server.lua b/config/mpv/scripts/mpv_thumbnail_script_server.lua similarity index 100% rename from chezmoi/dot_config/mpv/scripts/mpv_thumbnail_script_server.lua rename to config/mpv/scripts/mpv_thumbnail_script_server.lua diff --git a/chezmoi/dot_config/mpv/scripts/pause-indicator.lua b/config/mpv/scripts/pause-indicator.lua similarity index 100% rename from chezmoi/dot_config/mpv/scripts/pause-indicator.lua rename to config/mpv/scripts/pause-indicator.lua diff --git a/chezmoi/dot_config/mpv/tech-overview.txt b/config/mpv/tech-overview.txt similarity index 100% rename from chezmoi/dot_config/mpv/tech-overview.txt rename to config/mpv/tech-overview.txt diff --git a/config/nvim/.luarc.json b/config/nvim/.luarc.json new file mode 100644 index 0000000..1aa7674 --- /dev/null +++ b/config/nvim/.luarc.json @@ -0,0 +1,5 @@ +{ + "diagnostics.globals": [ + "enabled_plugins" + ] +} \ No newline at end of file diff --git a/chezmoi/dot_config/nvim/after/queries/blade/highlights.scm b/config/nvim/after/queries/blade/highlights.scm similarity index 100% rename from chezmoi/dot_config/nvim/after/queries/blade/highlights.scm rename to config/nvim/after/queries/blade/highlights.scm diff --git a/chezmoi/dot_config/nvim/after/queries/blade/injections.scm b/config/nvim/after/queries/blade/injections.scm similarity index 100% rename from chezmoi/dot_config/nvim/after/queries/blade/injections.scm rename to config/nvim/after/queries/blade/injections.scm diff --git a/config/nvim/init.lua b/config/nvim/init.lua new file mode 100644 index 0000000..2925f22 --- /dev/null +++ b/config/nvim/init.lua @@ -0,0 +1,7 @@ +-- Loadnoptions before anything +require("aleidk.options") + +require("aleidk.lazy") + +require("aleidk.keymaps") +require("aleidk.autocmds") diff --git a/config/nvim/lazy-lock.json b/config/nvim/lazy-lock.json new file mode 100644 index 0000000..aac2ace --- /dev/null +++ b/config/nvim/lazy-lock.json @@ -0,0 +1,59 @@ +{ + "CopilotChat.nvim": { "branch": "canary", "commit": "3968c25e9418a544d5faa3c242d577526b0710e7" }, + "LuaSnip": { "branch": "master", "commit": "0f7bbce41ea152a94d12aea286f2ce98e63c0f58" }, + "blink-cmp-copilot": { "branch": "main", "commit": "e3eedf36ceda1932e296ec894de4ceea8ddeacb6" }, + "blink.cmp": { "branch": "main", "commit": "81069e3955a8b4d5063287a2a6a47a844e9ca2cb" }, + "blink.compat": { "branch": "main", "commit": "08943fdf2eb00432d6205db6d0239434135416bd" }, + "catppuccin": { "branch": "main", "commit": "faf15ab0201b564b6368ffa47b56feefc92ce3f4" }, + "ccc.nvim": { "branch": "main", "commit": "7c639042583c7bdc7ce2e37e5a0e0aa6d0659c6a" }, + "comment-box.nvim": { "branch": "main", "commit": "06bb771690bc9df0763d14769b779062d8f12bc5" }, + "conform.nvim": { "branch": "master", "commit": "a203480a350b03092e473bf3001733d547160a73" }, + "copilot-lualine": { "branch": "main", "commit": "f40450c3e138766026327e7807877ea860618258" }, + "copilot.lua": { "branch": "master", "commit": "f8d8d872bb319f640d5177dad5fbf01f7a16d7d0" }, + "dressing.nvim": { "branch": "master", "commit": "fc78a3ca96f4db9f8893bb7e2fd9823e0780451b" }, + "friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" }, + "gitsigns.nvim": { "branch": "main", "commit": "5f808b5e4fef30bd8aca1b803b4e555da07fc412" }, + "grapple.nvim": { "branch": "main", "commit": "b41ddfc1c39f87f3d1799b99c2f0f1daa524c5f7" }, + "indent-blankline.nvim": { "branch": "master", "commit": "7871a88056f7144defca9c931e311a3134c5d509" }, + "lazy.nvim": { "branch": "main", "commit": "56ead98e05bb37a4ec28930a54d836d033cf00f2" }, + "lazydev.nvim": { "branch": "main", "commit": "f59bd14a852ca43db38e3662395354cb2a9b13e0" }, + "lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" }, + "luvit-meta": { "branch": "main", "commit": "57d464c4acb5c2e66bd4145060f5dc9e96a7bbb7" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "43894adcf10bb1190c2184bd7c1750e8ea2b3dce" }, + "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, + "mini.clue": { "branch": "main", "commit": "8e329f586a7cfd06085859066a4b60965fc4ecce" }, + "mini.comment": { "branch": "main", "commit": "03c13e37318bdb18481311c0ac1adc9ed731caf1" }, + "mini.surround": { "branch": "main", "commit": "0e67c4bc147f2a15cee94e7c94dcc0e115b9f55e" }, + "neogen": { "branch": "main", "commit": "dc50715c009f89b8111197fd2f282f6042daa7ea" }, + "noice.nvim": { "branch": "main", "commit": "c6f6fb178ebe9b4fd90383de743c3399f8c3a37c" }, + "nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" }, + "nvim-autopairs": { "branch": "master", "commit": "b464658e9b880f463b9f7e6ccddd93fb0013f559" }, + "nvim-lint": { "branch": "master", "commit": "6b46370d02cd001509a765591a3ffc481b538794" }, + "nvim-lspconfig": { "branch": "master", "commit": "4ae9796c4e95ca84ec77946a9f9089b8f1a3eec9" }, + "nvim-notify": { "branch": "master", "commit": "fbef5d32be8466dd76544a257d3f3dce20082a07" }, + "nvim-treesitter": { "branch": "master", "commit": "8d4fdc5e47e2a4e00179e43f56221250ce365973" }, + "nvim-treesitter-context": { "branch": "master", "commit": "6b081ea63a3711243d11540ce28ccdb6f35ecd33" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "ad8f0a472148c3e0ae9851e26a722ee4e29b1595" }, + "nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" }, + "nvim-ts-context-commentstring": { "branch": "main", "commit": "9c74db656c3d0b1c4392fc89a016b1910539e7c0" }, + "nvim-web-devicons": { "branch": "master", "commit": "edbe0a65cfacbbfff6a4a1e98ddd60c28c560509" }, + "overseer.nvim": { "branch": "master", "commit": "10ee48ff96c8d1049efb278ea4c8cf9f3b0e4326" }, + "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, + "remote-sshfs.nvim": { "branch": "main", "commit": "03f6c40c4032eeb1ab91368e06db9c3f3a97a75d" }, + "render-markdown": { "branch": "main", "commit": "6096cf3608b576a38fd1396227dbc0473091714d" }, + "smart-splits.nvim": { "branch": "master", "commit": "d8b0e772a0244169534b1fd57c1660c9bf323d26" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, + "telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, + "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" }, + "treesj": { "branch": "main", "commit": "03415ac60791d48e120a80d37e080744faf3ac15" }, + "trouble.nvim": { "branch": "main", "commit": "46cf952fc115f4c2b98d4e208ed1e2dce08c9bf6" }, + "ts-node-action": { "branch": "master", "commit": "6d3b60754fd87963d70eadaa2f77873b447eac26" }, + "typescript-tools.nvim": { "branch": "master", "commit": "346062e8cd06e82776b60785a040dfbbdcb6de77" }, + "undotree": { "branch": "master", "commit": "78b5241191852ffa9bb5da5ff2ee033160798c3b" }, + "vim-dadbod": { "branch": "master", "commit": "fe5a55e92b2dded7c404006147ef97fb073d8b1b" }, + "vim-dadbod-completion": { "branch": "master", "commit": "da0e75c09c27a82aad078d993bb1b2f4afd43427" }, + "vim-dadbod-ui": { "branch": "master", "commit": "28a16902cb2134c934b85da5250033ee43b0dee5" }, + "vim-illuminate": { "branch": "master", "commit": "5eeb7951fc630682c322e88a9bbdae5c224ff0aa" }, + "vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" }, + "yazi.nvim": { "branch": "main", "commit": "053867916a9be3cb46f84b6f095ee731bbddd213" } +} diff --git a/chezmoi/dot_config/nvim/lua/aleidk/autocmds.lua b/config/nvim/lua/aleidk/autocmds.lua similarity index 100% rename from chezmoi/dot_config/nvim/lua/aleidk/autocmds.lua rename to config/nvim/lua/aleidk/autocmds.lua diff --git a/chezmoi/dot_config/nvim/lua/aleidk/constants.lua b/config/nvim/lua/aleidk/constants.lua similarity index 98% rename from chezmoi/dot_config/nvim/lua/aleidk/constants.lua rename to config/nvim/lua/aleidk/constants.lua index 0d9495c..52cdd9f 100644 --- a/chezmoi/dot_config/nvim/lua/aleidk/constants.lua +++ b/config/nvim/lua/aleidk/constants.lua @@ -29,7 +29,7 @@ return { Color = " ", Constant = " ", Constructor = " ", - Copilot = " ", + Copilot = " ", Enum = " ", EnumMember = " ", Event = " ", diff --git a/chezmoi/dot_config/nvim/lua/aleidk/keymaps.lua b/config/nvim/lua/aleidk/keymaps.lua similarity index 100% rename from chezmoi/dot_config/nvim/lua/aleidk/keymaps.lua rename to config/nvim/lua/aleidk/keymaps.lua diff --git a/config/nvim/lua/aleidk/lazy.lua b/config/nvim/lua/aleidk/lazy.lua new file mode 100644 index 0000000..9327f45 --- /dev/null +++ b/config/nvim/lua/aleidk/lazy.lua @@ -0,0 +1,35 @@ +-- Bootstrap lazy.nvim +-- Load this file after options has been set + +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end +end +vim.opt.rtp:prepend(lazypath) + +-- enabled_plugins is injected as a local variable in the top of the file by the dotfile manager +-- See: .dotter/global.toml inside [nvim.files] & [nvim.variables] table +require("lazy").setup({ + spec = { + { import = "aleidk.plugins-core", enabled = enabled_plugins.nvim_core }, + { import = "aleidk.plugins-base", enabled = enabled_plugins.nvim_base }, + { import = "aleidk.plugins-ide", enabled = enabled_plugins.nvim_ide }, + }, + + install = { colorscheme = { "catppuccin" } }, + -- checker = { enabled = true }, +}) + +return { + enabled_plugins +} diff --git a/chezmoi/dot_config/nvim/lua/aleidk/options.lua b/config/nvim/lua/aleidk/options.lua similarity index 61% rename from chezmoi/dot_config/nvim/lua/aleidk/options.lua rename to config/nvim/lua/aleidk/options.lua index cd81c12..d1fe584 100644 --- a/chezmoi/dot_config/nvim/lua/aleidk/options.lua +++ b/config/nvim/lua/aleidk/options.lua @@ -31,7 +31,7 @@ opt.scrolloff = 15 -- Lines of context opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize" } opt.shiftround = true -- Round indent opt.shiftwidth = 2 -- Size of an indent -opt.shortmess:append({ W = true, I = true, c = true }) +-- opt.shortmess:append({ W = true, I = true, c = true }) -- INFO: this control the format of some messages opt.showmode = false -- Dont show mode since we have a statusline opt.sidescrolloff = 8 -- Columns of context opt.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text each time @@ -52,6 +52,62 @@ opt.wrap = false -- Disable line wrap vim.o.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions" +local fn = vim.fn + +-- Quickfix customization +function _G.qftf(info) + local items + local ret = {} + -- The name of item in list is based on the directory of quickfix window. + -- Change the directory for quickfix window make the name of item shorter. + -- It's a good opportunity to change current directory in quickfixtextfunc :) + -- + -- local alterBufnr = fn.bufname('#') -- alternative buffer is the buffer before enter qf window + -- local root = getRootByAlterBufnr(alterBufnr) + -- vim.cmd(('noa lcd %s'):format(fn.fnameescape(root))) + -- + if info.quickfix == 1 then + items = fn.getqflist({ id = info.id, items = 0 }).items + else + items = fn.getloclist(info.winid, { id = info.id, items = 0 }).items + end + local limit = 31 + local fnameFmt1, fnameFmt2 = "%-" .. limit .. "s", "…%." .. (limit - 1) .. "s" + local validFmt = "%s │%5d:%-3d│%s %s" + for i = info.start_idx, info.end_idx do + local e = items[i] + local fname = "" + local str + if e.valid == 1 then + if e.bufnr > 0 then + fname = fn.bufname(e.bufnr) + if fname == "" then + fname = "[No Name]" + else + fname = fname:gsub("^" .. vim.env.HOME, "~") + end + -- char in fname may occur more than 1 width, ignore this issue in order to keep performance + if #fname <= limit then + fname = fnameFmt1:format(fname) + else + fname = fnameFmt2:format(fname:sub(1 - limit)) + end + end + local lnum = e.lnum > 99999 and -1 or e.lnum + local col = e.col > 999 and -1 or e.col + local qtype = e.type == "" and "" or " " .. e.type:sub(1, 1):upper() + str = validFmt:format(fname, lnum, col, qtype, e.text) + else + str = e.text + end + table.insert(ret, str) + end + return ret +end + +-- TODO: how to customize? +vim.o.qftf = "{info -> v:lua._G.qftf(info)}" + vim.filetype.add({ -- Detect and assign filetype based on the extension of the filename extension = { diff --git a/chezmoi/dot_config/nvim/lua/aleidk/plugins/auto-pairs.lua b/config/nvim/lua/aleidk/plugins-base/auto-pairs.lua similarity index 87% rename from chezmoi/dot_config/nvim/lua/aleidk/plugins/auto-pairs.lua rename to config/nvim/lua/aleidk/plugins-base/auto-pairs.lua index 2355082..883891d 100644 --- a/chezmoi/dot_config/nvim/lua/aleidk/plugins/auto-pairs.lua +++ b/config/nvim/lua/aleidk/plugins-base/auto-pairs.lua @@ -1,5 +1,6 @@ return { "windwp/nvim-autopairs", event = "InsertEnter", + config = true, opts = {}, -- this is equalent to setup({}) function } diff --git a/chezmoi/dot_config/nvim/lua/aleidk/plugins/bookmarks.lua b/config/nvim/lua/aleidk/plugins-base/bookmarks.lua similarity index 74% rename from chezmoi/dot_config/nvim/lua/aleidk/plugins/bookmarks.lua rename to config/nvim/lua/aleidk/plugins-base/bookmarks.lua index fe3a1a2..239a03b 100644 --- a/chezmoi/dot_config/nvim/lua/aleidk/plugins/bookmarks.lua +++ b/config/nvim/lua/aleidk/plugins-base/bookmarks.lua @@ -15,6 +15,33 @@ return { }, lazy = false, cmd = "Grapple", + config = function() + local telescope = require("telescope") + telescope.load_extension("grapple") + + -- Open graple window when open without arguments + local g = vim.api.nvim_create_augroup('Grapple-User', { clear = true }) + + vim.api.nvim_create_autocmd('StdinReadPre', { + group = g, + callback = function() + vim.g.read_from_stdin = 1 + end, + }) + + vim.api.nvim_create_autocmd('UIEnter', { + group = g, + callback = function() + if + vim.fn.argc() == 0 + and vim.api.nvim_buf_get_name(0) == '' + and vim.g.read_from_stdin == nil + then + telescope.extensions.grapple.tags() + end + end, + }) + end, keys = { { "a", "Grapple toggle", desc = "Toggle bookmark for current file" }, { "D", "Grapple reset", desc = "Delete all bookmarks" }, diff --git a/config/nvim/lua/aleidk/plugins-base/comments.lua b/config/nvim/lua/aleidk/plugins-base/comments.lua new file mode 100644 index 0000000..edd3413 --- /dev/null +++ b/config/nvim/lua/aleidk/plugins-base/comments.lua @@ -0,0 +1,28 @@ +return { + { + "echasnovski/mini.comment", + version = "*", + event = "VeryLazy", + dependencies = { + { "nvim-treesitter/nvim-treesitter-context" }, + }, + opts = { + options = { + custom_commentstring = function() + return require("ts_context_commentstring.internal").calculate_commentstring() + or vim.bo.commentstring + end, + }, + }, + }, + { + "LudoPinelli/comment-box.nvim", + opts = { + outer_blank_lines = true, + }, + keys = { + { "gcb", function() require("comment-box").lcbox() end, { desc = "Create a comment box", mode = { "n", "v" }, } }, + { "gcl", function() require("comment-box").llline() end, { desc = "Create a comment line", mode = { "n", "v" }, } }, + }, + }, +} diff --git a/config/nvim/lua/aleidk/plugins-base/file-explorer.lua b/config/nvim/lua/aleidk/plugins-base/file-explorer.lua new file mode 100644 index 0000000..2f76b72 --- /dev/null +++ b/config/nvim/lua/aleidk/plugins-base/file-explorer.lua @@ -0,0 +1,33 @@ +return { + "mikavilpas/yazi.nvim", + keys = { + { + "e", + "Yazi", + desc = "Open yazi at the current file", + }, + { + -- Open in the current working directory + "E", + "Yazi cwd", + desc = "Open the file manager in nvim's working directory", + }, + }, + opts = { + -- if you want to open yazi instead of netrw, see below for more info + open_for_directories = true, + open_multiple_tabs = true, + floating_window_scaling_factor = 1, + keymaps = { + show_help = '', + open_file_in_vertical_split = '', + open_file_in_horizontal_split = '', + open_file_in_tab = '', + grep_in_directory = '', + cycle_open_buffers = '', + copy_relative_path_to_selected_files = '', + send_to_quickfix_list = '', + change_working_directory = "", + }, + }, +} diff --git a/chezmoi/dot_config/nvim/lua/aleidk/plugins/indent-blankline.lua b/config/nvim/lua/aleidk/plugins-base/indent-blankline.lua similarity index 88% rename from chezmoi/dot_config/nvim/lua/aleidk/plugins/indent-blankline.lua rename to config/nvim/lua/aleidk/plugins-base/indent-blankline.lua index 95b4c4f..f529305 100644 --- a/chezmoi/dot_config/nvim/lua/aleidk/plugins/indent-blankline.lua +++ b/config/nvim/lua/aleidk/plugins-base/indent-blankline.lua @@ -1,7 +1,7 @@ return { -- Add indentation guides even on blank lines "lukas-reineke/indent-blankline.nvim", - event = { "BufReadPost", "BufNewFile" }, + dependencies = { "nvim-treesitter/nvim-treesitter" }, main = "ibl", opts = { -- char = "▏", diff --git a/chezmoi/dot_config/nvim/lua/aleidk/plugins/treesitter.lua b/config/nvim/lua/aleidk/plugins-base/treesitter.lua similarity index 53% rename from chezmoi/dot_config/nvim/lua/aleidk/plugins/treesitter.lua rename to config/nvim/lua/aleidk/plugins-base/treesitter.lua index 6246d99..c0077f4 100644 --- a/chezmoi/dot_config/nvim/lua/aleidk/plugins/treesitter.lua +++ b/config/nvim/lua/aleidk/plugins-base/treesitter.lua @@ -12,25 +12,6 @@ return { config = function() ---@diagnostic disable-next-line: missing-fields require("nvim-treesitter.configs").setup({ - -- Add languages to be installed here that you want installed for treesitter - ensure_installed = { - "bash", - "c", - "cpp", - "go", - "lua", - "markdown", - "markdown_inline", - "python", - "regex", - "rust", - "sql", - "tsx", - "javascript", - "typescript", - "vim", - "vimdoc", - }, -- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!) auto_install = true, highlight = { enable = true }, @@ -55,30 +36,24 @@ return { move = { enable = true, set_jumps = true, -- whether to set jumps in the jumplist - goto_next_start = { - ["]m"] = "@function.outer", - ["]]"] = "@class.outer", + goto_previous = { -- current or last start of object + ["[["] = { query = "@local.scope", query_group = "locals", desc = "Next scope" }, + ["[f"] = "@function.outer", + ["[c"] = "@class.outer", }, - goto_next_end = { - ["]M"] = "@function.outer", - ["]["] = "@class.outer", - }, - goto_previous_start = { - ["[m"] = "@function.outer", - ["[["] = "@class.outer", - }, - goto_previous_end = { - ["[M"] = "@function.outer", - ["[]"] = "@class.outer", + goto_next = { -- next object end + ["]]"] = { query = "@local.scope", query_group = "locals", desc = "Next scope" }, + ["]f"] = "@function.outer", -- current function end + ["]c"] = "@class.outer", }, }, swap = { enable = true, swap_next = { - ["a"] = "@parameter.inner", + ["ln"] = "@parameter.inner", }, swap_previous = { - ["A"] = "@parameter.inner", + ["lN"] = "@parameter.inner", }, }, }, @@ -89,22 +64,27 @@ return { enable_autocmd = false, } + local ts_repeat_move = require "nvim-treesitter.textobjects.repeatable_move" + + -- Repeat movement with ; and , + -- ensure , goes forward and ; goes backward regardless of the last direction + vim.keymap.set({ "n", "x", "o" }, ",", ts_repeat_move.repeat_last_move_next) + vim.keymap.set({ "n", "x", "o" }, ";", ts_repeat_move.repeat_last_move_previous) + + -- Optionally, make builtin f, F, t, T also repeatable with ; and , + vim.keymap.set({ "n", "x", "o" }, "f", ts_repeat_move.builtin_f_expr, { expr = true }) + vim.keymap.set({ "n", "x", "o" }, "F", ts_repeat_move.builtin_F_expr, { expr = true }) + vim.keymap.set({ "n", "x", "o" }, "t", ts_repeat_move.builtin_t_expr, { expr = true }) + vim.keymap.set({ "n", "x", "o" }, "T", ts_repeat_move.builtin_T_expr, { expr = true }) + + vim.keymap.set("n", "[u", function() + require("treesitter-context").go_to_context() + end, { silent = true, noremap = true, desc = "Go up when context is out of view" }) + vim.opt.foldmethod = "expr" vim.opt.foldexpr = "nvim_treesitter#foldexpr()" -- Uncoment this line to disable auto folding on file open vim.cmd("set nofoldenable") - - -- TODO: remove this when blade treesitter is added to nvim-treesitter repo - -- Also remove the "config/nvim/after/queries/blade" folder. - local parser_config = require("nvim-treesitter.parsers").get_parser_configs() - parser_config.blade = { - install_info = { - url = "https://github.com/EmranMR/tree-sitter-blade", - files = { "src/parser.c" }, - branch = "main", - }, - filetype = "blade", - } end, } diff --git a/config/nvim/lua/aleidk/plugins-base/ui.lua b/config/nvim/lua/aleidk/plugins-base/ui.lua new file mode 100644 index 0000000..b587ebb --- /dev/null +++ b/config/nvim/lua/aleidk/plugins-base/ui.lua @@ -0,0 +1,217 @@ +local icons = require("aleidk.constants").icons + +return { + { + "rcarriga/nvim-notify", + opts = { + render = "compact", + fps = "60", + timeout = 2000, + stages = "slide", + icons = { + DEBUG = "", + TRACE = "✎", + ERROR = icons.diagnostics.Error, + INFO = icons.diagnostics.Info, + WARN = icons.diagnostics.Warn, + } + } + }, + { + -- better imputs + "stevearc/dressing.nvim", + opts = { + input = { + -- handle by noice + enabled = false, + }, + }, + }, + { + "folke/noice.nvim", + event = "VeryLazy", + dependencies = { + "MunifTanjim/nui.nvim", + "rcarriga/nvim-notify", + }, + ---@type NoiceConfig + opts = { + presets = { + bottom_search = true, + long_message_to_split = true, + inc_rename = true, + lsp_doc_border = true, + }, + lsp = { + override = { + -- override the default lsp markdown formatter with Noice + ["vim.lsp.util.convert_input_to_markdown_lines"] = true, + -- override the lsp markdown formatter with Noice + ["vim.lsp.util.stylize_markdown"] = true, + -- override cmp documentation with Noice (needs the other options to work) + ["cmp.entry.get_documentation"] = true, + }, + message = { + view = "mini", + view_search = false, + }, + progress = { + view = "mini_left" + } + }, + ---@type NoiceRouteConfig[] + routes = { + { + -- Don't show these messages + opts = { skip = true }, + filter = { + any = { + { + event = "msg_show", + kind = "search_count", + }, + { + event = "msg_show", + kind = "", + find = "written", -- file saved msg + }, + { + event = "msg_show", + kind = "", + find = "yazi.nvim", + }, + { + event = "msg_show", + kind = "", + find = "%d+ (more|fewer) lines", -- undo/redo msg + }, + } + }, + }, + { + filter = { + event = "notify", + min_height = 15 + }, + view = 'popup', + }, + { + filter = { + event = "notify", + kind = "info" + }, + view = 'mini' + }, + }, + ---@type NoiceConfigViews + views = { + notify = { + merge = true + }, + cmdline_popup = { + position = { + row = 5, + col = "50%", + }, + size = { + width = 60, + height = "auto", + }, + }, + popupmenu = { + relative = "editor", + position = { + row = 8, + col = "50%", + }, + size = { + width = 60, + height = 10, + }, + border = { + style = "rounded", + padding = { 0, 1 }, + }, + win_options = { + winhighlight = { Normal = "Normal", FloatBorder = "DiagnosticInfo" }, + }, + }, + mini_left = { + backend = "mini", + relative = "editor", + align = "left", + timeout = 2000, + reverse = true, + focusable = false, + position = { + row = -1, + col = 0, + }, + size = { + width = "auto", + height = "auto", + max_height = 10, + }, + border = { + style = "none", + }, + zindex = 60, + win_options = { + winbar = "", + foldenable = false, + winblend = 30, + winhighlight = { + Normal = "NoiceMini", + IncSearch = "", + CurSearch = "", + Search = "", + }, + }, + }, + }, + }, + -- stylua: ignore + keys = { + { + "", + function() require("noice").redirect(vim.fn.getcmdline()) end, + mode = "c", + desc = + "Redirect Cmdline" + }, + { + "um", + function() require("noice").cmd("last") end, + desc = + "Messages last" + }, + { + "uM", + function() require("noice").cmd("history") end, + desc = + "Messages all" + }, + { "uX", function() require("noice").cmd("dismiss") end, desc = "Message dismiss all" }, + { + "", + function() if not require("noice.lsp").scroll(4) then return "" end end, + silent = true, + expr = true, + desc = + "Scroll forward", + mode = { + "i", "n", "s" } + }, + { + "", + function() if not require("noice.lsp").scroll(-4) then return "" end end, + silent = true, + expr = true, + desc = + "Scroll backward", + mode = { + "i", "n", "s" } + }, + }, + } +} diff --git a/config/nvim/lua/aleidk/plugins-base/undo-tree.lua b/config/nvim/lua/aleidk/plugins-base/undo-tree.lua new file mode 100644 index 0000000..ba5adb4 --- /dev/null +++ b/config/nvim/lua/aleidk/plugins-base/undo-tree.lua @@ -0,0 +1,13 @@ +return { + { + "mbbill/undotree", + config = function() + vim.g.undotree_WindowLayout = 2 + vim.g.undotree_ShortIndicators = 1 + vim.g.undotree_SetFocusWhenToggle = 1 + end, + keys = { + { "fu", vim.cmd.UndotreeToggle, desc = "Undo tree" }, + }, + }, +} diff --git a/chezmoi/dot_config/nvim/lua/aleidk/plugins/colorscheme.lua b/config/nvim/lua/aleidk/plugins-core/colorscheme.lua similarity index 83% rename from chezmoi/dot_config/nvim/lua/aleidk/plugins/colorscheme.lua rename to config/nvim/lua/aleidk/plugins-core/colorscheme.lua index 5f126e9..92a58d4 100644 --- a/chezmoi/dot_config/nvim/lua/aleidk/plugins/colorscheme.lua +++ b/config/nvim/lua/aleidk/plugins-core/colorscheme.lua @@ -1,22 +1,21 @@ return { -- Change colors.none if not using a transparent background "catppuccin/nvim", + name = "catppuccin", priority = 1000, - lazy = false, opts = { flavour = "macchiato", transparent_background = true, integrations = { + aerial = true, + blink_cmp = true, cmp = true, - notify = true, harpoon = false, + indent_blankline = { enabled = true, scope_color = "text", }, + lsp_trouble = true, mason = true, neogit = true, noice = true, - hop = true, - lsp_trouble = true, - indent_blankline = { - enabled = true, - }, + notify = true, }, custom_highlights = function(colors) return { @@ -34,6 +33,6 @@ return { -- Change colors.none if not using a transparent background config = function(_, opts) require("catppuccin").setup(opts) - vim.cmd.colorscheme("catppuccin") + vim.cmd.colorscheme("catppuccin-macchiato") end, } diff --git a/config/nvim/lua/aleidk/plugins-core/init.lua b/config/nvim/lua/aleidk/plugins-core/init.lua new file mode 100644 index 0000000..3501757 --- /dev/null +++ b/config/nvim/lua/aleidk/plugins-core/init.lua @@ -0,0 +1,22 @@ +return { + -- Detect tabstop and shiftwidth automatically + "tpope/vim-sleuth", + { "nvim-tree/nvim-web-devicons", lazy = true }, + { + -- Highlight word under cursor + "RRethy/vim-illuminate", + event = { "BufReadPost", "BufNewFile" }, + opts = { + delay = 200, + filetypes_denylist = { + 'dirbuf', + 'dirvish', + 'fugitive', + 'aerial', + }, + }, + config = function(_, opts) + require("illuminate").configure(opts) + end, + }, +} diff --git a/chezmoi/dot_config/nvim/lua/aleidk/plugins/key-help.lua b/config/nvim/lua/aleidk/plugins-core/key-help.lua similarity index 100% rename from chezmoi/dot_config/nvim/lua/aleidk/plugins/key-help.lua rename to config/nvim/lua/aleidk/plugins-core/key-help.lua diff --git a/chezmoi/dot_config/nvim/lua/aleidk/plugins/lualine.lua b/config/nvim/lua/aleidk/plugins-core/lualine.lua similarity index 92% rename from chezmoi/dot_config/nvim/lua/aleidk/plugins/lualine.lua rename to config/nvim/lua/aleidk/plugins-core/lualine.lua index 0e79c78..83aaede 100644 --- a/chezmoi/dot_config/nvim/lua/aleidk/plugins/lualine.lua +++ b/config/nvim/lua/aleidk/plugins-core/lualine.lua @@ -66,6 +66,18 @@ return { end end + local trouble = require("trouble") + local symbols = trouble.statusline({ + mode = "lsp_document_symbols", + groups = {}, + title = false, + filter = { range = true }, + format = "{kind_icon}{symbol.name:Normal}", + -- The following line is needed to fix the background color + -- Set it to the lualine section you want to use + hl_group = "lualine_c_normal", + }) + return { options = { theme = "catppuccin", @@ -116,16 +128,11 @@ return { }, { codecompanion_status }, { - "overseer", + symbols.get, + cond = symbols.has, }, { - -- Macro recording status - function() - return require("noice").api.status.mode.get() - end, - cond = function() - return package.loaded["noice"] and require("noice").api.status.mode.has() - end, + "overseer", }, }, lualine_x = { @@ -136,6 +143,15 @@ return { }, }, lualine_y = { + { + -- Macro recording status + function() + return require("noice").api.status.mode.get() + end, + cond = function() + return package.loaded["noice"] and require("noice").api.status.mode.has() + end, + }, { "searchcount" }, { "location" }, { diff --git a/config/nvim/lua/aleidk/plugins-core/markdown.lua b/config/nvim/lua/aleidk/plugins-core/markdown.lua new file mode 100644 index 0000000..19e36a2 --- /dev/null +++ b/config/nvim/lua/aleidk/plugins-core/markdown.lua @@ -0,0 +1,15 @@ +return { + { + "MeanderingProgrammer/markdown.nvim", + name = "render-markdown", -- Only needed if you have another plugin named markdown.nvim + -- dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.nvim' }, -- if you use the mini.nvim suite + -- dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.icons' }, -- if you use standalone mini plugins + dependencies = { "nvim-treesitter/nvim-treesitter", "nvim-tree/nvim-web-devicons" }, -- if you prefer nvim-web-devicons + opts = { + file_types = { 'markdown', 'copilot-chat' }, + sign = { + enabled = false, + }, + }, + }, +} diff --git a/chezmoi/dot_config/nvim/lua/aleidk/plugins/smart-splits.lua b/config/nvim/lua/aleidk/plugins-core/smart-splits.lua similarity index 100% rename from chezmoi/dot_config/nvim/lua/aleidk/plugins/smart-splits.lua rename to config/nvim/lua/aleidk/plugins-core/smart-splits.lua diff --git a/chezmoi/dot_config/nvim/lua/aleidk/plugins/surround.lua b/config/nvim/lua/aleidk/plugins-core/surround.lua similarity index 100% rename from chezmoi/dot_config/nvim/lua/aleidk/plugins/surround.lua rename to config/nvim/lua/aleidk/plugins-core/surround.lua diff --git a/chezmoi/dot_config/nvim/lua/aleidk/plugins/telescope.lua b/config/nvim/lua/aleidk/plugins-core/telescope.lua similarity index 82% rename from chezmoi/dot_config/nvim/lua/aleidk/plugins/telescope.lua rename to config/nvim/lua/aleidk/plugins-core/telescope.lua index f6bb853..a520cf0 100644 --- a/chezmoi/dot_config/nvim/lua/aleidk/plugins/telescope.lua +++ b/config/nvim/lua/aleidk/plugins-core/telescope.lua @@ -1,8 +1,7 @@ -- Fuzzy Finder (files, lsp, etc) return { "nvim-telescope/telescope.nvim", - version = "*", - event = "VeryLazy", + branch = "0.1.x", dependencies = { { "nvim-lua/plenary.nvim" }, { @@ -23,8 +22,7 @@ return { defaults = { prompt_prefix = " ", selection_caret = " ", - layout_strategy = "vertical", - layout_config = { vertical = { height = 0.99, mirror = true, prompt_position = "top" } }, + layout_strategy = "flex", mappings = { i = { [""] = actions.preview_scrolling_up, @@ -36,12 +34,9 @@ return { [""] = actions.close, [""] = actions.send_to_qflist + actions.open_qflist, [""] = actions.send_selected_to_qflist + actions.open_qflist, - [""] = function(...) - return require("trouble.providers.telescope").open_with_trouble(...) - end, - [""] = function(...) - return require("trouble.providers.telescope").open_selected_with_trouble(...) - end, + [""] = require("trouble.sources.telescope").open, + [""] = require("trouble.sources.telescope").open, + [""] = actions.which_key, }, }, }, @@ -51,13 +46,6 @@ return { -- Enable telescope fzf native, if installed pcall(telescope.load_extension, "fzf") - -- Find files - vim.keymap.set( - "n", - "fe", - ":Telescope file_browser path=%:p:h select_buffer=true", - { desc = "File Explorer" } - ) vim.keymap.set("n", "fb", builtin.buffers, { desc = "Find buffers" }) vim.keymap.set("n", "ff", builtin.find_files, { desc = "Find files" }) vim.keymap.set("n", "fF", function() diff --git a/chezmoi/dot_config/nvim/lua/aleidk/plugins/todo-comments.lua b/config/nvim/lua/aleidk/plugins-core/todo-comments.lua similarity index 75% rename from chezmoi/dot_config/nvim/lua/aleidk/plugins/todo-comments.lua rename to config/nvim/lua/aleidk/plugins-core/todo-comments.lua index 33f2372..d9044cd 100644 --- a/chezmoi/dot_config/nvim/lua/aleidk/plugins/todo-comments.lua +++ b/config/nvim/lua/aleidk/plugins-core/todo-comments.lua @@ -1,9 +1,8 @@ return { - "folke/todo-comments.nvim", - cmd = { "TodoTrouble", "TodoTelescope" }, - event = { "BufReadPost", "BufNewFile" }, - config = true, - -- stylua: ignore + "folke/todo-comments.nvim", + cmd = { "TodoTrouble", "TodoTelescope" }, + event = { "BufReadPost", "BufNewFile" }, + config = true, keys = { { "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment" }, { "[t", function() require("todo-comments").jump_prev() end, desc = "Previous todo comment" }, diff --git a/config/nvim/lua/aleidk/plugins-ide/ai.lua b/config/nvim/lua/aleidk/plugins-ide/ai.lua new file mode 100644 index 0000000..a4f2f00 --- /dev/null +++ b/config/nvim/lua/aleidk/plugins-ide/ai.lua @@ -0,0 +1,165 @@ +return { + "CopilotC-Nvim/CopilotChat.nvim", + branch = "canary", + build = "make tiktoken", + cmd = "CopilotChat", + dependencies = { + "nvim-lua/plenary.nvim", + { + "zbirenbaum/copilot.lua", + cmd = "Copilot", + event = "InsertEnter", + config = function() + require("copilot").setup({ + suggestion = { enabled = false }, + panel = { enabled = false }, + }) + + vim.g.copilot_autocomplete_enabled = false + + vim.api.nvim_create_user_command("CopilotToggleAutocomplete", function() + vim.g.copilot_autocomplete_enabled = not vim.g.copilot_autocomplete_enabled + print("Copilot autocompletion: " .. tostring(vim.g.copilot_autocomplete_enabled)) + end, { desc = "Toggle Copilot autocompletion" }) + end, + }, + }, + opts = + ---@type CopilotChat.config + { + ---@type table + prompts = { + HowDoI = { + system_prompt = [[ + > /COPILOT_EXPLAIN + + You are gonna be asked for guidance about how to solve a problem or archeive a goal. For that your answers need to follow these rules: + + 1. Provide brief, consice and unambiguos responses. + 2. You need to response with an step by step list of actions needed to complete the task. + 3. **You never have to give an explicit answer**, instead provide a high level overview of how to complete the task. + 4. Unless explicity asked by the user, **you never have to provide code snippets** in your responses. Only provide code snippets when the user says so in each question. + 5. If the user ask for a code snippet, **prefer to respond in pseudo code**, unless the user explicity asked for a concrete language. + 6. You need to have into consideration good and clean code practices, code performance and other standards, comunicate in your response this considerations and common pitfalls to avoid. + 7. If possible, include how the user can test the task is completed successfully with the title "## Testing". + 8. Use markdawn syntax highlighting when possible. + 9. You are allowed to reference the following elements but without giving examples of usage (unless the user ask for it): + - Elements from the language syntaxis. + - Standard library of the lenguage. + - External libraries and/or frameworks. + - The idiomatic way of acomplish something in the language. + - Data structures and algorithms that could help complete the task. + + If you have multiple aproaches of how the task can be solved, insert the title "## Options", then generate separate list of task, each in the form of "### Option A", "### Option B", etc so he/her can have it into consideration. + The numbering of each list needs to be independen of each other, also provide only 1 list per aproach. + + The user can ask follow up question, which needs to follow the same rules. + ]] + }, + Explain = { + prompt = '> /COPILOT_EXPLAIN\n\nWrite an explanation for the selected code as paragraphs of text.', + }, + Review = { + prompt = '> /COPILOT_REVIEW\n\nReview the selected code.', + -- see config.lua for implementation + }, + Fix = { + prompt = + '> /COPILOT_GENERATE\n\nThere is a problem in this code. Rewrite the code to show it with the bug fixed.', + }, + Optimize = { + prompt = '> /COPILOT_GENERATE\n\nOptimize the selected code to improve performance and readability.', + }, + Docs = { + prompt = '> /COPILOT_GENERATE\n\nPlease add documentation comments to the selected code.', + }, + Tests = { + prompt = '> /COPILOT_GENERATE\n\nPlease generate tests for my code.', + }, + Commit = { + prompt = + '> #git:staged\n\nWrite commit message for the change with commitizen convention. Make sure the title has maximum 50 characters and message is wrapped at 72 characters. Wrap the whole message in code block with language gitcommit.', + }, + }, + question_header = " " .. vim.env.USER or "User" .. " ", + answer_header = " Copilot ", + window = { + layout = 'float', -- 'vertical', 'horizontal', 'float', 'replace' + width = 0.8, -- fractional width of parent, or absolute width in columns when > 1 + height = 0.8, -- fractional height of parent, or absolute height in rows when > 1 + -- Options below only apply to floating windows + relative = 'editor', -- 'editor', 'win', 'cursor', 'mouse' + border = 'rounded', -- 'none', single', 'double', 'rounded', 'solid', 'shadow' + title = ' ', -- title of chat window + zindex = 1, -- determines if window is on top or below other floating windows + }, + }, + keys = { + { + "at", + function() + require("CopilotChat").toggle() + end, + desc = "Toggle window", + mode = { "n", "v" }, + }, + { + "aa", + function() + local input = vim.fn.input(" Quick Chat: ") + if input == "" then + return + end + require("CopilotChat").ask(input) + end, + desc = "Quick chat", + mode = { "n", "v" }, + }, + { + "ah", + function() + local input = vim.fn.input(" How do I...") + if input == "" then + return + end + + local chat = require("CopilotChat") + + local promptConfig = chat.prompts()["HowDoI"] + chat.ask(input, promptConfig) + end, + desc = "How do I...", + mode = { "n", "v" }, + }, + { + "aA", + function() + -- Pick a prompt using vim.ui.select + local actions = require("CopilotChat.actions") + + -- Pick prompt actions + actions.pick(actions.prompt_actions({}), { + prompt = " Prompts:", + } + ) + end, + desc = "Select action", + mode = { "n", "v" }, + }, + { + "ax", + function() + return require("CopilotChat").reset() + end, + desc = "Clear chat", + mode = { "n", "v" }, + }, + { + "al", + function() + return require("CopilotChat").log_level("debug") + end, + desc = "Set debug level", + }, + } +} diff --git a/config/nvim/lua/aleidk/plugins-ide/color-picker.lua b/config/nvim/lua/aleidk/plugins-ide/color-picker.lua new file mode 100644 index 0000000..626f66f --- /dev/null +++ b/config/nvim/lua/aleidk/plugins-ide/color-picker.lua @@ -0,0 +1,14 @@ +return { + { + -- Color Picker + "uga-rosa/ccc.nvim", + opts = { + auto_enable = true, + lsp = true, + }, + keys = { + { "uc", "CccPick", desc = "Open Color picker" }, + { "uC", "CccHighlighterToggle", desc = "Toggle Color highlight" }, + }, + }, +} diff --git a/config/nvim/lua/aleidk/plugins-ide/completion.lua b/config/nvim/lua/aleidk/plugins-ide/completion.lua new file mode 100644 index 0000000..de47bb6 --- /dev/null +++ b/config/nvim/lua/aleidk/plugins-ide/completion.lua @@ -0,0 +1,109 @@ +return { + "saghen/blink.cmp", + lazy = false, + version = "*", + dependencies = { + "rafamadriz/friendly-snippets", + "giuxtaposition/blink-cmp-copilot", + "folke/lazydev.nvim", + { "saghen/blink.compat", version = "*", }, + }, + opts = function() + local window_options = { + border = "rounded", + winblend = vim.o.pumblend, + } + + ---@module 'blink.cmp' + ---@type blink.cmp.Config + return { + sources = { + providers = { + dadbod = { name = "Dadbod", module = "vim_dadbod_completion.blink" }, + lazydev = { name = "LazyDev", module = "lazydev.integrations.blink" }, + copilot = { + name = "copilot", + module = "blink-cmp-copilot", + score_offset = 5, + enabled = function() + if vim.g.copilot_autocomplete_enabled == nil then + return false + end + return vim.g.copilot_autocomplete_enabled + end, + }, + luasnip = { + name = 'luasnip', + module = 'blink.compat.source', + score_offset = -3, + opts = { + use_show_condition = false, + show_autosnippets = true, + }, + }, + }, + -- nvim-cmp sources + compat = {}, + completion = { + enabled_providers = { + "copilot", + "lsp", + "path", + "snippets", + "buffer", + "dadbod", + "lazydev", + }, + }, + }, + accept = { + auto_brackets = { enabled = true }, + expand_snippet = function(snippet) require('luasnip').lsp_expand(snippet) end, + }, + trigger = { signature_help = { enabled = true } }, + keymap = { + preset = "enter", + [""] = { 'select_next', 'fallback' }, + [""] = { 'select_prev', 'fallback' }, + [""] = { 'scroll_documentation_up', 'fallback' }, + [""] = { 'scroll_documentation_down', 'fallback' }, + }, + highlight = { + -- sets the fallback highlight groups to nvim-cmp's highlight groups + -- useful for when your theme doesn't support blink.cmp + -- will be removed in a future release, assuming themes add support + use_nvim_cmp_as_default = false, + }, + -- set to 'mono' for 'Nerd Font Mono' or 'normal' for 'Nerd Font' + -- adjusts spacing to ensure icons are aligned + nerd_font_variant = "mono", + windows = { + autocomplete = vim.tbl_extend("force", window_options, { + selection = "manual", + ---@type blink.cmp.Draw + draw = { + components = { + kind_icon = { + text = function(ctx) + if ctx.item.source_name == "copilot" then + ctx.kind_icon = require("aleidk.constants").icons.kinds.Copilot + end + + return ctx.kind_icon .. ctx.icon_gap + end, + } + } + } + }), + documentation = vim.tbl_extend("force", window_options, { + auto_show = true, + winblend = 0, + }), + ghost_text = { + enabled = true, + }, + }, + kind_icons = require("aleidk.constants").icons.kinds, + } + end +} diff --git a/chezmoi/dot_config/nvim/lua/aleidk/plugins/database.lua b/config/nvim/lua/aleidk/plugins-ide/database.lua similarity index 94% rename from chezmoi/dot_config/nvim/lua/aleidk/plugins/database.lua rename to config/nvim/lua/aleidk/plugins-ide/database.lua index 941e717..175697b 100644 --- a/chezmoi/dot_config/nvim/lua/aleidk/plugins/database.lua +++ b/config/nvim/lua/aleidk/plugins-ide/database.lua @@ -1,7 +1,7 @@ return { "kristijanhusak/vim-dadbod-ui", dependencies = { - { "tpope/vim-dadbod", lazy = true }, + { "tpope/vim-dadbod", lazy = true }, { "kristijanhusak/vim-dadbod-completion", ft = { "sql", "mysql", "plsql" }, lazy = true }, }, cmd = { diff --git a/config/nvim/lua/aleidk/plugins-ide/doc-gen.lua b/config/nvim/lua/aleidk/plugins-ide/doc-gen.lua new file mode 100644 index 0000000..199ce62 --- /dev/null +++ b/config/nvim/lua/aleidk/plugins-ide/doc-gen.lua @@ -0,0 +1,15 @@ +return { + "danymat/neogen", + opts = { snippet_engine = "luasnip" }, + dependencies = { "nvim-treesitter/nvim-treesitter" }, + version = "*", -- stable releases + keys = { + { + "gcd", + function() + require("neogen").generate() + end, + desc = "Generate comment docstring", + }, + }, +} diff --git a/chezmoi/dot_config/nvim/lua/aleidk/plugins/formatter.lua b/config/nvim/lua/aleidk/plugins-ide/formatter.lua similarity index 85% rename from chezmoi/dot_config/nvim/lua/aleidk/plugins/formatter.lua rename to config/nvim/lua/aleidk/plugins-ide/formatter.lua index 2da9aec..2cab30d 100644 --- a/chezmoi/dot_config/nvim/lua/aleidk/plugins/formatter.lua +++ b/config/nvim/lua/aleidk/plugins-ide/formatter.lua @@ -1,6 +1,7 @@ return { "stevearc/conform.nvim", - event = "VeryLazy", + event = { "BufWritePre" }, + cmd = { "ConformInfo" }, opts = { -- log_level = vim.log.levels.DEBUG, @@ -13,13 +14,13 @@ return { -- have other formatters configured. ["_"] = { "trim_whitespace" }, blade = { "blade-formatter" }, - css = { "prettierd", "prettier" }, + css = { "biome" }, go = { "gofumpt", "goimports_reviser", "golines" }, html = { "djlint", "prettierd", stop_after_first = true }, - javascript = { "prettierd", "prettier", stop_after_first = true }, - javascriptreact = { "prettierd", "prettier", stop_after_first = true }, - json = { "prettierd", "prettier", stop_after_first = true }, - jsonc = { "prettierd", "prettier", stop_after_first = true }, + javascript = { "biome" }, + javascriptreact = { "biome" }, + json = { "biome" }, + jsonc = { "biome" }, lua = { "stylua" }, markdown = { "markdownlint" }, nim = { "nimpretty" }, @@ -27,8 +28,8 @@ return { python = { "ruff_format", "ruff_organize_imports" }, scss = { "prettierd", "prettier", stop_after_first = true }, sh = { "shfmt" }, - typescript = { "prettierd", "prettier", stop_after_first = true }, - typescriptreact = { "prettierd", "prettier", stop_after_first = true }, + typescript = { "biome" }, + typescriptreact = { "biome" }, xml = { "lemminx" }, zsh = { "shfmt" } }, diff --git a/config/nvim/lua/aleidk/plugins-ide/git.lua b/config/nvim/lua/aleidk/plugins-ide/git.lua new file mode 100644 index 0000000..4cc6a38 --- /dev/null +++ b/config/nvim/lua/aleidk/plugins-ide/git.lua @@ -0,0 +1,35 @@ +return { + { + "lewis6991/gitsigns.nvim", + event = { "BufReadPre", "BufNewFile" }, + opts = { + -- See `:help gitsigns.txt` + signs = { + add = { text = "▎" }, + change = { text = "▎" }, + delete = { text = "" }, + topdelete = { text = "" }, + changedelete = { text = "▎" }, + untracked = { text = "▎" }, + }, + on_attach = function(buffer) + local gs = package.loaded.gitsigns + + local function map(mode, l, r, desc) + vim.keymap.set(mode, "g" .. l, r, { buffer = buffer, desc = desc }) + end + + -- stylua: ignore start + map("n", "j", gs.next_hunk, "Next Hunk") + map("n", "k", gs.prev_hunk, "Prev Hunk") + map({ "n", "v" }, "s", ":Gitsigns stage_hunk", "Stage Hunk") + map({ "n", "v" }, "r", ":Gitsigns reset_hunk", "Reset Hunk") + map("n", "u", gs.undo_stage_hunk, "Undo Stage Hunk") + map("n", "R", gs.reset_buffer, "Reset Buffer") + map("n", "", gs.preview_hunk, "Preview Hunk") + map("n", "l", function() gs.blame_line({ full = true }) end, "Blame Line") + map("n", "d", gs.diffthis, "Diff This") + end, + }, + }, +} diff --git a/chezmoi/dot_config/nvim/lua/aleidk/plugins/ts-node-action.lua b/config/nvim/lua/aleidk/plugins-ide/init.lua similarity index 62% rename from chezmoi/dot_config/nvim/lua/aleidk/plugins/ts-node-action.lua rename to config/nvim/lua/aleidk/plugins-ide/init.lua index 1dc970d..286bfc6 100644 --- a/chezmoi/dot_config/nvim/lua/aleidk/plugins/ts-node-action.lua +++ b/config/nvim/lua/aleidk/plugins-ide/init.lua @@ -2,12 +2,10 @@ return { { "ckolkey/ts-node-action", dependencies = { "nvim-treesitter" }, - event = "VeryLazy", - config = function() - require("ts-node-action").setup({}) - - vim.keymap.set({ "n" }, "lA", require("ts-node-action").node_action, { desc = "Node Action" }) - end, + opts = {}, + keys = { + { "ls", function() require("ts-node-action").node_action() end, desc = "Node Action" } + } }, { "Wansmer/treesj", diff --git a/chezmoi/dot_config/nvim/lua/aleidk/plugins/linters.lua b/config/nvim/lua/aleidk/plugins-ide/linters.lua similarity index 81% rename from chezmoi/dot_config/nvim/lua/aleidk/plugins/linters.lua rename to config/nvim/lua/aleidk/plugins-ide/linters.lua index 4ab5fdb..424f370 100644 --- a/chezmoi/dot_config/nvim/lua/aleidk/plugins/linters.lua +++ b/config/nvim/lua/aleidk/plugins-ide/linters.lua @@ -8,10 +8,10 @@ return { lint.linters.gitlint.args = { "--contrib", "contrib-title-conventional-commits", "--msg-filename", "-" } lint.linters_by_ft = { - javascript = { "eslint_d" }, - typescript = { "eslint_d" }, - javascriptreact = { "eslint_d" }, - typescriptreact = { "eslint_d" }, + javascript = { "biomejs" }, + typescript = { "biomejs" }, + javascriptreact = { "biomejs" }, + typescriptreact = { "biomejs" }, -- astro = { "eslint_d" }, python = { "ruff" }, sh = { "shellcheck" }, diff --git a/config/nvim/lua/aleidk/plugins-ide/lsp.lua b/config/nvim/lua/aleidk/plugins-ide/lsp.lua new file mode 100644 index 0000000..fd35eea --- /dev/null +++ b/config/nvim/lua/aleidk/plugins-ide/lsp.lua @@ -0,0 +1,215 @@ +return { + -- LSP Plugins + { + -- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins + -- used for completion, annotations and signatures of Neovim apis + 'folke/lazydev.nvim', + ft = 'lua', + opts = { + library = { + -- Load luvit types when the `vim.uv` word is found + { path = 'luvit-meta/library', words = { 'vim%.uv' } }, + }, + }, + }, + { "Bilal2453/luvit-meta", lazy = true }, -- optional `vim.uv` typings + { + -- LSP Configuration & Plugins + "neovim/nvim-lspconfig", + event = { "BufReadPost", "BufNewFile", "BufWritePre" }, + dependencies = { + -- Automatically install LSPs to stdpath for neovim + { "williamboman/mason.nvim", config = true }, + "williamboman/mason-lspconfig.nvim", + { 'saghen/blink.cmp' } -- autocompletion + }, + + config = function() + -- LSP settings. + local on_attach = function(_, bufnr) + local nmap = function(keys, func, desc) + if desc then + desc = "LSP: " .. desc + end + + vim.keymap.set("n", keys, func, { buffer = bufnr, desc = desc }) + end + + nmap("lr", vim.lsp.buf.rename, "Rename") + -- stylua: ignore + vim.keymap.set({ "n", "x", "v" }, "la", vim.lsp.buf.code_action, { buffer = bufnr, desc = "Code Action" }) + nmap("ld", vim.lsp.buf.type_definition, "Go to type definition") + nmap("lf", function() + vim.lsp.buf.format() + end, "Format") + + nmap("gd", vim.lsp.buf.definition, "Go to definition") + nmap("gr", require("telescope.builtin").lsp_references, "Goto References") + nmap("gI", vim.lsp.buf.implementation, "Go to Implementation") + + -- See `:help K` for why this keymap + nmap("K", vim.lsp.buf.hover, "Hover Documentation") + -- nmap("", vim.lsp.buf.signature_help, "Signature Documentation") + + -- Lesser used LSP functionality + nmap("gD", vim.lsp.buf.declaration, "Goto Declaration") + + nmap("lj", vim.diagnostic.goto_next, "Go to next diagnostic") + nmap("lk", vim.diagnostic.goto_prev, "Go to prev diagnostic") + nmap("lK", function() + -- execute twice to enter the float inmediatly + vim.diagnostic.open_float() + vim.diagnostic.open_float() + end, "Hover current diagnostic") + + -- Create a command `:Format` local to the LSP buffer + vim.api.nvim_buf_create_user_command(bufnr, "Format", function(_) + vim.lsp.buf.format() + end, { desc = "Format current buffer with LSP" }) + end + + -- Enable the following language servers + -- To see options and cofigurations: https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md + local servers = { + astro = {}, + bashls = {}, + cssls = {}, + dockerls = {}, + emmet_ls = { + filetypes = { + "astro", + "css", + "eruby", + "html", + "htmldjango", + "javascriptreact", + "less", + "pug", + "sass", + "scss", + "svelte", + "typescriptreact", + "vue", + "htmlangular", + "php", + "blade" + }, + }, + html = {}, + marksman = {}, + pyright = {}, + phpactor = {}, + gopls = { + settings = { + gopls = { + completeUnimported = true, + usePlaceholders = true, + analyses = { + unusedparams = true, + }, + }, + }, + }, + ruff = {}, + rust_analyzer = { + settings = { + ["rust-analyzer"] = { + imports = { + granularity = { + group = "module", + }, + prefix = "self", + }, + cargo = { + buildScripts = { + enable = true, + }, + }, + procMacro = { + enable = true, + }, + }, + }, + }, + sqlls = {}, + yamlls = {}, + lua_ls = { + settings = { + Lua = { + completion = { + callSnippet = 'Replace', + }, + diagnostics = { disable = { 'missing-fields' } }, + }, + }, + }, + } + + -- nvim-cmp supports additional completion capabilities, so broadcast that to servers + local capabilities = vim.lsp.protocol.make_client_capabilities() + capabilities = require("blink.cmp").get_lsp_capabilities(capabilities) + + -- Ensure the servers above are installed + local mason_lspconfig = require("mason-lspconfig") + + mason_lspconfig.setup({ + ensure_installed = vim.tbl_keys(servers), + automatic_installation = false, + }) + + mason_lspconfig.setup_handlers({ + function(server_name) + local _border = "single" + + local default_config = { + capabilities = capabilities, + on_attach = on_attach, + handlers = { + ["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { + border = _border, + }), + ["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { + border = _border, + max_width = 200, + max_height = 200, + focus = true, + }), + }, + } + + require("lspconfig")[server_name].setup( + vim.tbl_deep_extend("force", default_config, servers[server_name] or {}) + ) + end, + }) + + vim.diagnostic.config({ + update_in_insert = false, + underline = true, + float = { + source = true + }, + virtual_text = { + severity = vim.diagnostic.severity.ERROR, + source = true, + spacing = -1, + prefix = nil, + format = function(diagnostic) + -- show small error code instead of whole error that probably won't fit in the screen + -- to see the whole error use other keybindings + return tostring(diagnostic.code) + end, + virt_text_hide = true + }, + severity_sort = true, + }) + + -- Customize gutter icons + local signs = require("aleidk.constants").icons.diagnostics + for type, icon in pairs(signs) do + local hl = "DiagnosticSign" .. type + vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl }) + end + end, + }, +} diff --git a/chezmoi/dot_config/nvim/lua/aleidk/plugins/luasnip.lua b/config/nvim/lua/aleidk/plugins-ide/luasnip.lua similarity index 100% rename from chezmoi/dot_config/nvim/lua/aleidk/plugins/luasnip.lua rename to config/nvim/lua/aleidk/plugins-ide/luasnip.lua diff --git a/chezmoi/dot_config/nvim/lua/aleidk/plugins/remote-sshfs.lua b/config/nvim/lua/aleidk/plugins-ide/remote-sshfs.lua similarity index 86% rename from chezmoi/dot_config/nvim/lua/aleidk/plugins/remote-sshfs.lua rename to config/nvim/lua/aleidk/plugins-ide/remote-sshfs.lua index d4975cb..c5727cc 100644 --- a/chezmoi/dot_config/nvim/lua/aleidk/plugins/remote-sshfs.lua +++ b/config/nvim/lua/aleidk/plugins-ide/remote-sshfs.lua @@ -1,6 +1,7 @@ return { "nosduco/remote-sshfs.nvim", dependencies = { "nvim-telescope/telescope.nvim" }, + cmd = { "RemoteSSHFSConnect" }, config = function() require("remote-sshfs").setup({}) require("telescope").load_extension("remote-sshfs") diff --git a/chezmoi/dot_config/nvim/lua/aleidk/plugins/task-runner.lua b/config/nvim/lua/aleidk/plugins-ide/task-runner.lua similarity index 81% rename from chezmoi/dot_config/nvim/lua/aleidk/plugins/task-runner.lua rename to config/nvim/lua/aleidk/plugins-ide/task-runner.lua index 97b9d26..3af9f6d 100644 --- a/chezmoi/dot_config/nvim/lua/aleidk/plugins/task-runner.lua +++ b/config/nvim/lua/aleidk/plugins-ide/task-runner.lua @@ -19,13 +19,11 @@ local scroll_to_end = function(winid) winid = winid or 0 local bufnr = vim.api.nvim_win_get_buf(winid) local lnum = vim.api.nvim_buf_line_count(bufnr) - local last_line = vim.api.nvim_buf_get_lines(bufnr, -2, -1, true)[1] -- Hack: terminal buffers add a bunch of empty lines at the end. We need to ignore them so that -- we don't end up scrolling off the end of the useful output. local not_much_output = lnum < vim.o.lines + 6 if vim.bo[bufnr].buftype == "terminal" and not_much_output then lnum = term_get_effective_line_count(bufnr) - last_line = vim.api.nvim_buf_get_lines(bufnr, lnum - 1, lnum, true)[1] end local scrolloff = vim.api.nvim_get_option_value("scrolloff", { scope = "local", win = winid }) vim.api.nvim_set_option_value("scrolloff", 0, { scope = "local", win = winid }) @@ -57,22 +55,22 @@ end return { "stevearc/overseer.nvim", keys = { - { "pO", "OverseerQuickAction hsplit", desc = "Open task in a hsplit" }, + { "pO", "OverseerQuickAction hsplit", desc = "Open task in a hsplit" }, { "pQ", "OverseerQuickAction close winOverseerQuickAction dispose", desc = "Close and dispose task's windows", }, - { "pW", "OverseerQuickAction unwatch", desc = "Unwatch task" }, + { "pW", "OverseerQuickAction unwatch", desc = "Unwatch task" }, { "pf", "OverseerQuickAction open float", desc = "Open task in a float window" }, - { "pl", "OverseerLoadBundle", desc = "Load tasks" }, - { "pm", "OverseerTaskAction", desc = "Manage task" }, - { "po", "OverseerQuickAction vsplit", desc = "Open task in a vsplit" }, - { "pp", "OverseerRun", desc = "Run task" }, - { "pq", "OverseerQuickAction close win", desc = "Close task's windows" }, - { "ps", "OverseerSaveBundle", desc = "Save tasks" }, - { "pt", "OverseerToggle", desc = "Toggle tasks list" }, - { "pw", "OverseerQuickAction watch", desc = "Watch task" }, + { "pl", "OverseerLoadBundle", desc = "Load tasks" }, + { "pm", "OverseerTaskAction", desc = "Manage task" }, + { "po", "OverseerQuickAction vsplit", desc = "Open task in a vsplit" }, + { "pp", "OverseerRun", desc = "Run task" }, + { "pq", "OverseerQuickAction close win", desc = "Close task's windows" }, + { "ps", "OverseerSaveBundle", desc = "Save tasks" }, + { "pt", "OverseerToggle", desc = "Toggle tasks list" }, + { "pw", "OverseerQuickAction watch", desc = "Watch task" }, }, opts = { actions = { diff --git a/config/nvim/lua/aleidk/plugins-ide/trouble.lua b/config/nvim/lua/aleidk/plugins-ide/trouble.lua new file mode 100644 index 0000000..8b31a1c --- /dev/null +++ b/config/nvim/lua/aleidk/plugins-ide/trouble.lua @@ -0,0 +1,80 @@ +return { + "folke/trouble.nvim", + dependencies = { "nvim-tree/nvim-web-devicons" }, + cmd = { "Trouble" }, + keys = { + { + "fD", + "Trouble diagnostics open", + desc = "Find diagnostics (Trouble)", + }, + { + "fd", + "Trouble diagnostics open filter.buf=0", + desc = "Find buffer diagnostics (Trouble)", + }, + { + "ll", + "Trouble symbols open", + desc = "Symbols (Trouble)", + }, + { + "li", + "Trouble lsp open", + desc = "LSP info of node (Trouble)", + }, + { + "fq", + "Trouble qflist open", + desc = "Quickfix List (Trouble)", + }, + }, + opts = function() + ---@type trouble.Window.opts + local win_opts = { + -- size = { width = 30, height = 0.5 }, + minimal = true, + border = "rounded", + position = "bottom", + } + + ---@type trouble.Config + return { + focus = false, + + ---@type trouble.Window.opts + preview = { + type = "split", + relative = "win", + position = "top", + }, + + ---@type table + keys = { + [""] = "jump_close", + ["<2-leftmouse>"] = "jump_close", + [""] = "jump_split_close", + [""] = "jump_vsplit_close", + ["v"] = "jump_split_close", + ["s"] = "jump_vsplit_close", + [""] = "cancel", -- hack to fool myself into thinking I move to the avobe window + }, + win = win_opts, + ---@type table + modes = { + symbols = { + focus = true, + win = win_opts + }, + lsp_references = { + focus = true, + win = win_opts + }, + lsp = { + focus = true, + win = win_opts + }, + } + } + end +} diff --git a/config/nvim/lua/aleidk/plugins-ide/typescript-tools.lua b/config/nvim/lua/aleidk/plugins-ide/typescript-tools.lua new file mode 100644 index 0000000..7f106b0 --- /dev/null +++ b/config/nvim/lua/aleidk/plugins-ide/typescript-tools.lua @@ -0,0 +1,18 @@ +return { + "pmizio/typescript-tools.nvim", + dependencies = { "nvim-lua/plenary.nvim", "neovim/nvim-lspconfig" }, + opts = { + init_options = { + preferences = { + disableSuggestions = true, + }, + }, + settings = { + -- array of strings("fix_all"|"add_missing_imports"|"remove_unused"| + -- "remove_unused_imports"|"organize_imports") -- or string "all" + -- to include all supported code actions + -- specify commands exposed as code_actions + expose_as_code_action = "all", + }, + }, +} diff --git a/config/nvim/lua/aleidk/utils.lua b/config/nvim/lua/aleidk/utils.lua new file mode 100644 index 0000000..96d3f8f --- /dev/null +++ b/config/nvim/lua/aleidk/utils.lua @@ -0,0 +1,7 @@ +local M = {} + +function M.plugin_should_be_enabled() + print("Plugin should be enabled") +end + +return M diff --git a/chezmoi/dot_config/sesh/sesh.toml b/config/sesh/sesh.toml similarity index 87% rename from chezmoi/dot_config/sesh/sesh.toml rename to config/sesh/sesh.toml index 23c1186..5ae5bbe 100644 --- a/chezmoi/dot_config/sesh/sesh.toml +++ b/config/sesh/sesh.toml @@ -5,7 +5,7 @@ startup_command = "ls" [[session]] name = "Dotfiles" -path = "~/.local/share/chezmoi/" +path = "~/Repos/Private/dots" startup_command = "nvim -c ':Telescope find_files'" [[session]] diff --git a/config/starship.toml b/config/starship.toml new file mode 100644 index 0000000..cf03107 --- /dev/null +++ b/config/starship.toml @@ -0,0 +1,70 @@ +# Get editor completions based on the config schema +"$schema" = 'https://starship.rs/config-schema.json' + +palette = "catppuccin_macchiato" + +format = "$directory\n$container$character" +right_format = "$all" + +# Inserts a blank line between shell prompts +add_newline = false + +[character] # The name of the module we are configuring is 'character' +success_symbol = '[➜](bold green)' +error_symbol = '[➜](bold red)' + +[container] +symbol = "󰆧" +style = 'mauve' +format = '[$symbol \[$name\]]($style) ' + +[git_branch] +symbol = "󰘬 " +format = '[$symbol$branch(:$remote_branch)]($style) ' + +[git_status] +style = '' +format = '([\[${all_status}${ahead_behind}\]]($style))' + +conflicted = ' ' +ahead = ' ' +behind = ' ' +diverged = ' ' +up_to_date = '[ ](green)' +untracked = ' ' +stashed = '󰮄 ' +modified = '[ \($count\)](peach) ' +staged = '[ \($count\)](green) ' +renamed = ' ' +deleted = '[ \($count\)](red) ' + +[golang] +symbol = " " + +[palettes.catppuccin_macchiato] +rosewater = "#f4dbd6" +flamingo = "#f0c6c6" +pink = "#f5bde6" +mauve = "#c6a0f6" +red = "#ed8796" +maroon = "#ee99a0" +peach = "#f5a97f" +yellow = "#eed49f" +green = "#a6da95" +teal = "#8bd5ca" +sky = "#91d7e3" +sapphire = "#7dc4e4" +blue = "#8aadf4" +lavender = "#b7bdf8" +text = "#cad3f5" +subtext1 = "#b8c0e0" +subtext0 = "#a5adcb" +overlay2 = "#939ab7" +overlay1 = "#8087a2" +overlay0 = "#6e738d" +surface2 = "#5b6078" +surface1 = "#494d64" +surface0 = "#363a4f" +base = "#24273a" +mantle = "#1e2030" +crust = "#181926" diff --git a/chezmoi/dot_config/tmux/tmux.conf b/config/tmux/tmux.conf similarity index 97% rename from chezmoi/dot_config/tmux/tmux.conf rename to config/tmux/tmux.conf index c24df25..deca653 100644 --- a/chezmoi/dot_config/tmux/tmux.conf +++ b/config/tmux/tmux.conf @@ -174,7 +174,8 @@ set -g @popup-id-format '#{b:socket_path}/#{session_name}/#{b:pane_current_path} # Use this to open specific programs in floating panes bind C-p run "#{@popup-toggle}" -bind C-o run "#{@popup-toggle} -Ed'#{pane_current_path}' -w90% -h90% --name=tool fzf-tmux-tools-popup" +bind C-g run "#{@popup-toggle} -Ed'#{pane_current_path}' -w90% -h90% --name=lazygit lazygit" +bind C-o run "#{@popup-toggle} -Ed'#{pane_current_path}' -w90% -h90% --name=tool $HOME/Repos/Private/dots/scripts/fzf-tmux-tools-popup" bind C-w run "#{@popup-toggle} -Ed'#{pane_current_path}' -w90% -h90% --name=wiki fzf-wikis" bind C-z run "#{@popup-toggle} -Ed'#{pane_current_path}' -w90% -h90% --name=wiki fzf-wikis void" @@ -188,7 +189,7 @@ TMUX_FZF_LAUNCH_KEY="w" TMUX_FZF_OPTIONS="-p -w 80% -h 60% -m" # Tmux Management -bind-key "f" run-shell "~/.local/share/chezmoi/scripts/fzf-tmux-sessions" +bind-key "f" run-shell "~/Repos/Private/dots/scripts/fzf-tmux-sessions" bind-key "F" run-shell -b "$HOME/.config/tmux/plugins/tmux-fzf/scripts/session.sh switch" # bind-key "F" run-shell -b "$HOME/.config/tmux/plugins/tmux-fzf/scripts/window.sh switch" diff --git a/chezmoi/dot_config/vimiv/keys.conf b/config/vimiv/keys.conf similarity index 100% rename from chezmoi/dot_config/vimiv/keys.conf rename to config/vimiv/keys.conf diff --git a/chezmoi/dot_config/vimiv/styles/default b/config/vimiv/styles/default similarity index 100% rename from chezmoi/dot_config/vimiv/styles/default rename to config/vimiv/styles/default diff --git a/chezmoi/dot_config/vimiv/styles/material-darker b/config/vimiv/styles/material-darker similarity index 100% rename from chezmoi/dot_config/vimiv/styles/material-darker rename to config/vimiv/styles/material-darker diff --git a/chezmoi/dot_config/vimiv/vimiv.conf b/config/vimiv/vimiv.conf similarity index 100% rename from chezmoi/dot_config/vimiv/vimiv.conf rename to config/vimiv/vimiv.conf diff --git a/chezmoi/dot_config/wezterm/wezterm.lua b/config/wezterm/wezterm.lua similarity index 100% rename from chezmoi/dot_config/wezterm/wezterm.lua rename to config/wezterm/wezterm.lua diff --git a/chezmoi/dot_config/yazi/init.lua b/config/yazi/init.lua similarity index 100% rename from chezmoi/dot_config/yazi/init.lua rename to config/yazi/init.lua diff --git a/chezmoi/dot_config/yazi/keymap.toml b/config/yazi/keymap.toml similarity index 97% rename from chezmoi/dot_config/yazi/keymap.toml rename to config/yazi/keymap.toml index 6e42a49..8b24d00 100644 --- a/chezmoi/dot_config/yazi/keymap.toml +++ b/config/yazi/keymap.toml @@ -45,7 +45,7 @@ keymap = [ { on = ["J"], run = "seek 5", desc = "Seek down 5 units in the preview" }, # Selection - { on = [ "" ], run = [ "select --state=none", "arrow 1" ], desc = "Toggle the current selection state" }, + { on = [ "" ], run = [ "select", "arrow 1" ], desc = "Toggle the current selection state" }, { on = [ "v" ], run = "visual_mode", desc = "Enter visual mode (selection mode)" }, { on = [ "V" ], run = "visual_mode --unset", desc = "Enter visual mode (unset mode)" }, { on = [ "" ], run = "select_all --state=true", desc = "Select all files" }, @@ -98,10 +98,10 @@ keymap = [ { on = [ "N" ], run = "find_arrow --previous", desc = "Go to previous found file" }, # Sorting - { on = [ ",", "m" ], run = "sort modified --reverse=no", desc = "Sort by modified time" }, - { on = [ ",", "M" ], run = "sort modified --reverse", desc = "Sort by modified time (reverse)" }, - { on = [ ",", "c" ], run = "sort created --reverse=no", desc = "Sort by created time" }, - { on = [ ",", "C" ], run = "sort created --reverse", desc = "Sort by created time (reverse)" }, + { on = [ ",", "m" ], run = "sort mtime --reverse=no", desc = "Sort by modified time" }, + { on = [ ",", "M" ], run = "sort mtime --reverse", desc = "Sort by modified time (reverse)" }, + { on = [ ",", "c" ], run = "sort btime --reverse=no", desc = "Sort by created time" }, + { on = [ ",", "C" ], run = "sort btime --reverse", desc = "Sort by created time (reverse)" }, { on = [ ",", "e" ], run = "sort extension --reverse=no", desc = "Sort by extension" }, { on = [ ",", "E" ], run = "sort extension --reverse", desc = "Sort by extension (reverse)" }, { on = [ ",", "a" ], run = "sort alphabetical --reverse=no", desc = "Sort alphabetically" }, @@ -162,7 +162,7 @@ keymap = [ { on = [ "~" ], run = "help", desc = "Open help" } ] -[select] +[pick] keymap = [ { on = [ "" ], run = "close", desc = "Cancel selection" }, diff --git a/config/yazi/package.toml b/config/yazi/package.toml new file mode 100644 index 0000000..eae27af --- /dev/null +++ b/config/yazi/package.toml @@ -0,0 +1,5 @@ +[plugin] +deps = [{ use = "yazi-rs/plugins:full-border", rev = "4a6edc3" }] + +[flavor] +deps = [{ use = "yazi-rs/flavors:catppuccin-macchiato", rev = "4a3082f" }] diff --git a/chezmoi/dot_config/sway/themes/catppuccin/.keep b/config/yazi/plugins/.keep similarity index 100% rename from chezmoi/dot_config/sway/themes/catppuccin/.keep rename to config/yazi/plugins/.keep diff --git a/chezmoi/dot_config/yazi/theme.toml b/config/yazi/theme.toml similarity index 100% rename from chezmoi/dot_config/yazi/theme.toml rename to config/yazi/theme.toml diff --git a/chezmoi/dot_config/yazi/yazi.toml b/config/yazi/yazi.toml similarity index 99% rename from chezmoi/dot_config/yazi/yazi.toml rename to config/yazi/yazi.toml index 8eb7d53..e80d3fe 100644 --- a/chezmoi/dot_config/yazi/yazi.toml +++ b/config/yazi/yazi.toml @@ -139,7 +139,7 @@ cd_origin = "top-center" cd_offset = [ 0, 2, 50, 3 ] # create -create_title = "Create:" +create_title = "Create:" create_origin = "hovered" create_offset = [ 0, 1, 50, 3 ] @@ -188,7 +188,7 @@ quit_title = "{n} task{s} running, sure to quit? (y/N)" quit_origin = "center" quit_offset = [ 0, 2, 50, 3 ] -[select] +[pick] open_title = "Open with:" open_origin = "hovered" open_offset = [ 0, 1, 50, 7 ] diff --git a/chezmoi/dot_config/zed/keymap.json b/config/zed/keymap.json similarity index 100% rename from chezmoi/dot_config/zed/keymap.json rename to config/zed/keymap.json diff --git a/chezmoi/dot_config/zed/private_settings.json b/config/zed/private_settings.json similarity index 100% rename from chezmoi/dot_config/zed/private_settings.json rename to config/zed/private_settings.json diff --git a/chezmoi/dot_config/yazi/plugins/.keep b/config/zed/themes/.keep similarity index 100% rename from chezmoi/dot_config/yazi/plugins/.keep rename to config/zed/themes/.keep diff --git a/chezmoi/dot_config/zellij/config.kdl b/config/zellij/config.kdl similarity index 100% rename from chezmoi/dot_config/zellij/config.kdl rename to config/zellij/config.kdl diff --git a/chezmoi/dot_config/zellij/themes/catppuccin.kdl b/config/zellij/themes/catppuccin.kdl similarity index 100% rename from chezmoi/dot_config/zellij/themes/catppuccin.kdl rename to config/zellij/themes/catppuccin.kdl diff --git a/chezmoi/dot_config/zsh/aliases/aliases.zsh b/config/zsh/aliases/aliases.zsh similarity index 95% rename from chezmoi/dot_config/zsh/aliases/aliases.zsh rename to config/zsh/aliases/aliases.zsh index d0b7088..4f0a39a 100644 --- a/chezmoi/dot_config/zsh/aliases/aliases.zsh +++ b/config/zsh/aliases/aliases.zsh @@ -45,6 +45,7 @@ alias \ pps="podman ps --format 'table {{.ID}}\t{{.Names}}\t{{.State}}\t{{.Status}}\t{{.RunningFor}}'" alias tm="fzf-tmux-sessions" +alias tmux="tmux -L $(hostname)" # allow to seamlessly create new servers inside containers # Misc alias \ diff --git a/chezmoi/dot_config/zsh/aliases/configs.zsh b/config/zsh/aliases/configs.zsh similarity index 100% rename from chezmoi/dot_config/zsh/aliases/configs.zsh rename to config/zsh/aliases/configs.zsh diff --git a/chezmoi/dot_config/zsh/aliases/fzf.zsh b/config/zsh/aliases/fzf.zsh similarity index 100% rename from chezmoi/dot_config/zsh/aliases/fzf.zsh rename to config/zsh/aliases/fzf.zsh diff --git a/chezmoi/dot_config/zsh/aliases/nvim.zsh b/config/zsh/aliases/nvim.zsh similarity index 100% rename from chezmoi/dot_config/zsh/aliases/nvim.zsh rename to config/zsh/aliases/nvim.zsh diff --git a/chezmoi/dot_config/zsh/aliases/pnpm.zsh b/config/zsh/aliases/pnpm.zsh similarity index 100% rename from chezmoi/dot_config/zsh/aliases/pnpm.zsh rename to config/zsh/aliases/pnpm.zsh diff --git a/chezmoi/dot_config/zsh/completions/_alacritty b/config/zsh/completions/_alacritty similarity index 100% rename from chezmoi/dot_config/zsh/completions/_alacritty rename to config/zsh/completions/_alacritty diff --git a/chezmoi/dot_config/zsh/completions/_cargo b/config/zsh/completions/_cargo similarity index 100% rename from chezmoi/dot_config/zsh/completions/_cargo rename to config/zsh/completions/_cargo diff --git a/chezmoi/dot_config/zsh/completions/_chezmoi b/config/zsh/completions/_chezmoi similarity index 100% rename from chezmoi/dot_config/zsh/completions/_chezmoi rename to config/zsh/completions/_chezmoi diff --git a/chezmoi/dot_config/zsh/completions/_cht b/config/zsh/completions/_cht similarity index 100% rename from chezmoi/dot_config/zsh/completions/_cht rename to config/zsh/completions/_cht diff --git a/chezmoi/dot_config/zsh/completions/_globdots b/config/zsh/completions/_globdots similarity index 100% rename from chezmoi/dot_config/zsh/completions/_globdots rename to config/zsh/completions/_globdots diff --git a/chezmoi/dot_config/zsh/completions/_lsd b/config/zsh/completions/_lsd similarity index 100% rename from chezmoi/dot_config/zsh/completions/_lsd rename to config/zsh/completions/_lsd diff --git a/chezmoi/dot_config/zsh/completions/_rg b/config/zsh/completions/_rg similarity index 100% rename from chezmoi/dot_config/zsh/completions/_rg rename to config/zsh/completions/_rg diff --git a/chezmoi/dot_config/zsh/completions/_rtx b/config/zsh/completions/_rtx similarity index 100% rename from chezmoi/dot_config/zsh/completions/_rtx rename to config/zsh/completions/_rtx diff --git a/chezmoi/dot_config/zsh/completions/_rye b/config/zsh/completions/_rye similarity index 100% rename from chezmoi/dot_config/zsh/completions/_rye rename to config/zsh/completions/_rye diff --git a/chezmoi/dot_config/zsh/completions/_starship b/config/zsh/completions/_starship similarity index 100% rename from chezmoi/dot_config/zsh/completions/_starship rename to config/zsh/completions/_starship diff --git a/chezmoi/dot_config/zsh/completions/_tea b/config/zsh/completions/_tea similarity index 100% rename from chezmoi/dot_config/zsh/completions/_tea rename to config/zsh/completions/_tea diff --git a/chezmoi/dot_config/zsh/completions/_tldr b/config/zsh/completions/_tldr similarity index 100% rename from chezmoi/dot_config/zsh/completions/_tldr rename to config/zsh/completions/_tldr diff --git a/chezmoi/dot_config/zsh/completions/_zellij b/config/zsh/completions/_zellij similarity index 100% rename from chezmoi/dot_config/zsh/completions/_zellij rename to config/zsh/completions/_zellij diff --git a/chezmoi/dot_config/zsh/functions/fedora.zsh b/config/zsh/functions/fedora.zsh similarity index 100% rename from chezmoi/dot_config/zsh/functions/fedora.zsh rename to config/zsh/functions/fedora.zsh diff --git a/chezmoi/dot_config/zsh/functions/flatpak.zsh b/config/zsh/functions/flatpak.zsh similarity index 100% rename from chezmoi/dot_config/zsh/functions/flatpak.zsh rename to config/zsh/functions/flatpak.zsh diff --git a/chezmoi/dot_config/zsh/functions/functions.zsh b/config/zsh/functions/functions.zsh similarity index 100% rename from chezmoi/dot_config/zsh/functions/functions.zsh rename to config/zsh/functions/functions.zsh diff --git a/chezmoi/executable_dot_zprofile.tmpl b/config/zsh/zprofile similarity index 71% rename from chezmoi/executable_dot_zprofile.tmpl rename to config/zsh/zprofile index c4db92a..ebeea46 100644 --- a/chezmoi/executable_dot_zprofile.tmpl +++ b/config/zsh/zprofile @@ -5,38 +5,46 @@ update_path() { } # Set manually -export DOTS="$HOME/.local/share/chezmoi" +export REPOS="$HOME/.local/share/chezmoi" +export DOTS="$REPOS/Private/dots" export EDITOR=nvim export VISUAL="$EDITOR" export QT_STYLE_OVERRIDE=kvantum export MOZ_ENABLE_WAYLAND=1 -export OPENAI_API_KEY="{{ .openAIKey }}" + +update_path "$DOTS/scripts" +update_path "$HOME/.local/bin" +update_path "$HOME/bin" +update_path "/usr/local/bin" # Dev Stuff +{{ #if (is_executable "npm") }} export NPM_PACKAGES="$HOME/.npm-packages" export NODE_PATH="$NPM_PACKAGES/lib/node_modules${NODE_PATH:+:$NODE_PATH}" -export PNPM_HOME="$HOME/.local/share/pnpm" -export ESLINT_USE_FLAT_CONFIG=true -. "$HOME/.cargo/env" -source "$HOME/.rye/env" # Unset manpath so we can inherit from /etc/manpath via the `manpath` # command unset MANPATH # delete if you already modified MANPATH elsewhere in your config export MANPATH="$NPM_PACKAGES/share/man:$(manpath)" -# PATH -update_path "/usr/local/bin" -update_path "$HOME/.local/bin" -update_path "$HOME/.cargo/bin/" -update_path "$HOME/.spicetify" -update_path "$DOTS/scripts" -update_path "$HOME/bin" update_path "$NPM_PACKAGES/bin" -update_path "$PNPM_HOME" -update_path "$HOME/.local/share/rtx/shims" -update_path "$HOME/.spicetify" +{{ /if }} -if [[ $OSTYPE =~ 'darwin' ]]; then - eval "$(/opt/homebrew/bin/brew shellenv)" -fi +{{ #if (is_executable "pnpm") }} +export PNPM_HOME="$HOME/.local/share/pnpm" +export ESLINT_USE_FLAT_CONFIG=true +update_path "$PNPM_HOME" +{{ /if }} + +{{ #if (is_executable "rye") }} +source "$HOME/.rye/env" +{{ /if }} + +{{ #if (is_executable "cargo") }} +. "$HOME/.cargo/env" +update_path "$HOME/.cargo/bin/" +{{ /if }} + +{{~ #if (eq (env_var "OS") "macos") }} +eval "$(/opt/homebrew/bin/brew shellenv)" +{{ /if ~}} diff --git a/chezmoi/executable_dot_zshrc b/config/zsh/zshrc similarity index 78% rename from chezmoi/executable_dot_zshrc rename to config/zsh/zshrc index 75a2f88..33e96a1 100644 --- a/chezmoi/executable_dot_zshrc +++ b/config/zsh/zshrc @@ -9,6 +9,10 @@ # Set the directory we want to store zinit and plugins ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit" +# Auto install zinit +[ ! -d $ZINIT_HOME ] && mkdir -p "$(dirname $ZINIT_HOME)" +[ ! -d $ZINIT_HOME/.git ] && git clone https://github.com/zdharma-continuum/zinit.git "$ZINIT_HOME" + # Source/Load zinit, installation is handle by chezmoi external script source "${ZINIT_HOME}/zinit.zsh" @@ -22,7 +26,10 @@ zinit snippet "https://raw.githubusercontent.com/catppuccin/zsh-syntax-highlight zinit light zsh-users/zsh-syntax-highlighting zinit light zsh-users/zsh-completions zinit light zsh-users/zsh-autosuggestions + +{{ #if dotter.packages.fzf }} zinit light Aloxaf/fzf-tab +{{ /if }} # ╭──────────────────────────────────────────────────────────╮ # │ Oh My Zsh snippets │ @@ -111,10 +118,48 @@ setopt hist_find_no_dups # case insensitive completion zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}' zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}" -zstyle ':completion:*' menu no -zstyle ':fzf-tab:complete:cd:*' fzf-preview 'ls --color $realpath' -zstyle ':fzf-tab:complete:__zoxide_z:*' fzf-preview 'ls --color $realpath' +{{ #if dotter.packages.fzf }} + +zstyle ':completion:*' menu no +zstyle ':fzf-tab:*' show-group full +zstyle ':fzf-tab:*' continuous-trigger '/' +zstyle ':fzf-tab:*' fzf-flags --height=10% --layout=reverse --info=inline --ansi -i --preview-window=right:60%:wrap + +# ── Previewers ─────────────────────────────────────────────────────── + +# Directories +zstyle ':fzf-tab:complete:__zoxide_z:*' fzf-preview \ + 'eza -lha --color=always --icons --git --no-permissions --tree --level 3 --group-directories-first --total-size $realpath' +zstyle ':fzf-tab:complete:cd:*' fzf-preview \ + 'eza -lha --color=always --icons --git --no-permissions --tree --level 3 --group-directories-first --total-size $realpath' + +# systemctl +zstyle ':fzf-tab:complete:systemctl-*:*' fzf-preview 'SYSTEMD_COLORS=1 systemctl status $word' + +# git +zstyle ':fzf-tab:complete:git-(add|diff|restore):*' fzf-preview \ + 'git diff $word | bat -plman --color=always' +zstyle ':fzf-tab:complete:git-log:*' fzf-preview \ + 'git log --decorate --graph --color=always $word' +zstyle ':fzf-tab:complete:git-help:*' fzf-preview \ + 'git help $word | bat -plman --color=always' +zstyle ':fzf-tab:complete:git-show:*' fzf-preview \ + 'case "$group" in + "commit tag") git show --color=always $word ;; + *) git show --color=always $word | bat -plman --color=always ;; + esac' +zstyle ':fzf-tab:complete:git-checkout:*' fzf-preview \ + 'case "$group" in + "modified file") git diff $word | bat -plman --color=always ;; + "recent commit object name") git show --color=always $word | bat -plman --color=always ;; + *) git log --decorate --graph --color=always $word ;; + esac' + +# TLDR + zstyle ':fzf-tab:complete:tldr:argument-1' fzf-preview 'tldr --color always $word' + +{{ /if }} # ╭──────────────────────────────────────────────────────────╮ # │ ZSH Options │ @@ -126,7 +171,10 @@ setopt GLOB_DOTS # ╭──────────────────────────────────────────────────────────╮ # │ Source other files │ # ╰──────────────────────────────────────────────────────────╯ + +{{ #if dotter.packages.fzf }} source $HOME/.config/fzf/fzfrc +{{ /if }} # this prevents errors and not loading some files for file in $HOME/.config/zsh/**/*.zsh; do @@ -136,7 +184,19 @@ done # ╭──────────────────────────────────────────────────────────╮ # │ Init external programs │ # ╰──────────────────────────────────────────────────────────╯ + +{{ #if dotter.packages.fzf }} eval "$(fzf --zsh)" +{{ /if ~}} + +{{ #if (is_executable "zoxide") }} eval "$(zoxide init --cmd cd zsh)" +{{ /if ~}} + +{{ #if dotter.packages.starship }} eval "$(starship init zsh)" +{{ /if ~}} + +{{ #if dotter.packages.mise }} eval "$(mise activate zsh)" +{{ /if ~}} diff --git a/exports/Gnome Extensions b/exports/Gnome Extensions deleted file mode 100644 index 26b4723..0000000 --- a/exports/Gnome Extensions +++ /dev/null @@ -1 +0,0 @@ -{"extensions":{"vertical-workspaces@G-dH.github.com":{"/org/gnome/shell/extensions/vertical-workspaces/":"[/]\ncenter-app-grid=true\ncenter-dash-to-ws=false\ncenter-search=true\ndash-position=0\nfix-ubuntu-dock=true\noverview-bg-blur-sigma=20\noverview-mode=0\nshow-bg-in-overview=false\nshow-search-entry=true\nshow-ws-preview-bg=true\nshow-ws-switcher-bg=false\nshow-wst-labels=0\nstartup-state=1\nworkspace-animation=0\nws-thumbnails-position=2"},"easy_docker_containers@red.software.systems":{"/red/software/systems/easy_docker_containers/":""},"user-theme@gnome-shell-extensions.gcampax.github.com":{"/org/gnome/shell/extensions/user-theme/":"[/]\nname='Catppuccin-Macchiato-Standard-Teal-Dark'"},"gnome-shell-go-to-last-workspace@github.com":{"/org/gnome/shell/extensions/go-to-last-workspace/":"[/]\nshortcut-key=['bar']"},"widgets@aylur":{"/org/gnome/shell/extensions/aylurs-widgets/":"[/]\nbackground-clock=false\nbattery-bar=false\ndash-app-icon-size=46\ndash-apps-cols=5\ndash-apps-rows=5\ndash-board=true\ndash-button-enable=true\ndash-button-label=''\ndash-button-show-icon=false\ndash-hide-activities=true\ndash-layout=0\ndash-levels-show-battery=false\ndash-levels-show-storage=false\ndash-link-names=['reddit', 'youtube', 'gmail', 'twitter', 'github']\ndash-link-urls=['https://www.reddit.com/', 'https://www.youtube.com/', 'https://www.gmail.com/', 'https://twitter.com/', 'https://www.github.com/']\ndash-shortcut=['Escape']\ndate-menu-date-format='%I:%M - %d de %b'\ndate-menu-hide-notifications=true\ndate-menu-hide-stock-mpris=true\ndate-menu-indicator-position=2\ndate-menu-mirror=false\ndate-menu-offset=0\ndate-menu-position=1\ndate-menu-remove-padding=true\ndate-menu-show-clocks=false\ndate-menu-show-media=false\ndate-menu-show-system-levels=false\ndate-menu-show-user=false\ndate-menu-show-weather=false\ndate-menu-tweaks=true\nmedia-player-cover-height=70\nmedia-player-cover-width=70\nmedia-player-enable-controls=false\nmedia-player-enable-track=true\nmedia-player-offset=1\nmedia-player-position=1\nmedia-player-show-volume=false\nmedia-player-style=2\nnotification-indicator=false\npower-menu=false\nquick-settings-adjust-roundness=true\nquick-settings-show-media=false\nquick-settings-show-notifications=true\nquick-settings-show-system-levels=false\nquick-settings-style=2\nworkspace-indicator-offset=2\nworkspace-indicator-show-names=false"},"floating-panel@aylur":{}},"keybindings":{"/org/gnome/mutter/keybindings/":"","/org/gnome/mutter/wayland/keybindings/":"","/org/gnome/shell/keybindings/":"","/org/gnome/desktop/wm/keybindings/":"[/]\nalways-on-top=['t']\nclose=['F4', 'q']\nminimize=['z']\nmove-to-workspace-1=['1']\nmove-to-workspace-10=['0']\nmove-to-workspace-11=@as []\nmove-to-workspace-2=['2']\nmove-to-workspace-3=['3']\nmove-to-workspace-4=['4']\nmove-to-workspace-5=['5']\nmove-to-workspace-6=['6']\nmove-to-workspace-7=['7']\nmove-to-workspace-8=['8']\nmove-to-workspace-9=['9']\nswitch-applications=@as []\nswitch-applications-backward=@as []\nswitch-group=@as []\nswitch-group-backward=@as []\nswitch-to-workspace-1=['1']\nswitch-to-workspace-10=['0']\nswitch-to-workspace-2=['2']\nswitch-to-workspace-3=['3']\nswitch-to-workspace-4=['4']\nswitch-to-workspace-5=['5']\nswitch-to-workspace-6=['6']\nswitch-to-workspace-7=['7']\nswitch-to-workspace-8=['8']\nswitch-to-workspace-9=['9']\nswitch-to-workspace-down=['Down', 'KP_Down', 'u']\nswitch-to-workspace-up=['Up', 'KP_Up', 'i']\nswitch-windows=['Tab']\nswitch-windows-backward=['Tab']\ntoggle-on-all-workspaces=['p']","/org/gnome/settings-daemon/plugins/media-keys/":"[/]\ncustom-keybindings=['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/']\nemail=@as []\nhelp=@as []\nhome=@as []\nwww=@as []\n\n[custom-keybindings/custom0]\nbinding='Return'\ncommand='gnome-terminal'\nname='Launch Terminal'"},"tweaks":{"/org/gnome/desktop/background/":"","/org/gnome/desktop/calendar/":"","/org/gnome/desktop/input-sources/":"[/]\nshow-all-sources=false\nsources=[('xkb', 'latam')]\nxkb-options=@as []","/org/gnome/desktop/interface/":"[/]\ncolor-scheme='prefer-dark'\ncursor-size=32\ncursor-theme='Catppuccin-Macchiato-Teal-Cursors'\nenable-animations=true\nfont-antialiasing='grayscale'\nfont-hinting='slight'\ngtk-theme='Catppuccin-Macchiato-Standard-Teal-Dark'\nicon-theme='Papirus-Dark'\ntoolkit-accessibility=false","/org/gnome/desktop/peripherals/":"[keyboard]\nnumlock-state=true\nremember-numlock-state=true\n\n[mouse]\nspeed=0.68141592920353977\n\n[touchpad]\ntwo-finger-scrolling-enabled=true","/org/gnome/desktop/screensaver/":"[/]\npicture-uri='file:///usr/share/backgrounds/gnome/drool-l.svg'","/org/gnome/desktop/sound/":"[/]\nallow-volume-above-100-percent=true\nevent-sounds=true\ntheme-name='__custom'","/org/gnome/desktop/wm/preferences/":"[/]\nnum-workspaces=10\nresize-with-right-button=true\nworkspace-names=@as []","/org/gnome/mutter/":"[/]\ndynamic-workspaces=false\nedge-tiling=true\nexperimental-features=['scale-monitor-framebuffer', 'x11-randr-fractional-scaling']\noverlay-key='Super_L'","/org/gnome/settings-daemon/plugins/xsettings/":""}} \ No newline at end of file diff --git a/exports/flatpak-apps.txt b/exports/flatpak-apps.txt deleted file mode 100644 index ddde01c..0000000 --- a/exports/flatpak-apps.txt +++ /dev/null @@ -1,19 +0,0 @@ -com.brave.Browser -com.github.iwalton3.jellyfin-media-player -com.github.qarmin.czkawka -com.github.tchx84.Flatseal -com.hunterwittenborn.Celeste -com.neatdecisions.Detwinner -com.slack.Slack -com.spotify.Client -in.srev.guiscrcpy -io.bassi.Amberol -io.beekeeperstudio.Studio -io.github.realmazharhussain.GdmSettings -io.gitlab.librewolf-community -me.kozec.syncthingtk -nz.mega.MEGAsync -org.gnome.World.PikaBackup -org.kde.kid3 -org.signal.Signal -re.sonny.Junction diff --git a/exports/gnome-minimal.json b/exports/gnome-minimal.json deleted file mode 100644 index d0a36a0..0000000 --- a/exports/gnome-minimal.json +++ /dev/null @@ -1 +0,0 @@ -{"extensions":{"just-perfection-desktop@just-perfection":{"/org/gnome/shell/extensions/just-perfection/":""},"dash-to-dock@micxgx.gmail.com":{"/org/gnome/shell/extensions/dash-to-dock/":"[/]\napply-custom-theme=true\nbackground-opacity=0.80000000000000004\ncustom-theme-shrink=false\ndash-max-icon-size=48\ndisable-overview-on-startup=true\ndock-position='RIGHT'\nheight-fraction=0.90000000000000002\nhot-keys=false\npreferred-monitor=-2\npreferred-monitor-by-connector='eDP-1'"},"caffeine@patapon.info":{"/org/gnome/shell/extensions/caffeine/":"[/]\nindicator-position-max=1"},"arcmenu@arcmenu.com":{"/org/gnome/shell/extensions/arcmenu/":"[/]\ncontext-menu-shortcuts=[['', '', 'org.gnome.Extensions.desktop'], ['ArcMenu Settings', '/home/aleidk/.local/share/gnome-shell/extensions/arcmenu@arcmenu.com/icons/arcmenu-logo-symbolic.svg', 'ArcMenu_Settings'], ['Panel Extension Settings', 'application-x-addon-symbolic', 'ArcMenu_PanelExtensionSettings'], ['Separator', 'list-remove-symbolic', 'ArcMenu_Separator'], ['Power Options', 'system-shutdown-symbolic', 'ArcMenu_PowerOptions'], ['Activities Overview', 'view-fullscreen-symbolic', 'ArcMenu_ActivitiesOverview'], ['Show Desktop', 'computer-symbolic', 'ArcMenu_ShowDesktop']]\nenable-menu-hotkey=false\nenable-standlone-runner-menu=true\nhide-overview-on-startup=true\nmenu-background-color='rgba(48,48,49,0.98)'\nmenu-border-color='rgb(60,60,60)'\nmenu-button-appearance='Icon'\nmenu-foreground-color='rgb(223,223,223)'\nmenu-item-active-bg-color='rgb(25,98,163)'\nmenu-item-active-fg-color='rgb(255,255,255)'\nmenu-item-hover-bg-color='rgb(21,83,158)'\nmenu-item-hover-fg-color='rgb(255,255,255)'\nmenu-layout='Elementary'\nmenu-separator-color='rgba(255,255,255,0.1)'\nprefs-visible-page=0\nrunner-menu-custom-hotkey=['d']\nrunner-position='Centered'\nrunner-search-display-style='List'\nrunner-show-frequent-apps=true\nsearch-entry-border-radius=(true, 25)"},"appindicatorsupport@rgcjonas.gmail.com":{"/org/gnome/shell/extensions/appindicator/":""},"gnome-shell-go-to-last-workspace@github.com":{"/org/gnome/shell/extensions/go-to-last-workspace/":"[/]\nshortcut-key=['bar']"},"easy_docker_containers@red.software.systems":{"/red/software/systems/easy_docker_containers/":""}},"keybindings":{"/org/gnome/mutter/keybindings/":"[/]\ntoggle-tiled-left=['h']\ntoggle-tiled-right=['l']","/org/gnome/mutter/wayland/keybindings/":"","/org/gnome/shell/keybindings/":"[/]\nfocus-active-notification=@as []\nscreenshot=['Print']\nswitch-to-application-1=@as []\nswitch-to-application-2=@as []\nswitch-to-application-3=@as []\nswitch-to-application-4=@as []\nswitch-to-application-5=@as []\nswitch-to-application-6=@as []\nswitch-to-application-7=@as []\nswitch-to-application-8=@as []\nswitch-to-application-9=@as []\ntoggle-message-tray=@as []","/org/gnome/desktop/wm/keybindings/":"[/]\nclose=['q']\nmaximize=@as []\nminimize=['n']\nmove-to-workspace-1=['1']\nmove-to-workspace-10=['0']\nmove-to-workspace-2=['2']\nmove-to-workspace-3=['3']\nmove-to-workspace-4=['4']\nmove-to-workspace-5=['5']\nmove-to-workspace-6=['6']\nmove-to-workspace-7=['7']\nmove-to-workspace-8=['8']\nmove-to-workspace-9=['9']\nswitch-applications=@as []\nswitch-applications-backward=@as []\nswitch-group=@as []\nswitch-to-workspace-1=['1']\nswitch-to-workspace-10=['0']\nswitch-to-workspace-2=['2']\nswitch-to-workspace-3=['3']\nswitch-to-workspace-4=['4']\nswitch-to-workspace-5=['5']\nswitch-to-workspace-6=['6']\nswitch-to-workspace-7=['7']\nswitch-to-workspace-8=['8']\nswitch-to-workspace-9=['9']\nswitch-windows=['Tab', 'Tab']\nswitch-windows-backward=['Tab', 'Tab']\ntoggle-fullscreen=['f']\ntoggle-maximized=['m']\ntoggle-on-all-workspaces=['p']","/org/gnome/settings-daemon/plugins/media-keys/":"[/]\ncustom-keybindings=['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/']\non-screen-keyboard=['F11']\nscreensaver=@as []\n\n[custom-keybindings/custom0]\nbinding='Return'\ncommand='alacritty'\nname='Terminal'"},"tweaks":{"/org/gnome/desktop/background/":"[/]\npicture-options='zoom'\npicture-uri='/home/aleidk/.config/background'\npicture-uri-dark='/home/aleidk/.config/background'","/org/gnome/desktop/calendar/":"","/org/gnome/desktop/input-sources/":"[/]\ncurrent=uint32 0\nsources=[('xkb', 'latam')]\nxkb-options=['terminate:ctrl_alt_bksp', 'caps:escape']","/org/gnome/desktop/interface/":"[/]\ncolor-scheme='prefer-dark'\ncursor-theme='Catppuccin-Macchiato-Teal-Cursors'\nenable-animations=true\nfont-antialiasing='grayscale'\nfont-hinting='slight'\ngtk-theme='Catppuccin-Macchiato-Teal-Dark'\nlocate-pointer=false\nshow-battery-percentage=true\ntoolkit-accessibility=false","/org/gnome/desktop/peripherals/":"[stylus/9f0f8ae3]\neraser-pressure-curve=[0, 0, 100, 100]\npressure-curve=[0, 0, 100, 100]\n\n[touchpad]\ntap-to-click=true\ntwo-finger-scrolling-enabled=true","/org/gnome/desktop/screensaver/":"","/org/gnome/desktop/sound/":"","/org/gnome/desktop/wm/preferences/":"[/]\nnum-workspaces=6","/org/gnome/mutter/":"[/]\noverlay-key='Super_L'\n\n[keybindings]\ntoggle-tiled-left=['h']\ntoggle-tiled-right=['l']","/org/gnome/settings-daemon/plugins/xsettings/":""}} \ No newline at end of file