From 8f255c664f3c2109d914dd2d7601472e83c516ee Mon Sep 17 00:00:00 2001 From: "Lockszmith (kateryna)" Date: Sat, 28 Sep 2024 19:59:32 -0400 Subject: [PATCH 01/11] Add .gitconfig --- _home/dot_gitconfig.tmpl | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 _home/dot_gitconfig.tmpl diff --git a/_home/dot_gitconfig.tmpl b/_home/dot_gitconfig.tmpl new file mode 100644 index 0000000..d2b8496 --- /dev/null +++ b/_home/dot_gitconfig.tmpl @@ -0,0 +1,17 @@ +# This is Git's per-user configuration file. +[user] + name = Lockszmith (kateryna) + email = code@lksz.me +[credential] + helper = cache --timeout 21600 + helper = oauth +# helper = oauth -device +[credential "https://code.lksz.me"] + oauthClientId = a4792ccc-144e-407e-86c9-5e7d8d9c3269 + oauthAuthURL = /login/oauth/authorize + oauthTokenURL = /login/oauth/access_token +# oauthDeviceAuthURL = /login/oauth/authorize +# oauthDeviceAuthURL = /login/oauth/authorize_device +# oauthScopes = read_repository +[diff] + tool = vimdiff From 3bc5e3d578f23e65f3e27026afda4a0b3c36b824 Mon Sep 17 00:00:00 2001 From: "Lockszmith (kateryna)" Date: Sat, 28 Sep 2024 23:34:37 -0400 Subject: [PATCH 02/11] Added atuin --- _home/private_dot_config/atuin/config.toml | 142 +++++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 _home/private_dot_config/atuin/config.toml diff --git a/_home/private_dot_config/atuin/config.toml b/_home/private_dot_config/atuin/config.toml new file mode 100644 index 0000000..bda65c2 --- /dev/null +++ b/_home/private_dot_config/atuin/config.toml @@ -0,0 +1,142 @@ +## where to store your database, default is your system data directory +## linux/mac: ~/.local/share/atuin/history.db +## windows: %USERPROFILE%/.local/share/atuin/history.db +# db_path = "~/.history.db" + +## where to store your encryption key, default is your system data directory +## linux/mac: ~/.local/share/atuin/key +## windows: %USERPROFILE%/.local/share/atuin/key +# key_path = "~/.key" + +## where to store your auth session token, default is your system data directory +## linux/mac: ~/.local/share/atuin/session +## windows: %USERPROFILE%/.local/share/atuin/session +# session_path = "~/.session" + +## date format used, either "us" or "uk" +# dialect = "us" + +## enable or disable automatic sync +# auto_sync = true + +## enable or disable automatic update checks +# update_check = true + +## address of the sync server +# sync_address = "http://192.168.222.65" + +## how often to sync history. note that this is only triggered when a command +## is ran, so sync intervals may well be longer +## set it to 0 to sync after every command +# sync_frequency = "10m" + +## which search mode to use +## possible values: prefix, fulltext, fuzzy, skim +# search_mode = "fuzzy" + +## which filter mode to use +## possible values: global, host, session, directory +# filter_mode = "global" + +## With workspace filtering enabled, Atuin will filter for commands executed +## in any directory within a git repository tree (default: false) +# workspaces = false + +## which filter mode to use when atuin is invoked from a shell up-key binding +## the accepted values are identical to those of "filter_mode" +## leave unspecified to use same mode set in "filter_mode" +# filter_mode_shell_up_key_binding = "directory" + +## which search mode to use when atuin is invoked from a shell up-key binding +## the accepted values are identical to those of "search_mode" +## leave unspecified to use same mode set in "search_mode" +# search_mode_shell_up_key_binding = "fuzzy" + +## which style to use +## possible values: auto, full, compact +# style = "auto" + +## the maximum number of lines the interface should take up +## set it to 0 to always go full screen +inline_height = 20 + +## Invert the UI - put the search bar at the top , Default to `false` +# invert = false + +## enable or disable showing a preview of the selected command +## useful when the command is longer than the terminal width and is cut off +show_preview = true + +## what to do when the escape key is pressed when searching +## possible values: return-original, return-query +# exit_mode = "return-original" + +## possible values: emacs, subl +# word_jump_mode = "emacs" + +## characters that count as a part of a word +# word_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" + +## number of context lines to show when scrolling by pages +# scroll_context_lines = 1 + +## use ctrl instead of alt as the shortcut modifier key for numerical UI shortcuts +## alt-0 .. alt-9 +# ctrl_n_shortcuts = false + +## prevent commands matching any of these regexes from being written to history. +## Note that these regular expressions are unanchored, i.e. if they don't start +## with ^ or end with $, they'll match anywhere in the command. +## For details on the supported regular expression syntax, see +## https://docs.rs/regex/latest/regex/#syntax +# history_filter = [ +# "^secret-cmd", +# "^innocuous-cmd .*--secret=.+" +# ] + +## prevent commands run with cwd matching any of these regexes from being written +## to history. Note that these regular expressions are unanchored, i.e. if they don't +## start with ^ or end with $, they'll match anywhere in CWD. +## For details on the supported regular expression syntax, see +## https://docs.rs/regex/latest/regex/#syntax +# cwd_filter = [ +# "^/very/secret/area" +# ] + +## Configure the maximum height of the preview to show. +## Useful when you have long scripts in your history that you want to distinguish +## by more than the first few lines. +max_preview_height = 8 + +## Configure whether or not to show the help row, which includes the current Atuin +## version (and whether an update is available), a keymap hint, and the total +## amount of commands in your history. +show_help = true + +## Defaults to true. This matches history against a set of default regex, and will not save it if we get a match. Defaults include +## 1. AWS key id +## 2. Github pat (old and new) +## 3. Slack oauth tokens (bot, user) +## 4. Slack webhooks +## 5. Stripe live/test keys +# secrets_filter = true + +## Defaults to true. If enabled, upon hitting enter Atuin will immediately execute the command. Press tab to return to the shell and edit. +# This applies for new installs. Old installs will keep the old behaviour unless configured otherwise. +enter_accept = false + +#[stats] +# Set commands where we should consider the subcommand for statistics. Eg, kubectl get vs just kubectl +common_subcommands = [ + "cargo", + "go", + "git", + "npm", + "yarn", + "pnpm", + "kubectl", + "apt" +] +# +# Set commands that should be totally stripped and ignored from stats +#common_prefix = ["sudo"] From 68eb71e507b0089598debbb7768b492379d50b7e Mon Sep 17 00:00:00 2001 From: "Lockszmith (kateryna)" Date: Sat, 28 Sep 2024 23:36:13 -0400 Subject: [PATCH 03/11] Added nvim kickstart-modular based configuration --- _home/private_dot_config/nvim/.chezmoiignore | 10 ++ _home/private_dot_config/nvim/dot_gitignore | 6 + _home/private_dot_config/nvim/dot_stylua.toml | 6 + _home/private_dot_config/nvim/init.lua | 109 ++++++++++++++++++ _home/private_dot_config/nvim/lazy-lock.json | 26 +++++ .../nvim/lua/custom/plugins/init.lua | 5 + _home/private_dot_config/nvim/lua/keymaps.lua | 48 ++++++++ .../nvim/lua/lazy-bootstrap.lua | 13 +++ .../nvim/lua/lazy-plugins.lua | 90 +++++++++++++++ _home/private_dot_config/nvim/lua/options.lua | 65 +++++++++++ 10 files changed, 378 insertions(+) create mode 100644 _home/private_dot_config/nvim/.chezmoiignore create mode 100644 _home/private_dot_config/nvim/dot_gitignore create mode 100644 _home/private_dot_config/nvim/dot_stylua.toml create mode 100644 _home/private_dot_config/nvim/init.lua create mode 100644 _home/private_dot_config/nvim/lazy-lock.json create mode 100644 _home/private_dot_config/nvim/lua/custom/plugins/init.lua create mode 100644 _home/private_dot_config/nvim/lua/keymaps.lua create mode 100644 _home/private_dot_config/nvim/lua/lazy-bootstrap.lua create mode 100644 _home/private_dot_config/nvim/lua/lazy-plugins.lua create mode 100644 _home/private_dot_config/nvim/lua/options.lua diff --git a/_home/private_dot_config/nvim/.chezmoiignore b/_home/private_dot_config/nvim/.chezmoiignore new file mode 100644 index 0000000..51b7b03 --- /dev/null +++ b/_home/private_dot_config/nvim/.chezmoiignore @@ -0,0 +1,10 @@ +.github +.github/** +LICENSE.md +README.md +doc +doc/** +spell +spell/** +lua/kickstart +lua/kickstart/** diff --git a/_home/private_dot_config/nvim/dot_gitignore b/_home/private_dot_config/nvim/dot_gitignore new file mode 100644 index 0000000..8a192ca --- /dev/null +++ b/_home/private_dot_config/nvim/dot_gitignore @@ -0,0 +1,6 @@ +tags +test.sh +.luarc.json +nvim + +spell/ diff --git a/_home/private_dot_config/nvim/dot_stylua.toml b/_home/private_dot_config/nvim/dot_stylua.toml new file mode 100644 index 0000000..139e939 --- /dev/null +++ b/_home/private_dot_config/nvim/dot_stylua.toml @@ -0,0 +1,6 @@ +column_width = 160 +line_endings = "Unix" +indent_type = "Spaces" +indent_width = 2 +quote_style = "AutoPreferSingle" +call_parentheses = "None" diff --git a/_home/private_dot_config/nvim/init.lua b/_home/private_dot_config/nvim/init.lua new file mode 100644 index 0000000..3784c1a --- /dev/null +++ b/_home/private_dot_config/nvim/init.lua @@ -0,0 +1,109 @@ +--[[ + +===================================================================== +==================== READ THIS BEFORE CONTINUING ==================== +===================================================================== +======== .-----. ======== +======== .----------------------. | === | ======== +======== |.-""""""""""""""""""-.| |-----| ======== +======== || || | === | ======== +======== || KICKSTART.NVIM || |-----| ======== +======== || || | === | ======== +======== || || |-----| ======== +======== ||:Tutor || |:::::| ======== +======== |'-..................-'| |____o| ======== +======== `"")----------------(""` ___________ ======== +======== /::::::::::| |::::::::::\ \ no mouse \ ======== +======== /:::========| |==hjkl==:::\ \ required \ ======== +======== '""""""""""""' '""""""""""""' '""""""""""' ======== +======== ======== +===================================================================== +===================================================================== + +What is Kickstart? + + Kickstart.nvim is *not* a distribution. + + Kickstart.nvim is a starting point for your own configuration. + The goal is that you can read every line of code, top-to-bottom, understand + what your configuration is doing, and modify it to suit your needs. + + Once you've done that, you can start exploring, configuring and tinkering to + make Neovim your own! That might mean leaving Kickstart just the way it is for a while + or immediately breaking it into modular pieces. It's up to you! + + If you don't know anything about Lua, I recommend taking some time to read through + a guide. One possible example which will only take 10-15 minutes: + - https://learnxinyminutes.com/docs/lua/ + + After understanding a bit more about Lua, you can use `:help lua-guide` as a + reference for how Neovim integrates Lua. + - :help lua-guide + - (or HTML version): https://neovim.io/doc/user/lua-guide.html + +Kickstart Guide: + + TODO: The very first thing you should do is to run the command `:Tutor` in Neovim. + + If you don't know what this means, type the following: + - + - : + - Tutor + - + + (If you already know the Neovim basics, you can skip this step.) + + Once you've completed that, you can continue working through **AND READING** the rest + of the kickstart init.lua. + + Next, run AND READ `:help`. + This will open up a help window with some basic information + about reading, navigating and searching the builtin help documentation. + + This should be the first place you go to look when you're stuck or confused + with something. It's one of my favorite Neovim features. + + MOST IMPORTANTLY, we provide a keymap "sh" to [s]earch the [h]elp documentation, + which is very useful when you're not exactly sure of what you're looking for. + + I have left several `:help X` comments throughout the init.lua + These are hints about where to find more information about the relevant settings, + plugins or Neovim features used in Kickstart. + + NOTE: Look for lines like this + + Throughout the file. These are for you, the reader, to help you understand what is happening. + Feel free to delete them once you know what you're doing, but they should serve as a guide + for when you are first encountering a few different constructs in your Neovim config. + +If you experience any errors while trying to install kickstart, run `:checkhealth` for more info. + +I hope you enjoy your Neovim journey, +- TJ + +P.S. You can delete this when you're done too. It's your config now! :) +--]] + +-- Set as the leader key +-- See `:help mapleader` +-- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used) +vim.g.mapleader = ' ' +vim.g.maplocalleader = ' ' + +-- Set to true if you have a Nerd Font installed and selected in the terminal +vim.g.have_nerd_font = false + +-- [[ Setting options ]] +require 'options' + +-- [[ Basic Keymaps ]] +require 'keymaps' + +-- [[ Install `lazy.nvim` plugin manager ]] +require 'lazy-bootstrap' + +-- [[ Configure and install plugins ]] +require 'lazy-plugins' + +-- The line beneath this is called `modeline`. See `:help modeline` +-- vim: ts=2 sts=2 sw=2 et diff --git a/_home/private_dot_config/nvim/lazy-lock.json b/_home/private_dot_config/nvim/lazy-lock.json new file mode 100644 index 0000000..b60dcab --- /dev/null +++ b/_home/private_dot_config/nvim/lazy-lock.json @@ -0,0 +1,26 @@ +{ + "LuaSnip": { "branch": "master", "commit": "e808bee352d1a6fcf902ca1a71cee76e60e24071" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, + "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, + "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, + "conform.nvim": { "branch": "master", "commit": "1a99fdc1d3aa9ccdf3021e67982a679a8c5c740c" }, + "fidget.nvim": { "branch": "main", "commit": "d855eed8a06531a7e8fd0684889b2943f373c469" }, + "gitsigns.nvim": { "branch": "main", "commit": "863903631e676b33e8be2acb17512fdc1b80b4fb" }, + "lazy.nvim": { "branch": "main", "commit": "460e1cd8f24e364d54543a4b0e83f6f4ec1f65fb" }, + "lazydev.nvim": { "branch": "main", "commit": "491452cf1ca6f029e90ad0d0368848fac717c6d2" }, + "luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "25c11854aa25558ee6c03432edfa0df0217324be" }, + "mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" }, + "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, + "mini.nvim": { "branch": "main", "commit": "848c5e8f428faf843051768e0d56104cd02aea1f" }, + "nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" }, + "nvim-lspconfig": { "branch": "master", "commit": "a9bc587e9ae0cbcb3e90a2e9342f86b3b78c4408" }, + "nvim-treesitter": { "branch": "master", "commit": "36b78d112bddd69a05e24679241962e29e494d9e" }, + "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, + "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, + "telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, + "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" }, + "tokyonight.nvim": { "branch": "main", "commit": "817bb6ffff1b9ce72cdd45d9fcfa8c9cd1ad3839" }, + "vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" }, + "which-key.nvim": { "branch": "main", "commit": "fb070344402cfc662299d9914f5546d840a22126" } +} diff --git a/_home/private_dot_config/nvim/lua/custom/plugins/init.lua b/_home/private_dot_config/nvim/lua/custom/plugins/init.lua new file mode 100644 index 0000000..be0eb9d --- /dev/null +++ b/_home/private_dot_config/nvim/lua/custom/plugins/init.lua @@ -0,0 +1,5 @@ +-- You can add your own plugins here or in other files in this directory! +-- I promise not to create any merge conflicts in this directory :) +-- +-- See the kickstart.nvim README for more information +return {} diff --git a/_home/private_dot_config/nvim/lua/keymaps.lua b/_home/private_dot_config/nvim/lua/keymaps.lua new file mode 100644 index 0000000..c07a08a --- /dev/null +++ b/_home/private_dot_config/nvim/lua/keymaps.lua @@ -0,0 +1,48 @@ +-- [[ Basic Keymaps ]] +-- See `:help vim.keymap.set()` + +-- Clear highlights on search when pressing in normal mode +-- See `:help hlsearch` +vim.keymap.set('n', '', 'nohlsearch') + +-- Diagnostic keymaps +vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' }) + +-- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier +-- for people to discover. Otherwise, you normally need to press , which +-- is not what someone will guess without a bit more experience. +-- +-- NOTE: This won't work in all terminal emulators/tmux/etc. Try your own mapping +-- or just use to exit terminal mode +vim.keymap.set('t', '', '', { desc = 'Exit terminal mode' }) + +-- TIP: Disable arrow keys in normal mode +-- vim.keymap.set('n', '', 'echo "Use h to move!!"') +-- vim.keymap.set('n', '', 'echo "Use l to move!!"') +-- vim.keymap.set('n', '', 'echo "Use k to move!!"') +-- vim.keymap.set('n', '', 'echo "Use j to move!!"') + +-- Keybinds to make split navigation easier. +-- Use CTRL+ to switch between windows +-- +-- See `:help wincmd` for a list of all window commands +vim.keymap.set('n', '', '', { desc = 'Move focus to the left window' }) +vim.keymap.set('n', '', '', { desc = 'Move focus to the right window' }) +vim.keymap.set('n', '', '', { desc = 'Move focus to the lower window' }) +vim.keymap.set('n', '', '', { desc = 'Move focus to the upper window' }) + +-- [[ Basic Autocommands ]] +-- See `:help lua-guide-autocommands` + +-- Highlight when yanking (copying) text +-- Try it with `yap` in normal mode +-- See `:help vim.highlight.on_yank()` +vim.api.nvim_create_autocmd('TextYankPost', { + desc = 'Highlight when yanking (copying) text', + group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }), + callback = function() + vim.highlight.on_yank() + end, +}) + +-- vim: ts=2 sts=2 sw=2 et diff --git a/_home/private_dot_config/nvim/lua/lazy-bootstrap.lua b/_home/private_dot_config/nvim/lua/lazy-bootstrap.lua new file mode 100644 index 0000000..8dc96c8 --- /dev/null +++ b/_home/private_dot_config/nvim/lua/lazy-bootstrap.lua @@ -0,0 +1,13 @@ +-- [[ Install `lazy.nvim` plugin manager ]] +-- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info +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 + error('Error cloning lazy.nvim:\n' .. out) + end +end ---@diagnostic disable-next-line: undefined-field +vim.opt.rtp:prepend(lazypath) + +-- vim: ts=2 sts=2 sw=2 et diff --git a/_home/private_dot_config/nvim/lua/lazy-plugins.lua b/_home/private_dot_config/nvim/lua/lazy-plugins.lua new file mode 100644 index 0000000..f601d39 --- /dev/null +++ b/_home/private_dot_config/nvim/lua/lazy-plugins.lua @@ -0,0 +1,90 @@ +-- [[ Configure and install plugins ]] +-- +-- To check the current status of your plugins, run +-- :Lazy +-- +-- You can press `?` in this menu for help. Use `:q` to close the window +-- +-- To update plugins you can run +-- :Lazy update +-- +-- NOTE: Here is where you install your plugins. +require('lazy').setup({ + -- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link). + 'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically + + -- NOTE: Plugins can also be added by using a table, + -- with the first argument being the link and the following + -- keys can be used to configure plugin behavior/loading/etc. + -- + -- Use `opts = {}` to force a plugin to be loaded. + -- + + + -- modular approach: using `require 'path/name'` will + -- include a plugin definition from file lua/path/name.lua + + require 'kickstart/plugins/gitsigns', + + require 'kickstart/plugins/which-key', + + require 'kickstart/plugins/telescope', + + require 'kickstart/plugins/lspconfig', + + require 'kickstart/plugins/conform', + + require 'kickstart/plugins/cmp', + + require 'kickstart/plugins/tokyonight', + + require 'kickstart/plugins/todo-comments', + + require 'kickstart/plugins/mini', + + require 'kickstart/plugins/treesitter', + + -- The following two comments only work if you have downloaded the kickstart repo, not just copy pasted the + -- init.lua. If you want these files, they are in the repository, so you can just download them and + -- place them in the correct locations. + + -- NOTE: Next step on your Neovim journey: Add/Configure additional plugins for Kickstart + -- + -- Here are some example plugins that I've included in the Kickstart repository. + -- Uncomment any of the lines below to enable them (you will need to restart nvim). + -- + -- require 'kickstart.plugins.debug', + -- require 'kickstart.plugins.indent_line', + -- require 'kickstart.plugins.lint', + -- require 'kickstart.plugins.autopairs', + -- require 'kickstart.plugins.neo-tree', + + -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua` + -- This is the easiest way to modularize your config. + -- + -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. + -- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins` + -- { import = 'custom.plugins' }, +}, { + ui = { + -- If you are using a Nerd Font: set icons to an empty table which will use the + -- default lazy.nvim defined Nerd Font icons, otherwise define a unicode icons table + icons = vim.g.have_nerd_font and {} or { + cmd = 'โŒ˜', + config = '๐Ÿ› ', + event = '๐Ÿ“…', + ft = '๐Ÿ“‚', + init = 'โš™', + keys = '๐Ÿ—', + plugin = '๐Ÿ”Œ', + runtime = '๐Ÿ’ป', + require = '๐ŸŒ™', + source = '๐Ÿ“„', + start = '๐Ÿš€', + task = '๐Ÿ“Œ', + lazy = '๐Ÿ’ค ', + }, + }, +}) + +-- vim: ts=2 sts=2 sw=2 et diff --git a/_home/private_dot_config/nvim/lua/options.lua b/_home/private_dot_config/nvim/lua/options.lua new file mode 100644 index 0000000..94ee2ed --- /dev/null +++ b/_home/private_dot_config/nvim/lua/options.lua @@ -0,0 +1,65 @@ +-- [[ Setting options ]] +-- See `:help vim.opt` +-- NOTE: You can change these options as you wish! +-- For more options, you can see `:help option-list` + +-- Make line numbers default +vim.opt.number = true +-- You can also add relative line numbers, to help with jumping. +-- Experiment for yourself to see if you like it! +-- vim.opt.relativenumber = true + +-- Enable mouse mode, can be useful for resizing splits for example! +vim.opt.mouse = 'a' + +-- Don't show the mode, since it's already in the status line +vim.opt.showmode = false + +-- Sync clipboard between OS and Neovim. +-- Schedule the setting after `UiEnter` because it can increase startup-time. +-- Remove this option if you want your OS clipboard to remain independent. +-- See `:help 'clipboard'` +vim.schedule(function() + vim.opt.clipboard = 'unnamedplus' +end) + +-- Enable break indent +vim.opt.breakindent = true + +-- Save undo history +vim.opt.undofile = true + +-- Case-insensitive searching UNLESS \C or one or more capital letters in the search term +vim.opt.ignorecase = true +vim.opt.smartcase = true + +-- Keep signcolumn on by default +vim.opt.signcolumn = 'yes' + +-- Decrease update time +vim.opt.updatetime = 250 + +-- Decrease mapped sequence wait time +-- Displays which-key popup sooner +vim.opt.timeoutlen = 300 + +-- Configure how new splits should be opened +vim.opt.splitright = true +vim.opt.splitbelow = true + +-- Sets how neovim will display certain whitespace characters in the editor. +-- See `:help 'list'` +-- and `:help 'listchars'` +vim.opt.list = true +vim.opt.listchars = { tab = 'ยป ', trail = 'ยท', nbsp = 'โฃ' } + +-- Preview substitutions live, as you type! +vim.opt.inccommand = 'split' + +-- Show which line your cursor is on +vim.opt.cursorline = true + +-- Minimal number of screen lines to keep above and below the cursor. +vim.opt.scrolloff = 10 + +-- vim: ts=2 sts=2 sw=2 et From 3e3c82134be0e2771934b6f6f16d14d812cafd92 Mon Sep 17 00:00:00 2001 From: "{{ .data.gitname }}" <{{ .data.gitemail }}> Date: Sun, 24 Nov 2024 21:40:28 -0500 Subject: [PATCH 04/11] chezmoiexternals improvements - Zellij version is dynamically tracked - Added delta git/diff viewer and pager --- _home/.chezmoiexternal.yaml | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/_home/.chezmoiexternal.yaml b/_home/.chezmoiexternal.yaml index ccfb642..170e3fe 100644 --- a/_home/.chezmoiexternal.yaml +++ b/_home/.chezmoiexternal.yaml @@ -3,18 +3,42 @@ # type string none External type (file, archive, archive-file, or git-repo) # refreshPeriod duration 0 Refresh period (Examples: one day (24h), one week (168h), or four weeks (672h)) +{{ $externals := dict -}} + +{{- with $repo := "dandavison/delta" -}} +{{- with $version := (gitHubLatestRelease $repo).GetTagName -}} +{{- $_ := set $externals ".local/bin/delta" (dict + "type" "archive-file" + "url" (printf "https://github.com/%s/releases/download/%s/delta-%s-x86_64-unknown-linux-musl.tar.gz" $repo $version $version) + "path" (printf "delta-%s-x86_64-unknown-linux-musl/delta" $version) + "refreshPeriod" "168h") +-}} +{{- end -}} +{{- end -}} + +{{- with $repo := "zellij-org/zellij" -}} +{{- with $version := (gitHubLatestRelease $repo).GetTagName -}} +{{- $_ := set $externals ".cache/chezmoi/tmp/zellij" (dict + "type" "archive" + "url" (printf "https://github.com/%s/releases/download/%s/zellij-x86_64-unknown-linux-musl.tar.gz" $repo $version) + "refreshPeriod" "168h") +-}} +{{- end -}} +{{- end -}} + +{{- $externals | toYaml }} ".config/sz.env/lib/ble.sh.curl": type: "archive" url: "https://github.com/akinomyoga/ble.sh/releases/download/nightly/ble-nightly.tar.xz" refreshPeriod: "168h" +".config/sz.env/lib/delta.themes.gitconfig": + type: "file" + url: "https://raw.githubusercontent.com/dandavison/delta/refs/heads/main/themes.gitconfig" + refreshPeriod: "168h" + ".config/sz.env/lib/bash-preexec/bash-preexec.sh": type: "file" url: "https://raw.githubusercontent.com/rcaloras/bash-preexec/master/bash-preexec.sh" refreshPeriod: "168h" -".cache/chezmoi/tmp/zellij": - type: "archive" - url: "https://github.com/zellij-org/zellij/releases/download/v0.40.1/zellij-x86_64-unknown-linux-musl.tar.gz" - refreshPeriod: "168h" - From a85ed4e56150f6ff2097664a4b885dd9c42019bf Mon Sep 17 00:00:00 2001 From: "Lockszmith (@kateryna)" Date: Sun, 24 Nov 2024 21:48:08 -0500 Subject: [PATCH 05/11] Make sure .git isn't accidentally added (If a git repo is needed, using chezmoiexternals is the proper way) --- _home/.chezmoiignore | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 _home/.chezmoiignore diff --git a/_home/.chezmoiignore b/_home/.chezmoiignore new file mode 100644 index 0000000..7e110d2 --- /dev/null +++ b/_home/.chezmoiignore @@ -0,0 +1,3 @@ +/**/.git +/**/.git/** + From 77a7982f2c9dd6f5ff635acdc753ef1b3c8b5805 Mon Sep 17 00:00:00 2001 From: "Lockszmith (@kateryna)" Date: Sun, 24 Nov 2024 21:49:26 -0500 Subject: [PATCH 06/11] Add .chezmoi.toml.tmpl and improve gitconfig --- _home/.chezmoi.toml.tmpl | 32 ++++++++++++++++++++++++++++ _home/dot_gitconfig.tmpl | 45 +++++++++++++++++++++++++++++++++++++--- 2 files changed, 74 insertions(+), 3 deletions(-) create mode 100644 _home/.chezmoi.toml.tmpl diff --git a/_home/.chezmoi.toml.tmpl b/_home/.chezmoi.toml.tmpl new file mode 100644 index 0000000..56873e0 --- /dev/null +++ b/_home/.chezmoi.toml.tmpl @@ -0,0 +1,32 @@ +{{- $sysname := promptStringOnce . "sysname" "System name" -}} +{{- $sysgroup := promptStringOnce . "sysgroup" "System group" -}} +{{- $sysarea := promptStringOnce . "sysarea" "System area" -}} +{{- $gitEmail := promptStringOnce . "gitEmail" "email address (for git commits)" -}} +{{- $gitName := promptStringOnce . "gitName" "Full name (for git commits)" -}} + +[data] +{{- if ($sysname) }} + sysname = {{ $sysname | quote }} +{{- end -}} +{{- if ($sysgroup) }} + sysgroup = {{ $sysgroup | quote }} +{{- end -}} +{{- if ($sysarea) }} + sysarea = {{ $sysarea | quote }} +{{ end -}} + +{{ if ($gitEmail) }} + gitEmail = {{ $gitEmail | quote }} +{{- end -}} +{{- if ($gitName) }} + gitName = {{ $gitName | quote }} +{{- end }} + +[diff] +# command = "nvim" +# args = ["-d", "{{- "{{ .Destination }}" -}}", "{{- "{{ .Target }}" -}}"] + + command = "delta" + args = ["--paging=never", "{{ "{{ .Destination }}" }}", "{{ "{{ .Target }}" }}"] + pager = "delta" + diff --git a/_home/dot_gitconfig.tmpl b/_home/dot_gitconfig.tmpl index d2b8496..930a684 100644 --- a/_home/dot_gitconfig.tmpl +++ b/_home/dot_gitconfig.tmpl @@ -1,7 +1,14 @@ # This is Git's per-user configuration file. +# It is recommended to edit this using chezmoi: +# cz edit ~/.gitconfig + +[include] + path = .config/sz.env/lib/delta.themes.gitconfig + [user] - name = Lockszmith (kateryna) - email = code@lksz.me + name = {{ .gitName }} + email = {{ .gitEmail }} + [credential] helper = cache --timeout 21600 helper = oauth @@ -13,5 +20,37 @@ # oauthDeviceAuthURL = /login/oauth/authorize # oauthDeviceAuthURL = /login/oauth/authorize_device # oauthScopes = read_repository +[core] + editor = nvim + pager = delta + +[init] + defaultBranch = main + +[core] + pager = delta + +[interactive] + diffFilter = delta --color-only + +[delta] + features = colibri + navigate = true # use n and N to move between diff sections + line-numbers = true + side-by-side = true + [diff] - tool = vimdiff + tool = nvimdiff +[difftool] + prompt = false +[difftool "nvimdiff"] + cmd = "nvim -d \"$LOCAL\" \"$REMOTE\"" + +[merge] + tool = nvimdiff + conflictstyle = zdiff3 +[mergetool] + prompt = true +[mergetool "nvimdiff"] + cmd = "nvim -d \"$LOCAL\" \"$REMOTE\" \"$MERGED\" -c 'wincmd w' -c 'wincmd J'" + From 9ebde5fb7959e73ced143d277bc77da1bbb07ec2 Mon Sep 17 00:00:00 2001 From: "Lockszmith (@kateryna)" Date: Sun, 24 Nov 2024 21:50:13 -0500 Subject: [PATCH 07/11] Improve nvim configuration --- _home/private_dot_config/nvim/init.lua | 2 +- _home/private_dot_config/nvim/lazy-lock.json | 4 +++- _home/private_dot_config/nvim/lazy/lazy.lua | 11 +++++++++++ .../nvim/lua/custom/plugins/nvim-chezmoi.lua | 6 ++++++ _home/private_dot_config/nvim/lua/lazy-plugins.lua | 5 ++--- 5 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 _home/private_dot_config/nvim/lazy/lazy.lua create mode 100644 _home/private_dot_config/nvim/lua/custom/plugins/nvim-chezmoi.lua diff --git a/_home/private_dot_config/nvim/init.lua b/_home/private_dot_config/nvim/init.lua index 3784c1a..6c6d42b 100644 --- a/_home/private_dot_config/nvim/init.lua +++ b/_home/private_dot_config/nvim/init.lua @@ -91,7 +91,7 @@ vim.g.mapleader = ' ' vim.g.maplocalleader = ' ' -- Set to true if you have a Nerd Font installed and selected in the terminal -vim.g.have_nerd_font = false +vim.g.have_nerd_font = true -- [[ Setting options ]] require 'options' diff --git a/_home/private_dot_config/nvim/lazy-lock.json b/_home/private_dot_config/nvim/lazy-lock.json index b60dcab..95d6009 100644 --- a/_home/private_dot_config/nvim/lazy-lock.json +++ b/_home/private_dot_config/nvim/lazy-lock.json @@ -6,16 +6,18 @@ "conform.nvim": { "branch": "master", "commit": "1a99fdc1d3aa9ccdf3021e67982a679a8c5c740c" }, "fidget.nvim": { "branch": "main", "commit": "d855eed8a06531a7e8fd0684889b2943f373c469" }, "gitsigns.nvim": { "branch": "main", "commit": "863903631e676b33e8be2acb17512fdc1b80b4fb" }, - "lazy.nvim": { "branch": "main", "commit": "460e1cd8f24e364d54543a4b0e83f6f4ec1f65fb" }, + "lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" }, "lazydev.nvim": { "branch": "main", "commit": "491452cf1ca6f029e90ad0d0368848fac717c6d2" }, "luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "25c11854aa25558ee6c03432edfa0df0217324be" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" }, "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, "mini.nvim": { "branch": "main", "commit": "848c5e8f428faf843051768e0d56104cd02aea1f" }, + "nvim-chezmoi": { "branch": "main", "commit": "4ec840d662d8eb1b4714a9852203d51c5b97fe95" }, "nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" }, "nvim-lspconfig": { "branch": "master", "commit": "a9bc587e9ae0cbcb3e90a2e9342f86b3b78c4408" }, "nvim-treesitter": { "branch": "master", "commit": "36b78d112bddd69a05e24679241962e29e494d9e" }, + "nvim-web-devicons": { "branch": "master", "commit": "19d257cf889f79f4022163c3fbb5e08639077bd8" }, "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, "telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, diff --git a/_home/private_dot_config/nvim/lazy/lazy.lua b/_home/private_dot_config/nvim/lazy/lazy.lua new file mode 100644 index 0000000..b8609d2 --- /dev/null +++ b/_home/private_dot_config/nvim/lazy/lazy.lua @@ -0,0 +1,11 @@ +return { + 'andre-kotake/nvim-chezmoi', + lazy = false, + dependencies = { + { 'nvim-lua/plenary.nvim' }, + }, + opts = {}, + config = function(_, opts) + require('nvim-chezmoi').setup(opts) + end, +} diff --git a/_home/private_dot_config/nvim/lua/custom/plugins/nvim-chezmoi.lua b/_home/private_dot_config/nvim/lua/custom/plugins/nvim-chezmoi.lua new file mode 100644 index 0000000..56d078c --- /dev/null +++ b/_home/private_dot_config/nvim/lua/custom/plugins/nvim-chezmoi.lua @@ -0,0 +1,6 @@ +return { + { + 'andre-kotake/nvim-chezmoi', + }, +} +-- vim: ts=2 sts=2 sw=2 et diff --git a/_home/private_dot_config/nvim/lua/lazy-plugins.lua b/_home/private_dot_config/nvim/lua/lazy-plugins.lua index f601d39..42caff0 100644 --- a/_home/private_dot_config/nvim/lua/lazy-plugins.lua +++ b/_home/private_dot_config/nvim/lua/lazy-plugins.lua @@ -20,7 +20,6 @@ require('lazy').setup({ -- Use `opts = {}` to force a plugin to be loaded. -- - -- modular approach: using `require 'path/name'` will -- include a plugin definition from file lua/path/name.lua @@ -42,7 +41,7 @@ require('lazy').setup({ require 'kickstart/plugins/mini', - require 'kickstart/plugins/treesitter', + -- require 'kickstart/plugins/treesitter', -- The following two comments only work if you have downloaded the kickstart repo, not just copy pasted the -- init.lua. If you want these files, they are in the repository, so you can just download them and @@ -64,7 +63,7 @@ require('lazy').setup({ -- -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. -- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins` - -- { import = 'custom.plugins' }, + { import = 'custom.plugins' }, }, { ui = { -- If you are using a Nerd Font: set icons to an empty table which will use the From f4c0bb36c1bd6e30848cf23a592b176030246956 Mon Sep 17 00:00:00 2001 From: "Lockszmith (@kateryna)" Date: Sun, 24 Nov 2024 21:52:17 -0500 Subject: [PATCH 08/11] Minor improvement to sz.env load process --- .../sz.env/000_stop_on_non_interactive_sessions.env | 2 ++ _home/private_dot_config/sz.env/PATH_zz_cleanup.env | 3 +++ _home/private_dot_config/sz.env/envman-and-webi.env | 9 ++++++++- _home/private_dot_config/sz.env/executable__.load.sh | 3 +++ 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/_home/private_dot_config/sz.env/000_stop_on_non_interactive_sessions.env b/_home/private_dot_config/sz.env/000_stop_on_non_interactive_sessions.env index ccfc5ce..6e83c75 100644 --- a/_home/private_dot_config/sz.env/000_stop_on_non_interactive_sessions.env +++ b/_home/private_dot_config/sz.env/000_stop_on_non_interactive_sessions.env @@ -3,4 +3,6 @@ if [[ ! "$-" =~ i ]]; then LOAD_EXIT=1 echo "Non interactive session ($-) , stopping load of shell environment" 1>&2 +else + reset fi diff --git a/_home/private_dot_config/sz.env/PATH_zz_cleanup.env b/_home/private_dot_config/sz.env/PATH_zz_cleanup.env index b910958..7556855 100644 --- a/_home/private_dot_config/sz.env/PATH_zz_cleanup.env +++ b/_home/private_dot_config/sz.env/PATH_zz_cleanup.env @@ -10,3 +10,6 @@ done NEWPATH="$NEWPATH:$OLDPATH" export PATH="$NEWPATH" unset NEWPATH OLDPATH colon entry search + +[[ -n "${DBG}" ]] && echo "${PATH//:/\n}" + diff --git a/_home/private_dot_config/sz.env/envman-and-webi.env b/_home/private_dot_config/sz.env/envman-and-webi.env index 9757b80..f59d5de 100644 --- a/_home/private_dot_config/sz.env/envman-and-webi.env +++ b/_home/private_dot_config/sz.env/envman-and-webi.env @@ -1,6 +1,13 @@ #!/usr/bin/env -S bash -c 'echo "Not a user script. source(aka .) only"' -[ -s "$HOME/.config/envman/load.sh" ] && source "$HOME/.config/envman/load.sh" +export ENVMAN_LOAD='' + +if [ -s "$HOME/.config/envman/load.sh" ]; then + [[ -n "${DBG}" ]] && echo "Loading envman" + source "$HOME/.config/envman/load.sh" + + [[ -n "${DBG}" ]] && echo "${PATH//:/\n}" +fi if is_cmd webi; then . <(webi --init "${SHELL##*/}") diff --git a/_home/private_dot_config/sz.env/executable__.load.sh b/_home/private_dot_config/sz.env/executable__.load.sh index c32c27a..b1c95bd 100644 --- a/_home/private_dot_config/sz.env/executable__.load.sh +++ b/_home/private_dot_config/sz.env/executable__.load.sh @@ -57,6 +57,9 @@ if is_sourced; then -exec sh -c ' find "$1" -xdev -maxdepth 1 -type f -name "*.env" -not -name "ID_*" -not -name "PATH_*" -print | sort ' shell '{}' ';' \ + -exec sh -c ' + find "$1" -xdev -maxdepth 1 -type f -name "PATH_zz_cleanup.env" + ' shell '{}' ';' \ | sed -e 's/^/load_next "/; s/$/";/' )" if [ -n "$DBG_NO_SZ_LOAD" ]; then From db589b02b9d33c9a94350ddb9c506f712a171a45 Mon Sep 17 00:00:00 2001 From: "Lockszmith (@kateryna)" Date: Sun, 24 Nov 2024 21:53:34 -0500 Subject: [PATCH 09/11] Improve ls aliases --- _home/private_dot_config/sz.env/aliases.env | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_home/private_dot_config/sz.env/aliases.env b/_home/private_dot_config/sz.env/aliases.env index 1f5219e..deab518 100644 --- a/_home/private_dot_config/sz.env/aliases.env +++ b/_home/private_dot_config/sz.env/aliases.env @@ -1,9 +1,9 @@ #!/usr/bin/env -S bash -c 'echo "Not a user script. source(aka .) only"' -alias l='ls -lAhF --color=auto --group-directories-first ' +alias l='ls -lahF --color=auto --group-directories-first ' alias lu='l -U ' alias lold='l --sort=time ' alias lnew='l --sort=time --reverse ' -alias ll='l' +alias ll='l -A' alias sudo='sudo ' From db7ba3de56e204ddf74907bfbc664d68eb6ca850 Mon Sep 17 00:00:00 2001 From: "Lockszmith (@kateryna)" Date: Sun, 24 Nov 2024 21:54:13 -0500 Subject: [PATCH 10/11] Change chezmoi loading order, fixes auto-complete --- _home/private_dot_config/sz.env/{chezmoi.env => zzz_chezmoi.env} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename _home/private_dot_config/sz.env/{chezmoi.env => zzz_chezmoi.env} (100%) diff --git a/_home/private_dot_config/sz.env/chezmoi.env b/_home/private_dot_config/sz.env/zzz_chezmoi.env similarity index 100% rename from _home/private_dot_config/sz.env/chezmoi.env rename to _home/private_dot_config/sz.env/zzz_chezmoi.env From ec1123ecb9b47d12d4a6871e310c0f2387921b0e Mon Sep 17 00:00:00 2001 From: "Lockszmith (@kateryna)" Date: Sun, 24 Nov 2024 21:54:37 -0500 Subject: [PATCH 11/11] Fix TrueNAS SCALE oriented cli tools --- _home/private_dot_config/sz.env/fix-kubectl.env | 6 ++++-- _home/private_dot_config/sz.env/truenas-scale.env | 8 ++++++++ _home/private_dot_local/bin/executable_load-zellij | 9 ++++++--- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/_home/private_dot_config/sz.env/fix-kubectl.env b/_home/private_dot_config/sz.env/fix-kubectl.env index a71ada8..88adcd6 100644 --- a/_home/private_dot_config/sz.env/fix-kubectl.env +++ b/_home/private_dot_config/sz.env/fix-kubectl.env @@ -1,5 +1,7 @@ #!/usr/bin/env -S bash -c 'echo "Not a user script. source(aka .) only"' -if is_cmd fix-kubectl; then - . <( fix-kubectl - ) +if is_cmd szetup-kubectl4k3s && [ "$(systemctl is-active k3s.service)" = "active" ]; then + . <( szetup-kubectl4k3s - ) + + [[ -n "${DBG}" ]] && echo "kubectl for k3s setup complete." fi diff --git a/_home/private_dot_config/sz.env/truenas-scale.env b/_home/private_dot_config/sz.env/truenas-scale.env index d89614a..f14b8fd 100644 --- a/_home/private_dot_config/sz.env/truenas-scale.env +++ b/_home/private_dot_config/sz.env/truenas-scale.env @@ -5,6 +5,14 @@ if is_cmd midclt; then if [ -e "$SCALE_POOL_ROOT/jailmaker/jlmkr.py" ]; then #alias jlmkr="bash -c '_jlmkr() { $SCALE_POOL_ROOT/jailmaker/jlmkr.py \${@:---help}; }; _jlmkr \$@' " function jlmkr() { sudo $SCALE_POOL_ROOT/jailmaker/jlmkr.py "${@:---help}"; } + + jlmkr-zellij() { + zellij action go-to-tab-name --create "jailmkr" + zellij action new-pane --name "${1:?must pass jail name}@jlmkr" -- sh -ci "reset; sudo $SCALE_POOL_ROOT/jailmaker/jlmkr.py shell --uid ${UID} ${1}" + zellij action focus-previous-pane + zellij action close-pane + } + fi fi fi diff --git a/_home/private_dot_local/bin/executable_load-zellij b/_home/private_dot_local/bin/executable_load-zellij index 90d7608..0a6deb2 100644 --- a/_home/private_dot_local/bin/executable_load-zellij +++ b/_home/private_dot_local/bin/executable_load-zellij @@ -15,9 +15,9 @@ BASE_SHELL=$(basename "$SHELL") if is_sourced; then zellij-cleanup() { - [[ -r "$HOME/bin/zellij" ]] && rm "$HOME/bin/zellij" - [[ -d "$HOME/.cache/zellij" ]] && rm -fR "$HOME/.cache/zellij" - [[ -d /tmp/zellij ]] && rm -fR /tmp/zellij + type -pa zellij > /dev/null && type -pa zellij | sed -Ee 's/^.* is //' | awk '{ print $1 }' | grep -E "^$HOME" | xargs -tr rm + [[ -d "$HOME/.cache/zellij" ]] && echo "$HOME/.cache/zellij" | xargs -rt rm -fR + find /tmp -maxdepth 1 -mindepth 1 -type d -name 'zellij*' -print0 | xargs -r0t rm -fR printf 'Zellij has been cleaned up, you can now reinstall it.\n' } zellij() { @@ -38,11 +38,14 @@ if is_sourced; then fi } + zellij-completion() { if [[ "${BASE_SHELL}" == "zsh" ]]; then . <( zellij setup --generate-completion zsh | sed -Ee 's/^(_(zellij) ).*/compdef \1\2/' ) else . <( zellij setup --generate-completion "$BASE_SHELL" ) fi + } + zellij-completion # Was needed when zsh would load # . <( zellij setup --generate-completion "$BASE_SHELL" | sed -ne '/^function/,$p' ) if [[ -z "$ZELLIJ_SESSION_NAME" ]]; then