summaryrefslogtreecommitdiff
path: root/ar
diff options
context:
space:
mode:
Diffstat (limited to 'ar')
-rw-r--r--ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/ssh.lua230
-rw-r--r--ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/textobject.lua276
-rw-r--r--ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/treesitter.lua22
-rw-r--r--ar/.config/TheSiahxyz/lua/TheSiahxyz/snippets/recordings.lua30
-rwxr-xr-xar/.local/bin/ppts123
-rwxr-xr-xar/.local/bin/shortcuts2
6 files changed, 532 insertions, 151 deletions
diff --git a/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/ssh.lua b/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/ssh.lua
index e9788e0..df8aad5 100644
--- a/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/ssh.lua
+++ b/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/ssh.lua
@@ -173,7 +173,14 @@ return {
})
local api = require("remote-sshfs.api")
vim.keymap.set("n", "<localleader>rc", api.connect, { desc = "Connect SSH" })
- vim.keymap.set("n", "<localleader>rd", api.disconnect, { desc = "Disconnect SSH" })
+ vim.keymap.set("n", "<localleader>rd", function()
+ local mountpoint = vim.fn.getcwd()
+ local ok = vim.system({ "diskutil", "unmount", "force", mountpoint }):wait().code == 0
+ if not ok then
+ ok = vim.system({ "umount", "-f", mountpoint }):wait().code == 0
+ end
+ print(ok and ("✅ Unmounted: " .. mountpoint) or ("⚠️ Failed to unmount: " .. mountpoint))
+ end, { desc = "Force unmount macFUSE mount (quiet)" })
vim.keymap.set("n", "<localleader>re", api.edit, { desc = "Edit SSH" })
-- (optional) Override telescope find_files and live_grep to make dynamic based on if connected to host
@@ -196,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/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/textobject.lua b/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/textobject.lua
index 3002fc0..2aa7054 100644
--- a/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/textobject.lua
+++ b/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/textobject.lua
@@ -1,140 +1,140 @@
return {
- "nvim-treesitter/nvim-treesitter-textobjects",
- dependencies = {
- { "nvim-treesitter", build = ":TSUpdate" },
- { "nvim-treesitter/nvim-treesitter" },
- {
- "chrisgrieser/nvim-various-textobjs",
- event = "UIEnter",
- opts = {
- keymaps = {
- useDefaults = true,
- },
- },
- },
- },
- init = function()
- local wk = require("which-key")
- wk.add({
- {
- mode = { "n", "v", "x" },
- { "g>", group = "Swap next" },
- { "g<", group = "Swap prev" },
- { "<leader>]", group = "Next" },
- { "<leader>[", group = "Prev" },
- },
- })
- 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" },
-
- ["an"] = { query = "@conditional.outer", desc = "Select outer part of a conditional" },
- ["in"] = { query = "@conditional.inner", desc = "Select inner part of a conditional" },
-
- ["ap"] = { query = "@loop.outer", desc = "Select outer part of a loop" },
- ["ip"] = { query = "@loop.inner", desc = "Select inner part of a loop" },
-
- ["af"] = { query = "@call.outer", desc = "Select outer part of a function call" },
- ["if"] = { query = "@call.inner", desc = "Select inner part of a function call" },
-
- ["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",
- },
-
- ["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" },
-
- -- 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")
-
- -- 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)
-
- -- 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 })
- end,
+ -- "nvim-treesitter/nvim-treesitter-textobjects",
+ -- dependencies = {
+ -- { "nvim-treesitter", build = ":TSUpdate" },
+ -- { "nvim-treesitter/nvim-treesitter" },
+ -- {
+ -- "chrisgrieser/nvim-various-textobjs",
+ -- event = "UIEnter",
+ -- opts = {
+ -- keymaps = {
+ -- useDefaults = true,
+ -- },
+ -- },
+ -- },
+ -- },
+ -- init = function()
+ -- local wk = require("which-key")
+ -- wk.add({
+ -- {
+ -- mode = { "n", "v", "x" },
+ -- { "g>", group = "Swap next" },
+ -- { "g<", group = "Swap prev" },
+ -- { "<leader>]", group = "Next" },
+ -- { "<leader>[", group = "Prev" },
+ -- },
+ -- })
+ -- 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" },
+ --
+ -- ["an"] = { query = "@conditional.outer", desc = "Select outer part of a conditional" },
+ -- ["in"] = { query = "@conditional.inner", desc = "Select inner part of a conditional" },
+ --
+ -- ["ap"] = { query = "@loop.outer", desc = "Select outer part of a loop" },
+ -- ["ip"] = { query = "@loop.inner", desc = "Select inner part of a loop" },
+ --
+ -- ["af"] = { query = "@call.outer", desc = "Select outer part of a function call" },
+ -- ["if"] = { query = "@call.inner", desc = "Select inner part of a function call" },
+ --
+ -- ["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",
+ -- },
+ --
+ -- ["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" },
+ --
+ -- -- 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")
+ --
+ -- -- 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)
+ --
+ -- -- 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 })
+ -- end,
}
diff --git a/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/treesitter.lua b/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/treesitter.lua
index c486343..7ca4ae9 100644
--- a/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/treesitter.lua
+++ b/ar/.config/TheSiahxyz/lua/TheSiahxyz/plugins/treesitter.lua
@@ -3,7 +3,7 @@ return {
build = ":TSUpdate",
dependencies = { "nvim-treesitter/nvim-treesitter-textobjects" },
config = function()
- require("nvim-treesitter.configs").setup({
+ require("nvim-treesitter").setup({
-- A list of parser names, or "all"
ensure_installed = {
"bash",
@@ -45,16 +45,16 @@ return {
},
})
- 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")
+ -- 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" },
diff --git a/ar/.config/TheSiahxyz/lua/TheSiahxyz/snippets/recordings.lua b/ar/.config/TheSiahxyz/lua/TheSiahxyz/snippets/recordings.lua
new file mode 100644
index 0000000..9ce9124
--- /dev/null
+++ b/ar/.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/ar/.local/bin/ppts b/ar/.local/bin/ppts
new file mode 100755
index 0000000..e315367
--- /dev/null
+++ b/ar/.local/bin/ppts
@@ -0,0 +1,123 @@
+#!/bin/sh
+
+# Auto workflow script for git push with content/ directory handling
+# Usage: ppts
+# Automatically: git add ., commit without content/, push to origin, then add content/ and push to home
+
+# Always cd to THESIAH repository
+THESIAH_REPO="${THESIAH_WWW:-${HOME}/Private/repos/THESIAH}"
+
+if [ ! -d "$THESIAH_REPO" ]; then
+ echo "Error: THESIAH repository not found at $THESIAH_REPO"
+ exit 1
+fi
+cd "$THESIAH_REPO" || exit 1
+
+# Verify this is the correct git repository
+if ! git rev-parse --git-dir >/dev/null 2>&1; then
+ echo "Error: Not a git repository at $THESIAH_REPO"
+ exit 1
+fi
+
+# If no arguments, run auto workflow
+if [ -z "$1" ]; then
+ echo "Running auto workflow..."
+
+ # Step 0: Stage all changes first
+ echo "Step 0: Staging all changes..."
+ git add .
+
+ # Check if there are any changes to commit
+ if git diff --quiet && git diff --cached --quiet; then
+ echo "No changes to commit"
+ exit 0
+ fi
+
+ # Step 1: Unstage content/ from staging
+ echo "Step 1: Excluding content/ from staging..."
+ git reset content/ 2>/dev/null || true
+
+ # Check if there are changes to commit (excluding content/)
+ has_changes_without_content=false
+ if ! git diff --cached --quiet; then
+ has_changes_without_content=true
+ fi
+
+ # Check if content/ has changes
+ has_content_changes=false
+ if [ -d "content/" ]; then
+ # Check for untracked files in content/
+ if [ -n "$(git ls-files --others --exclude-standard content/ 2>/dev/null)" ]; then
+ has_content_changes=true
+ fi
+ # Check for modified tracked files in content/
+ if ! git diff --quiet content/ 2>/dev/null; then
+ has_content_changes=true
+ fi
+ # Check for staged changes in content/
+ if ! git diff --cached --quiet content/ 2>/dev/null; then
+ has_content_changes=true
+ fi
+ fi
+
+ # Step 2: Commit without content/ if there are changes
+ if [ "$has_changes_without_content" = true ]; then
+ echo "Step 2: Committing changes (without content/)..."
+ git commit -m "Update (without content/)" || exit 1
+
+ # Step 3: Push to origin (without content/)
+ echo "Step 3: Pushing to origin (without content/)..."
+ # Temporarily disable pre-push hook since we already excluded content/
+ hook_disabled=false
+ if [ -f .git/hooks/pre-push ]; then
+ mv .git/hooks/pre-push .git/hooks/pre-push.disabled
+ hook_disabled=true
+ fi
+ # Try normal push first
+ if git push origin master 2>/dev/null; then
+ # Push succeeded
+ :
+ else
+ # Push failed, try force push (origin may have diverged)
+ echo "Warning: Origin has diverged, using force push..."
+ git push origin master --force || {
+ # Restore hook if push failed
+ if [ "$hook_disabled" = true ] && [ -f .git/hooks/pre-push.disabled ]; then
+ mv .git/hooks/pre-push.disabled .git/hooks/pre-push
+ fi
+ exit 1
+ }
+ fi
+ # Restore hook after successful push
+ if [ "$hook_disabled" = true ] && [ -f .git/hooks/pre-push.disabled ]; then
+ mv .git/hooks/pre-push.disabled .git/hooks/pre-push
+ fi
+ echo "✓ Pushed to origin (without content/)"
+ else
+ echo "No changes to commit (excluding content/)"
+ fi
+
+ # Step 4: Add and commit content/ if there are changes
+ if [ "$has_content_changes" = true ]; then
+ echo "Step 4: Adding content/..."
+ git add content/
+
+ echo "Step 5: Committing content/..."
+ git commit -m "Update content/" || exit 1
+
+ # Step 6: Push to home (with content/)"
+ echo "Step 6: Pushing to home (with content/)..."
+ git push home master || exit 1
+ echo "✓ Pushed to home (with content/)"
+ else
+ echo "No content/ changes to commit"
+ fi
+
+ echo "Auto workflow completed!"
+ exit 0
+fi
+
+# If arguments provided, show usage
+echo "Usage: ppts"
+echo " Run without arguments to execute auto workflow"
+exit 1
diff --git a/ar/.local/bin/shortcuts b/ar/.local/bin/shortcuts
index af4ad58..e131ce4 100755
--- a/ar/.local/bin/shortcuts
+++ b/ar/.local/bin/shortcuts
@@ -18,7 +18,7 @@ else
yazi_shortcuts_tmp="/dev/null"
fi
command -v ranger && ranger_shortcuts="${XDG_CONFIG_HOME:-${HOME}/.config}/ranger/shortcuts.conf" || ranger_shortcuts="/dev/null"
-command -v qutebrowser && qute_shortcuts="$HOME/.qutebrowser/shortcuts.py" || qute_shortcuts="/dev/null"
+command -v qutebrowser && qute_shortcuts="$HOME/.config/qutebrowser/shortcuts.py" || qute_shortcuts="/dev/null"
command -v fish && fish_shortcuts="${XDG_CONFIG_HOME:-${HOME}/.config}/fish/shortcuts.fish" || fish_shortcuts="/dev/null"
command -v vifm && vifm_shortcuts="${XDG_CONFIG_HOME:-${HOME}/.config}/vifm/shortcuts.rc" || vifm_shortcuts="/dev/null"