diff --git a/nvim/README.md b/nvim/README.md new file mode 100644 index 0000000..ed8a136 --- /dev/null +++ b/nvim/README.md @@ -0,0 +1 @@ +custom config files for nvchad diff --git a/nvim/custom/chadrc.lua b/nvim/custom/chadrc.lua new file mode 100644 index 0000000..579cdd2 --- /dev/null +++ b/nvim/custom/chadrc.lua @@ -0,0 +1,20 @@ +local M = {} + +local override = require "custom.override" + +M.plugins = { + override = { + ["nvim-treesitter/nvim-treesitter"] = override.treesitter, + }, + + user = require "custom.plugins", +} + +M.ui = { + theme = "gruvchad", + +} + +M.mappings = require "custom.mappings" + +return M diff --git a/nvim/custom/init.lua b/nvim/custom/init.lua new file mode 100644 index 0000000..271425d --- /dev/null +++ b/nvim/custom/init.lua @@ -0,0 +1,7 @@ +vim.opt.rnu = true +vim.opt.colorcolumn = "80" +vim.opt.scrolloff = 8 + +vim.opt.tabstop = 4 +vim.opt.shiftwidth = 4 +vim.opt.expandtab = true diff --git a/nvim/custom/mappings.lua b/nvim/custom/mappings.lua new file mode 100644 index 0000000..bb5e1fd --- /dev/null +++ b/nvim/custom/mappings.lua @@ -0,0 +1,51 @@ +local M = {} + +M.general = { + n = { + ["ss"] = { + function() + require("harpoon.ui").toggle_quick_menu() + end, + " harpoon show menu" + }, + ["sa"] = { + function() + require("harpoon.mark").add_file() + end, + " harpoon add file" + }, + ["su"] = { + function() + require("harpoon.ui").nav_file(1) + end, + " harpoon go to file 1" + }, + ["si"] = { + function() + require("harpoon.ui").nav_file(2) + end, + " harpoon go to file 2" + }, + ["so"] = { + function() + require("harpoon.ui").nav_file(3) + end, + " harpoon go to file 3" + }, + ["sp"] = { + function() + require("harpoon.ui").nav_file(4) + end, + " harpoon go to file 4" + }, + } +} + +M.telescope = { + n = { + ["fg"] = { " Telescope live_grep ", " live grep" }, + ["fm"] = { " Telescope marks ", " marks" }, + } +} + +return M diff --git a/nvim/custom/override.lua b/nvim/custom/override.lua new file mode 100644 index 0000000..b74713f --- /dev/null +++ b/nvim/custom/override.lua @@ -0,0 +1,20 @@ +local M = {} + +M.treesitter = { + ensure_installed = { + "vim", + "html", + "css", + "javascript", + "json", + "toml", + "markdown", + "c", + "bash", + "lua", + "python", + "go", + }, +} + +return M diff --git a/nvim/custom/plugins/harpoon.lua b/nvim/custom/plugins/harpoon.lua new file mode 100644 index 0000000..1322ff8 --- /dev/null +++ b/nvim/custom/plugins/harpoon.lua @@ -0,0 +1,2 @@ +local M = {} +return M diff --git a/nvim/custom/plugins/init.lua b/nvim/custom/plugins/init.lua new file mode 100644 index 0000000..182c77f --- /dev/null +++ b/nvim/custom/plugins/init.lua @@ -0,0 +1,9 @@ +return { + -- ['nvim-lua/plenary.nvim'] = {}, + ['ThePrimeagen/harpoon'] = { + ft = "harpoon", + config = function() + require "custom.plugins.harpoon" + end, + }, +}