diff --git a/dotfiles/nvim/lua/mappings.lua b/dotfiles/nvim/lua/mappings.lua index 1ccfad2..a630326 100644 --- a/dotfiles/nvim/lua/mappings.lua +++ b/dotfiles/nvim/lua/mappings.lua @@ -1,7 +1,5 @@ require "nvchad.mappings" --- add yours here - local map = vim.keymap.set map("n", ";", ":", { desc = "CMD enter command mode" }) @@ -39,14 +37,20 @@ map({ "i", "x", "n", "s" }, "", function() require("harpoon"):list():select(8) end, { desc = "Harpoon file 8" }) -map({ "i", "x", "n", "s" }, "/", "Telescope live_grep", { desc = "telescope live grep" }) +map({ "x", "n", "s" }, "/", "Telescope live_grep", { desc = "telescope live grep" }) map( - { "i", "x", "n", "s" }, + { "x", "n", "s" }, "", "Telescope find_files follow=true hidden=true", { desc = "telescope find all files" } ) -map({ "i", "x", "n", "s" }, ",", "Telescope buffers", { desc = "telescope find buffers" }) +map({ "x", "n", "s" }, ",", "Telescope buffers", { desc = "telescope find buffers" }) +map({ "i", "x", "n", "s" }, "", "w", { desc = "General Save file" }) +map({ "x", "n", "s" }, "", "ggVG", { desc = "Select all" }) + +-- Comment +map("n", "", "gcc", { desc = "Toggle Comment", remap = true }) +map("v", "", "gc", { desc = "Toggle comment", remap = true }) -- Move Lines map("n", "", "m .+1==", { desc = "Move Down" }) diff --git a/dotfiles/nvim/lua/plugins/init.lua b/dotfiles/nvim/lua/plugins/init.lua index 8e4195a..61a8ff0 100644 --- a/dotfiles/nvim/lua/plugins/init.lua +++ b/dotfiles/nvim/lua/plugins/init.lua @@ -26,13 +26,52 @@ return { { "gg", "LazyGit", desc = "LazyGit" }, }, }, - -- { - -- "nvim-treesitter/nvim-treesitter", - -- opts = { - -- ensure_installed = { - -- "vim", "lua", "vimdoc", - -- "html", "css" - -- }, - -- }, - -- }, + { + "nvim-telescope/telescope.nvim", + dependencies = { "nvim-treesitter/nvim-treesitter" }, + cmd = "Telescope", + opts = function() + local op = require "nvchad.configs.telescope" + op.defaults.file_ignore_patterns = { + ".git", + "cache", + "node_modules", + "vendor", + } + return op + end, + }, + { + "ThePrimeagen/harpoon", + branch = "harpoon2", + dependencies = { "nvim-lua/plenary.nvim" }, + }, + { + "nvim-treesitter/nvim-treesitter", + opts = { + ensure_installed = { + "bash", + "css", + "dockerfile", + "go", + "html", + "javascript", + "json", + "lua", + "make", + "markdown", + "nix", + "php", + "python", + "rust", + "toml", + "tsx", + "typescript", + "twig", + "vim", + "vue", + "yaml", + }, + }, + }, }