summaryrefslogtreecommitdiff
path: root/mac/.config
diff options
context:
space:
mode:
Diffstat (limited to 'mac/.config')
-rw-r--r--mac/.config/TheSiahxyz/lua/TheSiahxyz/core/lazy.lua234
-rw-r--r--mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/ssh.lua221
-rw-r--r--mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/textobject.lua227
-rw-r--r--mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/treesitter.lua80
-rw-r--r--mac/.config/TheSiahxyz/lua/TheSiahxyz/snippets/recordings.lua30
-rw-r--r--mac/.config/aerospace/aerospace.toml2
-rw-r--r--mac/.config/git/config4
-rw-r--r--mac/.config/git/ignore1
-rw-r--r--mac/.config/htop/htoprc53
-rw-r--r--mac/.config/lf/lfrc4
-rw-r--r--mac/.config/sesh/sesh.toml4
-rw-r--r--mac/.config/shell/aliasrc2
-rw-r--r--mac/.config/shell/bm-files6
-rw-r--r--mac/.config/shell/profile55
-rw-r--r--mac/.config/vim/init.vim2
-rw-r--r--mac/.config/vim/vimrc7
-rw-r--r--mac/.config/zsh/.zshrc2
-rw-r--r--mac/.config/zsh/keymaps.zsh8
18 files changed, 750 insertions, 192 deletions
diff --git a/mac/.config/TheSiahxyz/lua/TheSiahxyz/core/lazy.lua b/mac/.config/TheSiahxyz/lua/TheSiahxyz/core/lazy.lua
index 52eff22..802a3a5 100644
--- a/mac/.config/TheSiahxyz/lua/TheSiahxyz/core/lazy.lua
+++ b/mac/.config/TheSiahxyz/lua/TheSiahxyz/core/lazy.lua
@@ -23,17 +23,235 @@ vim.opt.rtp:prepend(lazypath)
-- Setup lazy.nvim
require("lazy").setup({
+ root = vim.fn.stdpath("data") .. "/lazy", -- directory where plugins will be installed
+ defaults = {
+ -- Set this to `true` to have all your plugins lazy-loaded by default.
+ -- Only do this if you know what you are doing, as it can lead to unexpected behavior.
+ lazy = false, -- should plugins be lazy-loaded?
+ -- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
+ -- have outdated releases, which may break your Neovim install.
+ version = nil, -- always use the latest git commit
+ -- version = "*", -- try installing the latest stable version for plugins that support semver
+ -- default `cond` you can use to globally disable a lot of plugins
+ -- when running inside vscode for example
+ cond = nil, ---@type boolean|fun(self:LazyPlugin):boolean|nil
+ },
+ -- leave nil when passing the spec as the first argument to setup()
-- highlight-start
spec = {
-- import your plugins
{ import = "TheSiahxyz.plugins" },
},
- -- highlight-end
- -- Configure any other settings here. See the documentation for more details.
- -- colorscheme that will be used when installing plugins.
- install = { colorscheme = { "catppuccin" } },
- -- automatically check for plugin updates
- checker = { enabled = false },
- -- automatically check for config file changes and reload the ui
- change_detection = { enabled = false },
+ local_spec = true, -- load project specific .lazy.lua spec files. They will be added at the end of the spec.
+ lockfile = vim.fn.stdpath("config") .. "/lazy-lock.json", -- lockfile generated after running update.
+ ---@type number? limit the maximum amount of concurrent tasks
+ concurrency = jit.os:find("Windows") and (vim.uv.available_parallelism() * 2) or nil,
+ git = {
+ -- defaults for the `Lazy log` command
+ -- log = { "--since=3 days ago" }, -- show commits from the last 3 days
+ log = { "-8" }, -- show the last 8 commits
+ timeout = 120, -- kill processes that take more than 2 minutes
+ url_format = "https://github.com/%s.git",
+ -- lazy.nvim requires git >=2.19.0. If you really want to use lazy with an older version,
+ -- then set the below to false. This should work, but is NOT supported and will
+ -- increase downloads a lot.
+ filter = true,
+ -- rate of network related git operations (clone, fetch, checkout)
+ throttle = {
+ enabled = false, -- not enabled by default
+ -- max 2 ops every 5 seconds
+ rate = 2,
+ duration = 5 * 1000, -- in ms
+ },
+ -- Time in seconds to wait before running fetch again for a plugin.
+ -- Repeated update/check operations will not run again until this
+ -- cooldown period has passed.
+ cooldown = 0,
+ },
+ pkg = {
+ enabled = true,
+ cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua",
+ -- the first package source that is found for a plugin will be used.
+ sources = {
+ "lazy",
+ "rockspec", -- will only be used when rocks.enabled is true
+ "packspec",
+ },
+ },
+ rocks = {
+ enabled = true,
+ root = vim.fn.stdpath("data") .. "/lazy-rocks",
+ server = "https://lumen-oss.github.io/rocks-binaries/",
+ -- use hererocks to install luarocks?
+ -- set to `nil` to use hererocks when luarocks is not found
+ -- set to `true` to always use hererocks
+ -- set to `false` to always use luarocks
+ hererocks = nil,
+ },
+ dev = {
+ -- Directory where you store your local plugin projects. If a function is used,
+ -- the plugin directory (e.g. `~/projects/plugin-name`) must be returned.
+ ---@type string | fun(plugin: LazyPlugin): string
+ path = "~/projects",
+ ---@type string[] plugins that match these patterns will use your local versions instead of being fetched from GitHub
+ patterns = {}, -- For example {"folke"}
+ fallback = false, -- Fallback to git when local plugin doesn't exist
+ },
+ install = {
+ -- install missing plugins on startup. This doesn't increase startup time.
+ missing = true,
+ -- try to load one of these colorschemes when starting an installation during startup
+ colorscheme = { "catppuccin" },
+ },
+ ui = {
+ -- a number <1 is a percentage., >1 is a fixed size
+ size = { width = 0.8, height = 0.8 },
+ wrap = true, -- wrap the lines in the ui
+ -- The border to use for the UI window. Accepts same border values as |nvim_open_win()|.
+ border = "none",
+ -- The backdrop opacity. 0 is fully opaque, 100 is fully transparent.
+ backdrop = 60,
+ title = nil, ---@type string only works when border is not "none"
+ title_pos = "center", ---@type "center" | "left" | "right"
+ -- Show pills on top of the Lazy window
+ pills = true, ---@type boolean
+ icons = {
+ cmd = " ",
+ config = "",
+ debug = "● ",
+ event = " ",
+ favorite = " ",
+ ft = " ",
+ init = " ",
+ import = " ",
+ keys = " ",
+ lazy = "󰒲 ",
+ loaded = "●",
+ not_loaded = "○",
+ plugin = " ",
+ runtime = " ",
+ require = "󰢱 ",
+ source = " ",
+ start = " ",
+ task = "✔ ",
+ list = {
+ "●",
+ "➜",
+ "★",
+ "‒",
+ },
+ },
+ -- leave nil, to automatically select a browser depending on your OS.
+ -- If you want to use a specific browser, you can define it here
+ browser = nil, ---@type string?
+ throttle = 1000 / 30, -- how frequently should the ui process render events
+ custom_keys = {
+ -- You can define custom key maps here. If present, the description will
+ -- be shown in the help menu.
+ -- To disable one of the defaults, set it to false.
+
+ ["<leader>gL"] = {
+ function(plugin)
+ require("lazy.util").float_term({ "lazygit", "log" }, {
+ cwd = plugin.dir,
+ })
+ end,
+ desc = "Open lazygit log",
+ },
+
+ ["<leader>is"] = {
+ function(plugin)
+ Util.notify(vim.inspect(plugin), {
+ title = "Inspect " .. plugin.name,
+ lang = "lua",
+ })
+ end,
+ desc = "Inspect Plugin",
+ },
+
+ ["<leader><C-p>"] = {
+ function(plugin)
+ require("lazy.util").float_term(nil, {
+ cwd = plugin.dir,
+ })
+ end,
+ desc = "Open terminal in plugin dir",
+ },
+ },
+ },
+ -- Output options for headless mode
+ headless = {
+ -- show the output from process commands like git
+ process = true,
+ -- show log messages
+ log = true,
+ -- show task start/end
+ task = true,
+ -- use ansi colors
+ colors = true,
+ },
+ diff = {
+ -- diff command <d> can be one of:
+ -- * browser: opens the github compare view. Note that this is always mapped to <K> as well,
+ -- so you can have a different command for diff <d>
+ -- * git: will run git diff and open a buffer with filetype git
+ -- * terminal_git: will open a pseudo terminal with git diff
+ -- * diffview.nvim: will open Diffview to show the diff
+ cmd = "git",
+ },
+ checker = {
+ -- automatically check for plugin updates
+ enabled = false,
+ concurrency = nil, ---@type number? set to 1 to check for updates very slowly
+ notify = true, -- get a notification when new updates are found
+ frequency = 3600, -- check for updates every hour
+ check_pinned = false, -- check for pinned packages that can't be updated
+ },
+ change_detection = {
+ -- automatically check for config file changes and reload the ui
+ enabled = false,
+ notify = false, -- get a notification when changes are found
+ },
+ performance = {
+ cache = {
+ enabled = true,
+ },
+ reset_packpath = true, -- reset the package path to improve startup time
+ rtp = {
+ reset = true, -- reset the runtime path to $VIMRUNTIME and your config directory
+ ---@type string[]
+ paths = {}, -- add any custom paths here that you want to includes in the rtp
+ ---@type string[] list any plugins you want to disable here
+ disabled_plugins = {
+ -- "gzip",
+ -- "matchit",
+ -- "matchparen",
+ -- "netrwPlugin",
+ -- "tarPlugin",
+ -- "tohtml",
+ -- "tutor",
+ -- "zipPlugin",
+ },
+ },
+ },
+ -- lazy can generate helptags from the headings in markdown readme files,
+ -- so :help works even for plugins that don't have vim docs.
+ -- when the readme opens with :help it will be correctly displayed as markdown
+ readme = {
+ enabled = true,
+ root = vim.fn.stdpath("state") .. "/lazy/readme",
+ files = { "README.md", "lua/**/README.md" },
+ -- only generate markdown helptags for plugins that don't have docs
+ skip_if_doc_exists = true,
+ },
+ state = vim.fn.stdpath("state") .. "/lazy/state.json", -- state info for checker and other things
+ -- Enable profiling of lazy.nvim. This will add some overhead,
+ -- so only enable this when you are debugging lazy.nvim
+ profiling = {
+ -- Enables extra stats on the debug tab related to the loader cache.
+ -- Additionally gathers stats about all package.loaders
+ loader = false,
+ -- Track each new require in the Lazy profiling tab
+ require = false,
+ },
})
diff --git a/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/ssh.lua b/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/ssh.lua
index 748191f..df8aad5 100644
--- a/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/ssh.lua
+++ b/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/ssh.lua
@@ -203,4 +203,225 @@ return {
require("telescope").load_extension("remote-sshfs")
end,
},
+ {
+ "inhesrom/remote-ssh.nvim",
+ branch = "master",
+ dependencies = {
+ "inhesrom/telescope-remote-buffer", --See https://github.com/inhesrom/telescope-remote-buffer for features
+ "nvim-telescope/telescope.nvim",
+ "nvim-lua/plenary.nvim",
+ "neovim/nvim-lspconfig",
+ -- nvim-notify is recommended, but not necessarily required into order to get notifcations during operations - https://github.com/rcarriga/nvim-notify
+ "rcarriga/nvim-notify",
+ },
+ config = function()
+ require("telescope-remote-buffer").setup(
+ -- Default keymaps to open telescope and search open buffers including "remote" open buffers
+ --fzf = "<leader>fz",
+ --match = "<leader>gb",
+ --oldfiles = "<leader>rb"
+ )
+
+ -- setup lsp_config here or import from part of neovim config that sets up LSP
+ require("remote-ssh").setup({
+ -- Optional: Custom on_attach function for LSP clients
+ on_attach = function(client, bufnr)
+ -- Your LSP keybindings and setup
+ end,
+
+ -- Optional: Custom capabilities for LSP clients
+ capabilities = vim.lsp.protocol.make_client_capabilities(),
+
+ -- Custom mapping from filetype to LSP server name
+ filetype_to_server = {
+ -- Example: Use pylsp for Python (default and recommended)
+ python = "pylsp",
+ -- More customizations...
+ },
+
+ -- Custom server configurations
+ server_configs = {
+ -- Custom config for clangd
+ clangd = {
+ filetypes = { "c", "cpp", "objc", "objcpp" },
+ root_patterns = { ".git", "compile_commands.json" },
+ init_options = {
+ usePlaceholders = true,
+ completeUnimported = true,
+ },
+ },
+ -- More server configs...
+ },
+
+ -- Async write configuration
+ async_write_opts = {
+ timeout = 30, -- Timeout in seconds for write operations
+ debug = false, -- Enable debug logging
+ log_level = vim.log.levels.INFO,
+ autosave = true, -- Enable automatic saving on text changes (default: true)
+ -- Set to false to disable auto-save while keeping manual saves (:w) working
+ save_debounce_ms = 3000, -- Delay before initiating auto-save to handle rapid editing (default: 3000)
+ },
+ })
+
+ -- Custom function to parse SSH config and extract Host entries
+ local function parse_ssh_hosts()
+ local ssh_config_path = vim.fn.expand("$HOME") .. "/.ssh/config"
+ local hosts = {}
+ local seen = {}
+
+ -- Check if file exists
+ if vim.fn.filereadable(ssh_config_path) == 0 then
+ return hosts
+ end
+
+ -- Read and parse SSH config file
+ local lines = vim.fn.readfile(ssh_config_path)
+ for _, line in ipairs(lines) do
+ -- Trim whitespace
+ local trimmed = vim.fn.trim(line)
+ -- Skip comments and empty lines
+ if trimmed ~= "" and not vim.startswith(trimmed, "#") then
+ -- Match "Host" keyword exactly (case-insensitive) followed by whitespace
+ -- Use pattern to ensure it's "Host " not "HostName" or other keywords
+ local host_match = string.match(string.lower(trimmed), "^host%s+(.+)$")
+ if host_match then
+ -- Handle multiple hosts on same line (space or comma separated)
+ for host in vim.gsplit(host_match, "[%s,]+") do
+ host = vim.fn.trim(host)
+ -- Skip wildcards and empty strings
+ if host ~= "" and host ~= "*" and not string.match(host, "^%*") and not seen[host] then
+ table.insert(hosts, host)
+ seen[host] = true
+ end
+ end
+ end
+ end
+ end
+
+ return hosts
+ end
+
+ -- Custom function to open RemoteTreeBrowser with selected SSH host
+ local function remote_tree_browser_picker()
+ local hosts = parse_ssh_hosts()
+ if #hosts == 0 then
+ return vim.notify(
+ "No SSH hosts found in ~/.ssh/config",
+ vim.log.levels.WARN,
+ { title = "Remote SSH" }
+ )
+ end
+
+ -- Use vim.ui.select (default Neovim UI)
+ vim.ui.select(hosts, { prompt = "Select SSH host for RemoteTreeBrowser" }, function(choice)
+ if choice and choice ~= "" then
+ -- Use rsync:// protocol with double slash (//) for SSH config Host aliases
+ -- Format: rsync://host-alias//path (double slash is required for SSH config aliases)
+ -- The plugin automatically detects and handles SSH config settings
+ local rsync_url = "rsync://" .. choice .. "//"
+
+ -- Run RemoteTreeBrowser command
+ -- rsync:// protocol will use SSH config to resolve Host alias
+ vim.schedule(function()
+ -- Step 1: Create browser
+ vim.api.nvim_cmd({ cmd = "RemoteTreeBrowser", args = { rsync_url } }, {})
+ -- Step 2: Hide browser (needed for proper positioning)
+ vim.defer_fn(function()
+ vim.api.nvim_cmd({ cmd = "RemoteTreeBrowserHide" }, {})
+ -- Step 3: Show browser (will open on the right side)
+ vim.defer_fn(function()
+ vim.api.nvim_cmd({ cmd = "RemoteTreeBrowserShow" }, {})
+ end, 50)
+ end, 100)
+ end)
+ end
+ end)
+ end
+
+ -- Toggle function for RemoteTreeBrowser show/hide
+ local function remote_tree_browser_toggle()
+ -- Try to access remote-ssh.nvim's TreeBrowser module
+ local ok, tree_browser = pcall(require, "remote-ssh.tree_browser")
+ if ok and tree_browser then
+ -- Check if browser buffer exists (like show_tree() does)
+ local bufnr = tree_browser.bufnr
+ if not bufnr or not vim.api.nvim_buf_is_valid(bufnr) then
+ -- Browser doesn't exist, show SSH config picker to create one
+ remote_tree_browser_picker()
+ return
+ end
+
+ -- Browser buffer exists, check if window is visible (like hide_tree() does)
+ local win_id = tree_browser.win_id
+ local is_visible = win_id and vim.api.nvim_win_is_valid(win_id)
+
+ if is_visible then
+ -- Browser is visible, hide it
+ if tree_browser.hide_tree then
+ tree_browser.hide_tree()
+ else
+ vim.api.nvim_cmd({ cmd = "RemoteTreeBrowserHide" }, {})
+ end
+ -- After hiding, return early to prevent any further actions
+ return
+ else
+ -- Browser exists but hidden, show it
+ -- Directly use command instead of show_tree() to avoid any callbacks
+ vim.api.nvim_cmd({ cmd = "RemoteTreeBrowserShow" }, {})
+ end
+ else
+ -- Fallback: only use this if module is not accessible
+ -- Check if browser buffer exists (not just visible windows)
+ local browser_buf_found = false
+ local browser_visible = false
+
+ -- Check all buffers, not just visible windows
+ for _, buf in ipairs(vim.api.nvim_list_bufs()) do
+ if vim.api.nvim_buf_is_valid(buf) then
+ local buf_name = vim.api.nvim_buf_get_name(buf)
+ -- Check if it's a remote tree browser buffer
+ if buf_name:match("rsync://") then
+ browser_buf_found = true
+ -- Check if this buffer is visible in any window
+ for _, win in ipairs(vim.api.nvim_list_wins()) do
+ if vim.api.nvim_win_get_buf(win) == buf then
+ browser_visible = true
+ break
+ end
+ end
+ break
+ end
+ end
+ end
+
+ if browser_buf_found then
+ -- Browser buffer exists
+ if browser_visible then
+ -- Browser is visible, hide it
+ vim.api.nvim_cmd({ cmd = "RemoteTreeBrowserHide" }, {})
+ else
+ -- Browser exists but hidden, show it
+ vim.api.nvim_cmd({ cmd = "RemoteTreeBrowserShow" }, {})
+ end
+ else
+ -- Browser not found, show SSH config picker
+ remote_tree_browser_picker()
+ end
+ end
+ end
+
+ -- Keymap for custom RemoteTreeBrowser picker
+ vim.keymap.set("n", "<leader>er", remote_tree_browser_picker, {
+ desc = "RemoteTreeBrowser (pick SSH host)",
+ silent = true,
+ })
+
+ -- Keymap for toggle RemoteTreeBrowser show/hide
+ vim.keymap.set("n", "<leader>ef", remote_tree_browser_toggle, {
+ desc = "Toggle RemoteTreeBrowser",
+ silent = true,
+ })
+ end,
+ },
}
diff --git a/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/textobject.lua b/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/textobject.lua
index 3002fc0..b82eac6 100644
--- a/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/textobject.lua
+++ b/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/textobject.lua
@@ -1,8 +1,8 @@
return {
"nvim-treesitter/nvim-treesitter-textobjects",
+ branch = "main",
dependencies = {
- { "nvim-treesitter", build = ":TSUpdate" },
- { "nvim-treesitter/nvim-treesitter" },
+ { "nvim-treesitter/nvim-treesitter", build = ":TSUpdate" },
{
"chrisgrieser/nvim-various-textobjs",
event = "UIEnter",
@@ -14,6 +14,16 @@ return {
},
},
init = function()
+ -- Disable entire built-in ftplugin mappings to avoid conflicts.
+ -- See https://github.com/neovim/neovim/tree/master/runtime/ftplugin for built-in ftplugins.
+ vim.g.no_plugin_maps = true
+
+ -- Or, disable per filetype (add as you like)
+ -- vim.g.no_python_maps = true
+ -- vim.g.no_ruby_maps = true
+ -- vim.g.no_rust_maps = true
+ -- vim.g.no_go_maps = true
+
local wk = require("which-key")
wk.add({
{
@@ -26,115 +36,138 @@ return {
})
end,
config = function()
- require("nvim-treesitter.configs").setup({
- textobjects = {
- select = {
- enable = true,
-
- -- Automatically jump forward to textobj, similar to targets.vim
- lookahead = true,
-
- keymaps = {
- -- You can use the capture groups defined in textobjects.scm
- ["a="] = { query = "@assignment.outer", desc = "Select outer part of an assignment" },
- ["i="] = { query = "@assignment.inner", desc = "Select inner part of an assignment" },
- ["h="] = { query = "@assignment.lhs", desc = "Select left hand side of an assignment" },
- ["l="] = { query = "@assignment.rhs", desc = "Select right hand side of an assignment" },
-
- -- works for javascript/typescript files (custom capture I created in after/queries/ecma/textobjects.scm)
- ["a:"] = { query = "@property.outer", desc = "Select outer part of an object property" },
- ["i:"] = { query = "@property.inner", desc = "Select inner part of an object property" },
- ["h:"] = { query = "@property.lhs", desc = "Select left part of an object property" },
- ["l:"] = { query = "@property.rhs", desc = "Select right part of an object property" },
-
- ["aa"] = { query = "@parameter.outer", desc = "Select outer part of a parameter/argument" },
- ["ia"] = { query = "@parameter.inner", desc = "Select inner part of a parameter/argument" },
+ require("nvim-treesitter-textobjects").setup({
+ select = {
+ -- Automatically jump forward to textobj, similar to targets.vim
+ lookahead = true,
+ -- You can choose the select mode (default is charwise 'v')
+ --
+ -- Can also be a function which gets passed a table with the keys
+ -- * query_string: eg '@function.inner'
+ -- * method: eg 'v' or 'o'
+ -- and should return the mode ('v', 'V', or '<c-v>') or a table
+ -- mapping query_strings to modes.
+ selection_modes = {
+ ["@parameter.outer"] = "v", -- charwise
+ ["@function.outer"] = "V", -- linewise
+ ["@class.outer"] = "<c-v>", -- blockwise
+ },
+ -- If you set this to `true` (default is `false`) then any textobject is
+ -- extended to include preceding or succeeding whitespace. Succeeding
+ -- whitespace has priority in order to act similarly to eg the built-in
+ -- `ap`.
+ --
+ -- Can also be a function which gets passed a table with the keys
+ -- * query_string: eg '@function.inner'
+ -- * selection_mode: eg 'v'
+ -- and should return true of false
+ include_surrounding_whitespace = false,
+ },
+ move = {
+ -- whether to set jumps in the jumplist
+ set_jumps = true,
+ },
+ })
- ["an"] = { query = "@conditional.outer", desc = "Select outer part of a conditional" },
- ["in"] = { query = "@conditional.inner", desc = "Select inner part of a conditional" },
+ -- keymaps
+ -- You can use the capture groups defined in `textobjects.scm`
+ vim.keymap.set({ "x", "o" }, "am", function()
+ require("nvim-treesitter-textobjects.select").select_textobject("@function.outer", "textobjects")
+ end)
+ vim.keymap.set({ "x", "o" }, "im", function()
+ require("nvim-treesitter-textobjects.select").select_textobject("@function.inner", "textobjects")
+ end)
+ vim.keymap.set({ "x", "o" }, "ac", function()
+ require("nvim-treesitter-textobjects.select").select_textobject("@class.outer", "textobjects")
+ end)
+ vim.keymap.set({ "x", "o" }, "ic", function()
+ require("nvim-treesitter-textobjects.select").select_textobject("@class.inner", "textobjects")
+ end)
+ -- You can also use captures from other query groups like `locals.scm`
+ vim.keymap.set({ "x", "o" }, "as", function()
+ require("nvim-treesitter-textobjects.select").select_textobject("@local.scope", "locals")
+ end)
+ -- keymaps
+ vim.keymap.set("n", "<leader>a", function()
+ require("nvim-treesitter-textobjects.swap").swap_next("@parameter.inner")
+ end)
+ vim.keymap.set("n", "<leader>A", function()
+ require("nvim-treesitter-textobjects.swap").swap_previous("@parameter.outer")
+ end)
+ -- You can use the capture groups defined in `textobjects.scm`
+ vim.keymap.set({ "n", "x", "o" }, "]m", function()
+ require("nvim-treesitter-textobjects.move").goto_next_start("@function.outer", "textobjects")
+ end)
+ vim.keymap.set({ "n", "x", "o" }, "]]", function()
+ require("nvim-treesitter-textobjects.move").goto_next_start("@class.outer", "textobjects")
+ end)
+ -- You can also pass a list to group multiple queries.
+ vim.keymap.set({ "n", "x", "o" }, "]o", function()
+ move.goto_next_start({ "@loop.inner", "@loop.outer" }, "textobjects")
+ end)
+ -- You can also use captures from other query groups like `locals.scm` or `folds.scm`
+ vim.keymap.set({ "n", "x", "o" }, "]s", function()
+ require("nvim-treesitter-textobjects.move").goto_next_start("@local.scope", "locals")
+ end)
+ vim.keymap.set({ "n", "x", "o" }, "]z", function()
+ require("nvim-treesitter-textobjects.move").goto_next_start("@fold", "folds")
+ end)
- ["ap"] = { query = "@loop.outer", desc = "Select outer part of a loop" },
- ["ip"] = { query = "@loop.inner", desc = "Select inner part of a loop" },
+ vim.keymap.set({ "n", "x", "o" }, "]M", function()
+ require("nvim-treesitter-textobjects.move").goto_next_end("@function.outer", "textobjects")
+ end)
+ vim.keymap.set({ "n", "x", "o" }, "][", function()
+ require("nvim-treesitter-textobjects.move").goto_next_end("@class.outer", "textobjects")
+ end)
- ["af"] = { query = "@call.outer", desc = "Select outer part of a function call" },
- ["if"] = { query = "@call.inner", desc = "Select inner part of a function call" },
+ vim.keymap.set({ "n", "x", "o" }, "[m", function()
+ require("nvim-treesitter-textobjects.move").goto_previous_start("@function.outer", "textobjects")
+ end)
+ vim.keymap.set({ "n", "x", "o" }, "[[", function()
+ require("nvim-treesitter-textobjects.move").goto_previous_start("@class.outer", "textobjects")
+ end)
- ["am"] = {
- query = "@function.outer",
- desc = "Select outer part of a method/function definition",
- },
- ["im"] = {
- query = "@function.inner",
- desc = "Select inner part of a method/function definition",
- },
+ vim.keymap.set({ "n", "x", "o" }, "[M", function()
+ require("nvim-treesitter-textobjects.move").goto_previous_end("@function.outer", "textobjects")
+ end)
+ vim.keymap.set({ "n", "x", "o" }, "[]", function()
+ require("nvim-treesitter-textobjects.move").goto_previous_end("@class.outer", "textobjects")
+ end)
- ["ac"] = { query = "@class.outer", desc = "Select outer part of a class" },
- ["ic"] = { query = "@class.inner", desc = "Select inner part of a class" },
- },
- },
- swap = {
- enable = true,
- swap_next = {
- ["g>a"] = { query = "@parameter.inner", desc = "swap parameters/argument with next" },
- ["g>:"] = { query = "@property.outer", desc = "swap object property with next" },
- ["g>m"] = { query = "@function.outer", desc = "swap function with next" },
- },
- swap_previous = {
- ["g<a"] = { query = "@parameter.inner", desc = "swap parameters/argument with prev" },
- ["g<:"] = { query = "@property.outer", desc = "swap object property with prev" },
- ["g<m"] = { query = "@function.outer", desc = "swap function with previous" },
- },
- },
- move = {
- enable = true,
- set_jumps = true, -- whether to set jumps in the jumplist
- goto_next_start = {
- ["]f"] = { query = "@call.outer", desc = "Next function call start" },
- ["]m"] = { query = "@function.outer", desc = "Next method/function def start" },
- ["]c"] = { query = "@class.outer", desc = "Next class start" },
- ["]="] = { query = "@conditional.outer", desc = "Next conditional start" },
- ["]l"] = { query = "@loop.outer", desc = "Next loop start" },
+ -- Go to either the start or the end, whichever is closer.
+ -- Use if you want more granular movements
+ vim.keymap.set({ "n", "x", "o" }, "]d", function()
+ require("nvim-treesitter-textobjects.move").goto_next("@conditional.outer", "textobjects")
+ end)
+ vim.keymap.set({ "n", "x", "o" }, "[d", function()
+ require("nvim-treesitter-textobjects.move").goto_previous("@conditional.outer", "textobjects")
+ end)
- -- You can pass a query group to use query from `queries/<lang>/<query_group>.scm file in your runtime path.
- -- Below example nvim-treesitter's `locals.scm` and `folds.scm`. They also provide highlights.scm and indent.scm.
- ["]-"] = { query = "@scope", query_group = "locals", desc = "Next scope" },
- ["]z"] = { query = "@fold", query_group = "folds", desc = "Next fold" },
- },
- goto_next_end = {
- ["]F"] = { query = "@call.outer", desc = "Next function call end" },
- ["]M"] = { query = "@function.outer", desc = "Next method/function def end" },
- ["]C"] = { query = "@class.outer", desc = "Next class end" },
- ["]+"] = { query = "@conditional.outer", desc = "Next conditional end" },
- ["]L"] = { query = "@loop.outer", desc = "Next loop end" },
- },
- goto_previous_start = {
- ["[f"] = { query = "@call.outer", desc = "Prev function call start" },
- ["[m"] = { query = "@function.outer", desc = "Prev method/function def start" },
- ["[c"] = { query = "@class.outer", desc = "Prev class start" },
- ["[="] = { query = "@conditional.outer", desc = "Prev conditional start" },
- ["[l"] = { query = "@loop.outer", desc = "Prev loop start" },
- },
- goto_previous_end = {
- ["[F"] = { query = "@call.outer", desc = "Prev function call end" },
- ["[M"] = { query = "@function.outer", desc = "Prev method/function def end" },
- ["[C"] = { query = "@class.outer", desc = "Prev class end" },
- ["[+"] = { query = "@conditional.outer", desc = "Prev conditional end" },
- ["[L"] = { query = "@loop.outer", desc = "Prev loop end" },
- },
- },
- },
- })
+ local ts_repeat_move = require("nvim-treesitter-textobjects.repeatable_move")
- 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)
-- vim way: ; goes to the direction you were moving.
- vim.keymap.set({ "n", "x", "o" }, ";", ts_repeat_move.repeat_last_move)
- vim.keymap.set({ "n", "x", "o" }, ",", ts_repeat_move.repeat_last_move_opposite)
+ -- vim.keymap.set({ "n", "x", "o" }, ";", ts_repeat_move.repeat_last_move)
+ -- vim.keymap.set({ "n", "x", "o" }, ",", ts_repeat_move.repeat_last_move_opposite)
-- 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 })
+
+ -- This repeats the last query with always previous direction and to the start of the range.
+ vim.keymap.set({ "n", "x", "o" }, "<home>", function()
+ ts_repeat_move.repeat_last_move({ forward = false, start = true })
+ end)
+
+ -- This repeats the last query with always next direction and to the end of the range.
+ vim.keymap.set({ "n", "x", "o" }, "<end>", function()
+ ts_repeat_move.repeat_last_move({ forward = true, start = false })
+ end)
end,
}
diff --git a/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/treesitter.lua b/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/treesitter.lua
index c486343..7a9639c 100644
--- a/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/treesitter.lua
+++ b/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/treesitter.lua
@@ -1,62 +1,38 @@
return {
"nvim-treesitter/nvim-treesitter",
+ lazy = false,
build = ":TSUpdate",
dependencies = { "nvim-treesitter/nvim-treesitter-textobjects" },
config = function()
- require("nvim-treesitter.configs").setup({
- -- A list of parser names, or "all"
- ensure_installed = {
- "bash",
- "c",
- "cpp",
- "dockerfile",
- "html",
- "java",
- "json5",
- "latex",
- "lua",
- "markdown",
- "markdown_inline",
- "python",
- "sql",
- "vim",
- "vimdoc",
- },
-
- -- Install parsers synchronously (only applied to `ensure_installed`)
- sync_install = true,
-
- -- Automatically install missing parsers when entering buffer
- -- Recommendation: set to false if you don"t have `tree-sitter` CLI installed locally
- auto_install = true,
-
- -- List of parsers to ignore installing (or "all")
- ignore_install = {},
-
- highlight = {
- -- `false` will disable the whole extension
- enable = true,
- disable = { "csv" },
- -- Setting this to true will run `:h syntax` and tree-sitter at the same time.
- -- Set this to `true` if you depend on "syntax" being enabled (like for indentation).
- -- Using this option may slow down your editor, and you may see some duplicate highlights.
- -- Instead of true it can also be a list of languages
- additional_vim_regex_highlighting = { "markdown" },
- },
+ require("nvim-treesitter").setup({
+ install_dir = vim.fn.stdpath("data") .. "/treesitter",
})
-
- local treesitter_parser_config = require("nvim-treesitter.parsers").get_parser_configs()
- treesitter_parser_config.templ = {
- install_info = {
- url = "https://github.com/vrischmann/tree-sitter-templ.git",
- files = { "src/parser.c", "src/scanner.c" },
- branch = "master",
- },
- }
-
- vim.treesitter.language.register("templ", "templ")
end,
keys = {
- { "<leader>T", ":TSUpdate<cr>", desc = "Update treesitter" },
+ { "<leader>TU", ":TSUpdate<cr>", desc = "Update treesitter" },
+ {
+ "<leader>TI",
+ function()
+ require("nvim-treesitter").install({
+ "bash",
+ "c",
+ "cpp",
+ "dockerfile",
+ "html",
+ "java",
+ "javascript",
+ "json5",
+ "latex",
+ "lua",
+ "markdown",
+ "markdown_inline",
+ "python",
+ "sql",
+ "vim",
+ "vimdoc",
+ })
+ end,
+ desc = "Update treesitter",
+ },
},
}
diff --git a/mac/.config/TheSiahxyz/lua/TheSiahxyz/snippets/recordings.lua b/mac/.config/TheSiahxyz/lua/TheSiahxyz/snippets/recordings.lua
new file mode 100644
index 0000000..9ce9124
--- /dev/null
+++ b/mac/.config/TheSiahxyz/lua/TheSiahxyz/snippets/recordings.lua
@@ -0,0 +1,30 @@
+local ls = require("luasnip")
+
+local s = ls.snippet
+local i = ls.insert_node
+local f = ls.function_node
+
+local fmt = require("luasnip.extras.fmt").fmta
+
+local recordings_snippet = s(
+ "recordings",
+ fmt(
+ [[---
+title: <title>
+date: <date>
+---
+
+<story>
+]],
+ {
+ title = i(1, "My Journal"),
+ date = f(function()
+ return os.date("%Y-%m-%d")
+ end, {}),
+ story = i(3),
+ }
+ )
+)
+
+ls.add_snippets("markdown", { recordings_snippet })
+ls.add_snippets("quarto", { recordings_snippet })
diff --git a/mac/.config/aerospace/aerospace.toml b/mac/.config/aerospace/aerospace.toml
index 3034471..fe22565 100644
--- a/mac/.config/aerospace/aerospace.toml
+++ b/mac/.config/aerospace/aerospace.toml
@@ -252,7 +252,7 @@ on-focus-changed = ['move-mouse window-lazy-center']
alt-shift-semicolon = [
'fullscreen',
'mode main',
- ] # Toggle between floating and tiling layout
+ ] # Toggle between fullscreen and tiling layout
backspace = ['close-all-windows-but-current', 'mode main']
alt-shift-h = ['join-with left', 'mode main']
diff --git a/mac/.config/git/config b/mac/.config/git/config
index 0324918..29c8585 100644
--- a/mac/.config/git/config
+++ b/mac/.config/git/config
@@ -10,6 +10,8 @@
branch = bold magenta
changed = yellow
untracked = blue
+[commit]
+ gpgSign = false
[credential]
helper = cache
helper = store
@@ -84,5 +86,3 @@
name = TheSiahxyz
email = 164138827+TheSiahxyz@users.noreply.github.com
signingkey = 67BE7AD056C803BA
-[commit]
- gpgsign = true
diff --git a/mac/.config/git/ignore b/mac/.config/git/ignore
index 4246b1a..2121586 100644
--- a/mac/.config/git/ignore
+++ b/mac/.config/git/ignore
@@ -80,7 +80,6 @@ Thumbs.db
# Private
*personal*
-/content/recordings/**
# Shortcuts
shortcutrc
diff --git a/mac/.config/htop/htoprc b/mac/.config/htop/htoprc
new file mode 100644
index 0000000..8666417
--- /dev/null
+++ b/mac/.config/htop/htoprc
@@ -0,0 +1,53 @@
+# Beware! This file is rewritten by htop when settings are changed in the interface.
+# The parser is also very primitive, and not human-friendly.
+.all_branches_collapsed=0
+.sort_direction=-1
+.sort_key=PERCENT_CPU
+.tree_sort_direction=1
+.tree_sort_key=PID
+.tree_view=0
+.tree_view_always_by_pid=0
+account_guest_in_cpu_meter=0
+all_branches_collapsed=0
+color_scheme=5
+column_meter_modes_0=1 1 1 2 2 2 1
+column_meter_modes_1=
+column_meters_0=LeftCPUs Memory Swap Uptime LoadAverage Tasks RightCPUs
+column_meters_1=
+config_reader_min_version=3
+cpu_count_from_one=0
+delay=15
+detailed_cpu_time=0
+enable_mouse=1
+fields=0 48 17 18 38 39 2 46 46 47 49 1
+find_comm_in_cmdline=1
+header_layout=two_50_50
+header_margin=1
+hide_function_bar=0
+hide_kernel_threads=1
+hide_running_in_container=0
+hide_userland_threads=0
+highlight_base_name=1
+highlight_changes=1
+highlight_changes_delay_secs=1
+highlight_deleted_exe=1
+highlight_megabytes=1
+highlight_threads=1
+htop_version=3.3.0-dev
+screen:Main=PID USER PRIORITY NICE M_VIRT M_RESIDENT STATE PERCENT_CPU PERCENT_MEM TIME Command
+screen_tabs=1
+shadow_distribution_path_prefix=0
+shadow_other_users=1
+show_cpu_frequency=1
+show_cpu_usage=1
+show_merged_command=0
+show_program_path=1
+show_thread_names=0
+sort_direction=-1
+sort_key=46
+strip_exe_from_cmdline=1
+tree_sort_direction=1
+tree_sort_key=0
+tree_view=0
+tree_view_always_by_pid=0
+update_process_names=0
diff --git a/mac/.config/lf/lfrc b/mac/.config/lf/lfrc
index f7cb423..c9b2d36 100644
--- a/mac/.config/lf/lfrc
+++ b/mac/.config/lf/lfrc
@@ -432,7 +432,7 @@ cmd zi ${{
cmd follow_link %{{
lf -remote "send ${id} select '$(readlink $f)'"
}}
-cmd lastnvim ${{
+cmd lastfiles ${{
list=$(nvim -u NONE --headless +'lua io.write(table.concat(vim.v.oldfiles, "\n") .. "\n")' +qa)
file=$(printf "%s" "$list" | while read -r file; do
[ -f "$file" ] && printf "%s\n" "$file"
@@ -516,7 +516,7 @@ map <delete> delete; clear; save-select
map <enter> $$EDITOR "$f"
map <c-v> push :!nvim<space>
map vlf edit-config
-map vll lastnvim
+map vll lastfiles
map vln $$EDITOR "$(nvim -u NONE --headless +'lua io.write(vim.v.oldfiles[1] .. "\n")' +qa)"
# Extract
diff --git a/mac/.config/sesh/sesh.toml b/mac/.config/sesh/sesh.toml
index 954e199..76e6356 100644
--- a/mac/.config/sesh/sesh.toml
+++ b/mac/.config/sesh/sesh.toml
@@ -26,11 +26,11 @@ startup_command = "nvim tmux.conf"
preview_command = "bat --plain --wrap character --color=always ~/.config/tmux/tmux.conf"
[[session]]
-name = "config"
+name = "_config"
path = "~/.config"
[[session]]
-name = "dotfiles"
+name = "_dotfiles"
path = "~/.dotfiles"
[[session]]
diff --git a/mac/.config/shell/aliasrc b/mac/.config/shell/aliasrc
index 2163e68..6dcdf7d 100644
--- a/mac/.config/shell/aliasrc
+++ b/mac/.config/shell/aliasrc
@@ -292,7 +292,7 @@ alias nlu='NVIM_APPNAME=LunarVim nvim'
alias nlv='NVIM_APPNAME=LazyVim nvim'
alias nnc='NVIM_APPNAME=NvChad nvim'
alias snv='sudo nvim'
-alias vll='lastnvim -l'
+alias vll='lastfiles -l'
alias vln='$EDITOR -c '\''execute "edit " . v:oldfiles[0] | normal ''0'\'
# nxsiv
diff --git a/mac/.config/shell/bm-files b/mac/.config/shell/bm-files
index 17aefce..aabc278 100644
--- a/mac/.config/shell/bm-files
+++ b/mac/.config/shell/bm-files
@@ -25,10 +25,12 @@ vnp ${XDG_CONFIG_HOME:-${HOME}/.config}/ncmpcpp/config
vns ${XDG_CONFIG_HOME:-${HOME}/.config}/newsboat/config # Newsboat config (RSS reader)
vnu ${XDG_CONFIG_HOME:-${HOME}/.config}/newsboat/urls # Newsboat url (RSS reader)
vqt $HOME/.qutebrowser/config.py # Qutebrowser config
+vsa ${XDG_CONFIG_HOME:-${HOME}/.config}/shell/aliasrc # Aliases used by shell (and potentially other shells)
vse ${XDG_CONFIG_HOME:-${HOME}/.config}/sesh/sesh.toml # Sesh config
vsh $HOME/.ssh/config # SSH config
vsk ${XDG_CONFIG_HOME:-${HOME}/.config}/sketchybar/sketchybarrc # Sketchybar config
-vsp ${XDG_DATA_HOME:-${HOME}/.local/share}/thesiah/snippets # Snippets
+vsn ${XDG_DATA_HOME:-${HOME}/.local/share}/thesiah/snippets # Snippets
+vsp ${XDG_CONFIG_HOME:-${HOME}/.config}/shell/profile # Shell profile used for system
vss ${XDG_CONFIG_HOME:-${HOME}/.config}/starship/starship.toml # Starship
vsx ${XDG_CONFIG_HOME:-${HOME}/.config}/nsxiv/exec/key-handler # Nsxiv (image viewer) key/script handler
vtc ${XDG_CONFIG_HOME:-${HOME}/.config}/task/taskrc # Task config
@@ -43,8 +45,6 @@ vvw ${XDG_DATA_HOME:-${HOME}/.local/share}/vimwiki/index.md
vyc ${XDG_CONFIG_HOME:-${HOME}/.config}/yazi/yazi.toml # Yazi config
vyi ${XDG_CONFIG_HOME:-${HOME}/.config}/yazi/init.lua # Yazi init for plugins
vyk ${XDG_CONFIG_HOME:-${HOME}/.config}/yazi/keymap-default.toml # Yazi key config
-vza ${XDG_CONFIG_HOME:-${HOME}/.config}/shell/aliasrc # Aliases used by zsh (and potentially other shells)
vzc ${ZDOTDIR:-${XDG_CONFIG_HOME:-${HOME}/.config}/zsh}/.zshrc # Zsh config
vzk ${ZDOTDIR:-${XDG_CONFIG_HOME:-${HOME}/.config}/zsh}/keymaps.zsh # Zsh keymaps
-vzp ${XDG_CONFIG_HOME:-${HOME}/.config}/shell/profile # Zsh profile used for system
vzs ${ZDOTDIR:-${XDG_CONFIG_HOME:-${HOME}/.config}/zsh}/scripts.zsh # Zsh scripts
diff --git a/mac/.config/shell/profile b/mac/.config/shell/profile
index 0b676be..546aafe 100644
--- a/mac/.config/shell/profile
+++ b/mac/.config/shell/profile
@@ -1,19 +1,9 @@
###################################################
-### --- ENV PATH --- ###
+### --- LANG --- ###
###################################################
export LANG=ko_KR.UTF-8
export LC_CTYPE=ko_KR.UTF-8
-# Add all directories in each subdirectory to $PATH
-export PATH="$PATH:$(find ~/.local/bin -path '*/.git*' -prune -o \( -type f -o -type l \) -perm -u=x -exec dirname {} \; | sort -u | paste -sd ':' -)"
-export PATH="$PATH:$(find ~/.local/share/.password-store -type d -name '.extensions' | paste -sd ':' -)"
-export PATH="$PATH:/opt/homebrew/bin"
-export PATH="$PATH:$(find -L /opt/homebrew/Caskroom \( -name bin -o -name MacOS \) -type d -print 2>/dev/null | sort -u | paste -s -d ':' -)"
-export PATH="$PATH:$(find -L /opt/homebrew/Cellar -name bin -type d -print 2>/dev/null | sort -u | paste -s -d ':' -)"
-export PATH="$PATH:$(find -L /opt/homebrew/opt -name bin -type d -print 2>/dev/null | sort -u | paste -s -d ':' -)"
-
-unsetopt PROMPT_SP 2>/dev/null
-
###################################################
### --- DEFAULT PROGRAMS --- ###
###################################################
@@ -64,7 +54,6 @@ export ANSIBLE_CONFIG="$XDG_CONFIG_HOME/ansible/ansible.cfg"
### --- ASDF --- ###
export ASDF_CONFIG_FILE="$XDG_CONFIG_HOME/asdf/asdfrc"
export ASDF_DATA_DIR="$XDG_DATA_HOME/asdf"
-export PATH="$ASDF_DATA_DIR/shims:$PATH"
### --- BAT --- ###
export BAT_CONFIG_PATH="$XDG_CONFIG_HOME/bat/config"
@@ -120,6 +109,12 @@ export JUPYTER_PLATFORM_DIRS="1"
### --- KODI --- ###
export KODI_DATA="$XDG_DATA_HOME/kodi"
+### --- LUA --- ###
+export LUA_BIN="/opt/homebrew/bin/lua"
+export LUA_CPATH="/usr/local/lib/lua/5.1/?.so;;"
+export LUA_INTERPRETER=lua5.1
+export LUA_PATH="/usr/local/share/lua/5.1/?.lua;;"
+
### --- LYNX --- ###
export LYNX_CFG="$HOME/.config/lynx/lynx.cfg"
export LYNX_LSS="$HOME/.config/lynx/lynx.lss"
@@ -148,6 +143,12 @@ export MBSYNCRC="$XDG_CONFIG_HOME/mbsync/config"
### --- MOZILLA --- ###
export MOZ_USE_XINPUT2=1 # Mozilla smooth scrolling/touchpads.
+### --- MYSQL --- ###
+export MYSQL_HISTFILE="$XDG_DATA_HOME/history/mysql_history"
+
+### --- NODE.JS --- ###
+export NODE_REPL_HISTORY="$XDG_DATA_HOME/history/node_repl_history"
+
### --- NOTMUCH --- ###
export NOTMUCH_CONFIG="$XDG_CONFIG_HOME/notmuch/config"
@@ -172,11 +173,21 @@ export PASSWORD_STORE_ENABLE_EXTENSIONS="true"
# export PASSWORD_STORE_EXTENSIONS_DIR="$PASSWORD_STORE_DIR/.extensions"
# export BASH_COMPLETION_USER_DIR=$XDG_DATA_HOME/bash-completion/completions
+### --- PHP --- ###
+export PHP_HISTFILE="$XDG_STATE_HOME/history/php_history"
+
+### --- POSTGRESQL --- ###
+export PSQLRC="$XDG_CONFIG_HOME/pg/psqlrc"
+export PSQL_HISTORY="$XDG_STATE_HOME/history/psql_history"
+export PGPASSFILE="$XDG_CONFIG_HOME/pg/pgpass"
+export PGSERVICEFILE="$XDG_CONFIG_HOME/pg/pg_service.conf"
+
### --- POWERLEVEL10K --- ###
export POWERLEVEL9K_INSTALLATION_DIR="/usr/share/zsh-theme-powerlevel10k"
### --- PYTHON --- ###
-export PYTHONPYCACHEPREFIX=$XDG_CACHE_HOME/python
+export PYTHON_HISTORY="$XDG_DATA_HOME/history/python_history"
+export PYTHONPYCACHEPREFIX="$XDG_CACHE_HOME/python"
export PYTHONSTARTUP="$XDG_CONFIG_HOME/python/pythonrc"
export PIPX_BIN_DIR="$XDG_SCRIPTS_HOME"
export PIPX_MAN_DIR="$XDG_DATA_HOME/man"
@@ -236,5 +247,23 @@ export STARDICT_DATA_DIR="$XDG_DATA_HOME/dic"
export STARDICT_HISTFILE="$XDG_DATA_HOME/history/dic"
export SDCV_PAGER='less --quit-if-one-screen -RX'
+###################################################
+### --- ENV PATH --- ###
+###################################################
+# Add all directories in each subdirectory to $PATH
+export PATH="/usr/local/bin:$PATH"
+[ -d ~/.local/bin ] && export PATH="$(find ~/.local/bin -path '*/.git*' -prune -o \( -type f -o -type l \) -perm -u=x -exec dirname {} \; | sort -u | paste -sd ':' -):$PATH"
+[ -d ~/.local/share/.password-store ] && export PATH="$(find ~/.local/share/.password-store -type d -name '.extensions' | paste -sd ':' -):$PATH"
+export PATH="$ASDF_DATA_DIR/shims:$PATH"
+export PATH="/opt/homebrew/bin:$PATH"
+[ -d /opt/homebrew/Caskroom ] && export PATH="$(find -L /opt/homebrew/Caskroom \( -name bin -o -name MacOS \) -type d -print 2>/dev/null | sort -u | paste -s -d ':' -):$PATH"
+[ -d /opt/homebrew/Cellar ] && export PATH="$(find -L /opt/homebrew/Cellar -name bin -type d -print 2>/dev/null | sort -u | paste -s -d ':' -):$PATH"
+[ -d /opt/homebrew/opt ] && export PATH="$(find -L /opt/homebrew/opt -name bin -type d -print 2>/dev/null | sort -u | paste -s -d ':' -):$PATH"
+[ -d /opt/homebrew/opt/coreutils/libexec ] && export PATH="$(find -L /opt/homebrew/opt/coreutils/libexec -name gnubin -type d -print 2>/dev/null | sort -u | paste -s -d ':' -):$PATH"
+
+unsetopt PROMPT_SP 2>/dev/null
+
+###################################################
### --- SHORTCUTS --- ###
+###################################################
[ ! -f "$XDG_CONFIG_HOME/shell/shortcutrc" ] && nohup bmshortcuts >/dev/null 2>&1 &
diff --git a/mac/.config/vim/init.vim b/mac/.config/vim/init.vim
index fbb9097..9193b48 100644
--- a/mac/.config/vim/init.vim
+++ b/mac/.config/vim/init.vim
@@ -33,7 +33,7 @@ autocmd BufWritePre *neomutt* %s/^--$/-- /e " dash-dash-space signature delimite
autocmd BufWritePre * cal cursor(currPos[1], currPos[2])
" When shortcut files are updated, renew bash and ranger configs with new material:
-autocmd BufWritePost bm-files,bm-dirs !shortcuts
+autocmd BufWritePost bm-files,bm-dirs !bmshortcuts
" Run xrdb whenever Xdefaults or Xresources are updated.
autocmd BufRead,BufNewFile Xresources,Xdefaults,xresources,xdefaults set filetype=xdefaults
diff --git a/mac/.config/vim/vimrc b/mac/.config/vim/vimrc
index 0535aec..a782a14 100644
--- a/mac/.config/vim/vimrc
+++ b/mac/.config/vim/vimrc
@@ -335,8 +335,8 @@ set nocursorcolumn
set shiftwidth=4
set tabstop=4
-" If the current file type is HTML, set indentation to 2 spaces.
-autocmd Filetype html setlocal tabstop=2 shiftwidth=2 expandtab
+" If the current file type is HTML, CSS, JS, JSX, TS, TSX set indentation to 2 spaces.
+autocmd Filetype html,css,js,jsx,ts,tsx setlocal tabstop=2 shiftwidth=2 expandtab
" Do not save backup files.
set nobackup
@@ -367,9 +367,6 @@ set title
set timeoutlen=300 " Time (in milliseconds) to wait for a mapping
set ttimeoutlen=10 " Time (in milliseconds) to wait for terminal key codes
-" Esc
-set noesckeys
-
" Set the commands to save in history default number is 20.
set history=1000
diff --git a/mac/.config/zsh/.zshrc b/mac/.config/zsh/.zshrc
index a90fe52..145ee4a 100644
--- a/mac/.config/zsh/.zshrc
+++ b/mac/.config/zsh/.zshrc
@@ -124,3 +124,5 @@ export AVANTE_OPENAI_API_KEY="$(pass show api/chatGPT/nvim | head -n1)"
### --- OPENAI --- ###
export OPENAI_API_KEY="$(pass show api/chatGPT/nvim | head -n1)"
+
+. "$(brew --prefix asdf)/libexec/asdf.sh"
diff --git a/mac/.config/zsh/keymaps.zsh b/mac/.config/zsh/keymaps.zsh
index 6653e44..583b8e4 100644
--- a/mac/.config/zsh/keymaps.zsh
+++ b/mac/.config/zsh/keymaps.zsh
@@ -164,7 +164,7 @@ if [[ -f "${ZPLUGINDIR:-${HOME}/.local/bin/zsh}/zsh-vi-mode/zsh-vi-mode.plugin.z
bindkey -s '^D' '^ucdi\n'
bindkey -s '^F' '^ufzffiles\n'
bindkey -s '^G' '^uyazi\n'
- bindkey -s '^N' '^ulastnvim\n'
+ bindkey -s '^N' '^ulastfiles\n'
bindkey -s '^O' '^utmo\n'
bindkey -s '^P' '^ufzfpass\n'
bindkey -s '^Q' '^uhtop\n'
@@ -180,7 +180,7 @@ if [[ -f "${ZPLUGINDIR:-${HOME}/.local/bin/zsh}/zsh-vi-mode/zsh-vi-mode.plugin.z
zvm_bind_script viins '^X^F' 'gitfiles'
zvm_bind_script viins '^X^G' 'rgafiles '
zvm_bind_script viins '^X^L' 'gloac'
- zvm_bind_script viins '^X^N' 'lastnvim -l'
+ zvm_bind_script viins '^X^N' 'lastfiles -l'
# zvm_bind_script viins '^X^O' '^u\n'
zvm_bind_script viins '^X^Q' 'fpkill'
zvm_bind_script viins '^X^R' 'fgst'
@@ -310,7 +310,7 @@ else
bindkey -s '^D' '^ucdi\n'
bindkey -s '^F' '^ufzffiles\n'
bindkey -s '^G' '^uyazi\n'
- bindkey -s '^N' '^ulastnvim\n'
+ bindkey -s '^N' '^ulastfiles\n'
bindkey -s '^O' '^utmo\n'
bindkey -s '^P' '^ufzfpass\n'
bindkey -s '^Q' '^uhtop\n'
@@ -324,7 +324,7 @@ else
bindkey -s '^X^F' '^ugitfiles\n'
bindkey -s '^X^G' '^urgafiles '
bindkey -s '^X^L' '^ugloac\n'
- bindkey -s '^X^N' '^ulastnvim -l\n'
+ bindkey -s '^X^N' '^ulastfiles -l\n'
# bindkey -s '^X^O' '^u\n'
bindkey -s '^X^Q' '^ufpkill\n'
bindkey -s '^X^R' '^ufgst\n'