summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-09-14 10:41:11 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-09-14 10:41:11 +0900
commitd0bc9d7fd4ff965b4bae4702c47dfc473bdcd86b (patch)
tree7eace8f8f8af22c992a8fd5a8cbf0d0bca5ca8ce
parentfafa00ce22d886a717c1af83c9bb67fdb904a16b (diff)
updates
-rw-r--r--mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/ai.lua154
-rw-r--r--mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/git.lua13
-rw-r--r--mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/lualine.lua13
-rw-r--r--mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/neo-tree.lua304
-rw-r--r--mac/.config/shell/aliasrc5
-rw-r--r--mac/.config/shell/bm-dirs2
6 files changed, 273 insertions, 218 deletions
diff --git a/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/ai.lua b/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/ai.lua
index 1d99082..10a6357 100644
--- a/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/ai.lua
+++ b/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/ai.lua
@@ -1,81 +1,81 @@
return {
- -- {
- -- "yetone/avante.nvim",
- -- -- if you want to build from source then do `make BUILD_FROM_SOURCE=true`
- -- -- ⚠️ must add this setting! ! !
- -- build = vim.fn.has("win32") ~= 0
- -- and "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false"
- -- or "make",
- -- event = "VeryLazy",
- -- version = false, -- Never set this value to "*"! Never!
- -- ---@module 'avante'
- -- ---@type avante.Config
- -- opts = {
- -- -- add any opts here
- -- -- this file can contain specific instructions for your project
- -- instructions_file = "avante.md",
- -- -- for example
- -- provider = "claude",
- -- providers = {
- -- claude = {
- -- endpoint = "https://api.anthropic.com",
- -- model = "claude-sonnet-4-20250514",
- -- timeout = 30000, -- Timeout in milliseconds
- -- extra_request_body = {
- -- temperature = 0.75,
- -- max_tokens = 20480,
- -- },
- -- },
- -- moonshot = {
- -- endpoint = "https://api.moonshot.ai/v1",
- -- model = "kimi-k2-0711-preview",
- -- timeout = 30000, -- Timeout in milliseconds
- -- extra_request_body = {
- -- temperature = 0.75,
- -- max_tokens = 32768,
- -- },
- -- },
- -- },
- -- },
- -- dependencies = {
- -- "nvim-lua/plenary.nvim",
- -- "MunifTanjim/nui.nvim",
- -- --- The below dependencies are optional,
- -- -- "echasnovski/mini.pick", -- for file_selector provider mini.pick
- -- -- "nvim-telescope/telescope.nvim", -- for file_selector provider telescope
- -- -- "hrsh7th/nvim-cmp", -- autocompletion for avante commands and mentions
- -- -- "ibhagwan/fzf-lua", -- for file_selector provider fzf
- -- -- "stevearc/dressing.nvim", -- for input provider dressing
- -- -- "folke/snacks.nvim", -- for input provider snacks
- -- -- "nvim-tree/nvim-web-devicons", -- or echasnovski/mini.icons
- -- -- "zbirenbaum/copilot.lua", -- for providers='copilot'
- -- {
- -- -- support for image pasting
- -- "HakonHarnes/img-clip.nvim",
- -- event = "VeryLazy",
- -- opts = {
- -- -- recommended settings
- -- default = {
- -- embed_image_as_base64 = false,
- -- prompt_for_file_name = false,
- -- drag_and_drop = {
- -- insert_mode = true,
- -- },
- -- -- required for Windows users
- -- use_absolute_path = true,
- -- },
- -- },
- -- },
- -- {
- -- -- Make sure to set this up properly if you have lazy=true
- -- "MeanderingProgrammer/render-markdown.nvim",
- -- opts = {
- -- file_types = { "markdown", "Avante" },
- -- },
- -- ft = { "markdown", "Avante" },
- -- },
- -- },
- -- },
+ {
+ "yetone/avante.nvim",
+ -- if you want to build from source then do `make BUILD_FROM_SOURCE=true`
+ -- ⚠️ must add this setting! ! !
+ build = vim.fn.has("win32") ~= 0
+ and "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false"
+ or "make",
+ event = "VeryLazy",
+ version = false, -- Never set this value to "*"! Never!
+ ---@module 'avante'
+ ---@type avante.Config
+ opts = {
+ -- add any opts here
+ -- this file can contain specific instructions for your project
+ instructions_file = "avante.md",
+ -- for example
+ provider = "claude",
+ providers = {
+ claude = {
+ endpoint = "https://api.anthropic.com",
+ model = "claude-sonnet-4-20250514",
+ timeout = 30000, -- Timeout in milliseconds
+ extra_request_body = {
+ temperature = 0.75,
+ max_tokens = 20480,
+ },
+ },
+ moonshot = {
+ endpoint = "https://api.moonshot.ai/v1",
+ model = "kimi-k2-0711-preview",
+ timeout = 30000, -- Timeout in milliseconds
+ extra_request_body = {
+ temperature = 0.75,
+ max_tokens = 32768,
+ },
+ },
+ },
+ },
+ dependencies = {
+ "nvim-lua/plenary.nvim",
+ "MunifTanjim/nui.nvim",
+ --- The below dependencies are optional,
+ -- "echasnovski/mini.pick", -- for file_selector provider mini.pick
+ -- "nvim-telescope/telescope.nvim", -- for file_selector provider telescope
+ -- "hrsh7th/nvim-cmp", -- autocompletion for avante commands and mentions
+ -- "ibhagwan/fzf-lua", -- for file_selector provider fzf
+ -- "stevearc/dressing.nvim", -- for input provider dressing
+ -- "folke/snacks.nvim", -- for input provider snacks
+ -- "nvim-tree/nvim-web-devicons", -- or echasnovski/mini.icons
+ -- "zbirenbaum/copilot.lua", -- for providers='copilot'
+ {
+ -- support for image pasting
+ "HakonHarnes/img-clip.nvim",
+ event = "VeryLazy",
+ opts = {
+ -- recommended settings
+ default = {
+ embed_image_as_base64 = false,
+ prompt_for_file_name = false,
+ drag_and_drop = {
+ insert_mode = true,
+ },
+ -- required for Windows users
+ use_absolute_path = true,
+ },
+ },
+ },
+ {
+ -- Make sure to set this up properly if you have lazy=true
+ "MeanderingProgrammer/render-markdown.nvim",
+ opts = {
+ file_types = { "markdown", "Avante" },
+ },
+ ft = { "markdown", "Avante" },
+ },
+ },
+ },
-- {
-- "robitx/gp.nvim",
-- init = function()
diff --git a/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/git.lua b/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/git.lua
index 99f77bd..9c549d2 100644
--- a/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/git.lua
+++ b/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/git.lua
@@ -212,4 +212,17 @@ return {
{ mode = "n", "go", "<Cmd>diffget //3<cr>", desc = "Git diff on their side" },
},
},
+ {
+ "pwntester/octo.nvim",
+ requires = {
+ "nvim-lua/plenary.nvim",
+ "nvim-telescope/telescope.nvim",
+ -- OR 'ibhagwan/fzf-lua',
+ -- OR 'folke/snacks.nvim',
+ "nvim-tree/nvim-web-devicons",
+ },
+ config = function()
+ require("octo").setup()
+ end,
+ },
}
diff --git a/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/lualine.lua b/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/lualine.lua
index 0f1fb98..9f8dd4e 100644
--- a/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/lualine.lua
+++ b/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/lualine.lua
@@ -196,6 +196,19 @@ return {
return os.date("%H:%M")
end,
},
+ {
+ function()
+ if not package.loaded["korean_ime"] then
+ return ""
+ end
+ local mode = require("korean_ime").get_mode()
+ if mode == "en" then
+ return "A "
+ elseif mode == "ko" then
+ return "한"
+ end
+ end,
+ },
},
},
inactive_sections = {},
diff --git a/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/neo-tree.lua b/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/neo-tree.lua
index 6666f2d..c190df5 100644
--- a/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/neo-tree.lua
+++ b/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/neo-tree.lua
@@ -1,141 +1,167 @@
return {
- -- {
- -- "nvim-neo-tree/neo-tree.nvim",
- -- branch = "v3.x",
- -- dependencies = {
- -- "nvim-lua/plenary.nvim",
- -- "nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
- -- "MunifTanjim/nui.nvim",
- -- {
- -- "s1n7ax/nvim-window-picker", -- for open_with_window_picker keymaps
- -- version = "2.*",
- -- config = function()
- -- require("window-picker").setup({
- -- filter_rules = {
- -- include_current_win = false,
- -- autoselect_one = true,
- -- -- filter using buffer options
- -- bo = {
- -- -- if the file type is one of following, the window will be ignored
- -- filetype = { "neo-tree", "neo-tree-popup", "notify" },
- -- -- if the buffer type is one of following, the window will be ignored
- -- buftype = { "terminal", "quickfix" },
- -- },
- -- },
- -- })
- -- end,
- -- },
- -- { "3rd/image.nvim", opts = {} }, -- Optional image support in preview window: See `# Preview Mode` for more information
- -- },
- -- lazy = false, -- neo-tree will lazily load itself
- -- ---@module "neo-tree"
- -- ---@type neotree.Config?
- -- opts = {
- -- hijack_netrw_behavior = "disabled", -- netrw disabled, opening a directory opens neo-tree
- -- filesystem = {
- -- follow_current_file = { enabled = false },
- -- commands = {
- -- -- over write default 'delete' command to 'trash'.
- -- delete = function(state)
- -- if vim.fn.executable("trash") == 0 then
- -- vim.api.nvim_echo({
- -- { "- Trash utility not installed. Make sure to install it first\n", nil },
- -- { "- In macOS run `brew install trash`\n", nil },
- -- { "- Or delete the `custom delete command` section in neo-tree", nil },
- -- }, false, {})
- -- return
- -- end
- -- local inputs = require("neo-tree.ui.inputs")
- -- local path = state.tree:get_node().path
- -- local msg = "Are you sure you want to trash " .. path
- -- inputs.confirm(msg, function(confirmed)
- -- if not confirmed then
- -- return
- -- end
- --
- -- vim.fn.system({ "trash", vim.fn.fnameescape(path) })
- -- require("neo-tree.sources.manager").refresh(state.name)
- -- end)
- -- end,
- -- -- Overwrite default 'delete_visual' command to 'trash' x n.
- -- delete_visual = function(state, selected_nodes)
- -- if vim.fn.executable("trash") == 0 then
- -- vim.api.nvim_echo({
- -- { "- Trash utility not installed. Make sure to install it first\n", nil },
- -- { "- In macOS run `brew install trash`\n", nil },
- -- { "- Or delete the `custom delete command` section in neo-tree", nil },
- -- }, false, {})
- -- return
- -- end
- -- local inputs = require("neo-tree.ui.inputs")
- --
- -- -- Function to get the count of items in a table
- -- local function GetTableLen(tbl)
- -- local len = 0
- -- for _ in pairs(tbl) do
- -- len = len + 1
- -- end
- -- return len
- -- end
- --
- -- local count = GetTableLen(selected_nodes)
- -- local msg = "Are you sure you want to trash " .. count .. " files?"
- -- inputs.confirm(msg, function(confirmed)
- -- if not confirmed then
- -- return
- -- end
- -- for _, node in ipairs(selected_nodes) do
- -- vim.fn.system({ "trash", vim.fn.fnameescape(node.path) })
- -- end
- -- require("neo-tree.sources.manager").refresh(state.name)
- -- end)
- -- end,
- -- },
- -- },
- -- },
- -- keys = {
- -- { "<leader>e", false },
- -- { "<leader>E", false },
- -- {
- -- "<leader>en",
- -- function()
- -- local buf_name = vim.api.nvim_buf_get_name(0)
- -- -- Function to check if NeoTree is open in any window
- -- local function is_neo_tree_open()
- -- for _, win in ipairs(vim.api.nvim_list_wins()) do
- -- local buf = vim.api.nvim_win_get_buf(win)
- -- if vim.bo[buf].filetype == "neo-tree" then
- -- return true
- -- end
- -- end
- -- return false
- -- end
- -- -- Check if the current file exists
- -- if
- -- vim.fn.filereadable(buf_name) == 1
- -- or vim.fn.isdirectory(vim.fn.fnamemodify(buf_name, ":p:h")) == 1
- -- then
- -- if is_neo_tree_open() then
- -- -- Close NeoTree if it's open
- -- vim.cmd("Neotree close")
- -- else
- -- -- Open NeoTree and reveal the current file
- -- vim.cmd("Neotree reveal")
- -- end
- -- else
- -- -- If the file doesn't exist, execute the logic for <leader>R
- -- require("neo-tree.command").execute({ toggle = true, dir = vim.uv.cwd() })
- -- end
- -- end,
- -- desc = "Open neo-tree",
- -- },
- -- {
- -- "<leader>eN",
- -- function()
- -- require("neo-tree.command").execute({ toggle = true, dir = vim.uv.cwd() })
- -- end,
- -- desc = "Open neo-tree (cwd)",
- -- },
- -- },
- -- },
+ {
+ "nvim-neo-tree/neo-tree.nvim",
+ branch = "v3.x",
+ dependencies = {
+ "nvim-lua/plenary.nvim",
+ "nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
+ "MunifTanjim/nui.nvim",
+ {
+ "s1n7ax/nvim-window-picker", -- for open_with_window_picker keymaps
+ version = "2.*",
+ config = function()
+ require("window-picker").setup({
+ filter_rules = {
+ include_current_win = false,
+ autoselect_one = true,
+ -- filter using buffer options
+ bo = {
+ -- if the file type is one of following, the window will be ignored
+ filetype = { "neo-tree", "neo-tree-popup", "notify" },
+ -- if the buffer type is one of following, the window will be ignored
+ buftype = { "terminal", "quickfix" },
+ },
+ },
+ })
+ end,
+ },
+ { "3rd/image.nvim", opts = {} }, -- Optional image support in preview window: See `# Preview Mode` for more information
+ },
+ lazy = false, -- neo-tree will lazily load itself
+ ---@module "neo-tree"
+ ---@type neotree.Config?
+ opts = {
+ hijack_netrw_behavior = "disabled", -- netrw disabled, opening a directory opens neo-tree
+ filesystem = {
+ follow_current_file = { enabled = false },
+ commands = {
+ -- over write default 'delete' command to 'trash'.
+ delete = function(state)
+ if vim.fn.executable("trash") == 0 then
+ vim.api.nvim_echo({
+ { "- Trash utility not installed. Make sure to install it first\n", nil },
+ { "- In macOS run `brew install trash`\n", nil },
+ { "- Or delete the `custom delete command` section in neo-tree", nil },
+ }, false, {})
+ return
+ end
+ local inputs = require("neo-tree.ui.inputs")
+ local path = state.tree:get_node().path
+ local msg = "Are you sure you want to trash " .. path
+ inputs.confirm(msg, function(confirmed)
+ if not confirmed then
+ return
+ end
+
+ vim.fn.system({ "trash", vim.fn.fnameescape(path) })
+ require("neo-tree.sources.manager").refresh(state.name)
+ end)
+ end,
+ -- Overwrite default 'delete_visual' command to 'trash' x n.
+ delete_visual = function(state, selected_nodes)
+ if vim.fn.executable("trash") == 0 then
+ vim.api.nvim_echo({
+ { "- Trash utility not installed. Make sure to install it first\n", nil },
+ { "- In macOS run `brew install trash`\n", nil },
+ { "- Or delete the `custom delete command` section in neo-tree", nil },
+ }, false, {})
+ return
+ end
+ local inputs = require("neo-tree.ui.inputs")
+
+ -- Function to get the count of items in a table
+ local function GetTableLen(tbl)
+ local len = 0
+ for _ in pairs(tbl) do
+ len = len + 1
+ end
+ return len
+ end
+
+ local count = GetTableLen(selected_nodes)
+ local msg = "Are you sure you want to trash " .. count .. " files?"
+ inputs.confirm(msg, function(confirmed)
+ if not confirmed then
+ return
+ end
+ for _, node in ipairs(selected_nodes) do
+ vim.fn.system({ "trash", vim.fn.fnameescape(node.path) })
+ end
+ require("neo-tree.sources.manager").refresh(state.name)
+ end)
+ end,
+ avante_add_files = function(state)
+ local node = state.tree:get_node()
+ local filepath = node:get_id()
+ local relative_path = require("avante.utils").relative_path(filepath)
+
+ local sidebar = require("avante").get()
+
+ local open = sidebar:is_open()
+ -- ensure avante sidebar is open
+ if not open then
+ require("avante.api").ask()
+ sidebar = require("avante").get()
+ end
+
+ sidebar.file_selector:add_selected_file(relative_path)
+
+ -- remove neo tree buffer
+ if not open then
+ sidebar.file_selector:remove_selected_file("neo-tree filesystem [1]")
+ end
+ end,
+ },
+ window = {
+ mappings = {
+ ["oa"] = "avante_add_files",
+ },
+ },
+ },
+ },
+ keys = {
+ { "<leader>e", false },
+ { "<leader>E", false },
+ {
+ "<leader>en",
+ function()
+ local buf_name = vim.api.nvim_buf_get_name(0)
+ -- Function to check if NeoTree is open in any window
+ local function is_neo_tree_open()
+ for _, win in ipairs(vim.api.nvim_list_wins()) do
+ local buf = vim.api.nvim_win_get_buf(win)
+ if vim.bo[buf].filetype == "neo-tree" then
+ return true
+ end
+ end
+ return false
+ end
+ -- Check if the current file exists
+ if
+ vim.fn.filereadable(buf_name) == 1
+ or vim.fn.isdirectory(vim.fn.fnamemodify(buf_name, ":p:h")) == 1
+ then
+ if is_neo_tree_open() then
+ -- Close NeoTree if it's open
+ vim.cmd("Neotree close")
+ else
+ -- Open NeoTree and reveal the current file
+ vim.cmd("Neotree reveal")
+ end
+ else
+ -- If the file doesn't exist, execute the logic for <leader>R
+ require("neo-tree.command").execute({ toggle = true, dir = vim.uv.cwd() })
+ end
+ end,
+ desc = "Open neo-tree",
+ },
+ {
+ "<leader>eN",
+ function()
+ require("neo-tree.command").execute({ toggle = true, dir = vim.uv.cwd() })
+ end,
+ desc = "Open neo-tree (cwd)",
+ },
+ },
+ },
}
diff --git a/mac/.config/shell/aliasrc b/mac/.config/shell/aliasrc
index 46e2eb1..cf2b01c 100644
--- a/mac/.config/shell/aliasrc
+++ b/mac/.config/shell/aliasrc
@@ -43,6 +43,9 @@ alias .....='../../../..'
# abook
alias abook='abook -f ~/.config/abook/addressbook'
+# avante
+alias avt='nvim -c "lua vim.defer_fn(function()require(\"avante.api\").zen_mode()end, 100)"'
+
# bat
alias bath='bat cache --build'
alias can='bat -n'
@@ -485,7 +488,7 @@ alias xauto='xrandr --auto'
alias xoff='xset s off -dpms'
# yazi
-alias y='yazi'
+alias i='yazi'
# zathura
alias za='zathura'
diff --git a/mac/.config/shell/bm-dirs b/mac/.config/shell/bm-dirs
index 7a6d481..1e44f25 100644
--- a/mac/.config/shell/bm-dirs
+++ b/mac/.config/shell/bm-dirs
@@ -62,8 +62,8 @@ Cvv /mnt/second/videos
Cwv /media/$USER/win10/Videos
gdc ${XDG_DOCUMENTS_DIR:-${HOME}/Documents}
gdk ${XDG_DESKTOP_DIR:-${HOME}/Desktop}
-gdt ${XDG_DOTFILES_DIR:-${HOME}/.dotfiles}
gdn ${XDG_DOWNLOAD_DIR:-${HOME}/Downloads}
+gdo ${XDG_DOTFILES_DIR:-${HOME}/.dotfiles}
gfx $HOME/.mozilla/firefox/$USER.default
gmu ${XDG_MUSIC_DIR:-${HOME}/Music}
gnu $HOME/.gnupg