diff --git a/.bashrc b/.bashrc index 528d9f8..ef0249f 100644 --- a/.bashrc +++ b/.bashrc @@ -6,6 +6,9 @@ case $- in *) return;; esac +# Set shell envvar +export SHELL=$(which bash) + # don't put duplicate lines or lines starting with space in the history. HISTCONTROL=ignoreboth diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index a855b7a..c45cbe4 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -37,7 +37,11 @@ require("config.lazy") vim.keymap.set("n", "r", ":source %", { desc = "Reload Config" }) vim.keymap.set("n", "bs", ":vsplit", { desc = "Vertical Split" }) vim.keymap.set("n", "vm", ":lua vim.diagnostic.open_float()", { desc = "Show Diagnostic Message" }) + +-- Map tab and shift-tab to indent in insert and visual mode vim.api.nvim_set_keymap("i", "", "", { noremap = true, silent = true }) +vim.api.nvim_set_keymap("v", "" , ">gv", { noremap = true, silent = true }) +vim.api.nvim_set_keymap("v", "" , "y", '"+y', { desc = "Yank to Clipboard" }) @@ -57,10 +61,6 @@ vim.keymap.set("n", "ft", ":Neotree filesystem toggle left") -- Configure Copilot --vim.keymap.set("n", "cp", ":Copilot panel", { desc = "Open Copilot Panel" }) -vim.keymap.set("n", "ce", ":Copilot enable", { desc = "Enable Copilot Completions" }) -vim.keymap.set("n", "cd", ":Copilot disable", { desc = "Disable Copilot Completions" }) -vim.keymap.set("n", "cc", ":CopilotChatToggle", { desc = "Toggle Copilot Chat" }) -vim.keymap.set("n", "cx", ":CopilotChatReset", { desc = "Reset Copilot Chat" }) -- Configure Buffer Navigation vim.keymap.set("n", "", ":BufferPrevious", { desc = "Previous Buffer" }) diff --git a/.config/nvim/lua/plugins/llm.lua b/.config/nvim/lua/plugins/llm.lua index 93641c0..1a080a1 100644 --- a/.config/nvim/lua/plugins/llm.lua +++ b/.config/nvim/lua/plugins/llm.lua @@ -2,10 +2,12 @@ return { { "github/copilot.vim", config = function() - vim.keymap.set("i", "", 'copilot#Accept()', { + vim.keymap.set("n", "ce", ":Copilot enable", { desc = "Enable Copilot Completions" }) + vim.keymap.set("n", "cd", ":Copilot disable", { desc = "Disable Copilot Completions" }) + vim.keymap.set("i", "", "copilot#Accept()", { expr = true, silent = true, - replace_keycodes = false, + replace_keycodes = false, }) vim.g.copilot_no_tab_map = true end, @@ -19,6 +21,8 @@ return { }, build = "make tiktoken", config = function() + vim.keymap.set("n", "cc", ":CopilotChatToggle", { desc = "Toggle Copilot Chat" }) + vim.keymap.set("n", "cx", ":CopilotChatReset", { desc = "Reset Copilot Chat" }) require("CopilotChat").setup({ question_header = "", answer_header = "", diff --git a/.local/bin/nvim b/.local/bin/nvim new file mode 100755 index 0000000..eed21cf Binary files /dev/null and b/.local/bin/nvim differ diff --git a/.profile b/.profile index ce12f4d..16e0ab2 100644 --- a/.profile +++ b/.profile @@ -37,8 +37,3 @@ if [ $(which nvim) ]; then export EDITOR=nvim fi -# Set zsh as the default shell if available -if [ $(which zsh) ]; then - export SHELL=$(which zsh) -fi -