diff --git a/nvim/init.lua b/nvim/init.lua index 9400ef8..0fda20c 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -1,4 +1,4 @@ -vim.g.base46_cache = vim.fn.stdpath "data" .. "/nvchad/base46/" +vim.g.base46_cache = vim.fn.stdpath "data" .. "/base46/" vim.g.mapleader = " " -- bootstrap lazy and all plugins diff --git a/nvim/lazy-lock.json b/nvim/lazy-lock.json index c55b936..23cf40f 100644 --- a/nvim/lazy-lock.json +++ b/nvim/lazy-lock.json @@ -1,37 +1,39 @@ { "LuaSnip": { "branch": "master", "commit": "e808bee352d1a6fcf902ca1a71cee76e60e24071" }, - "NvChad": { "branch": "v2.5", "commit": "8d2bb359e47d816e67ff86b5ce2d8f5abfe2b631" }, + "NvChad": { "branch": "v2.5", "commit": "a69f893e49ee36d4c74431044b40f08042c396a2" }, "auto-save.nvim": { "branch": "main", "commit": "979b6c82f60cfa80f4cf437d77446d0ded0addf0" }, - "base46": { "branch": "v2.5", "commit": "82d71bc6def6a752cbf5fbd0e496aea5f088d940" }, + "base46": { "branch": "v2.5", "commit": "177af7c0e492f6332bf78675a47b8983b1a32291" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, - "conform.nvim": { "branch": "master", "commit": "1a99fdc1d3aa9ccdf3021e67982a679a8c5c740c" }, + "conform.nvim": { "branch": "master", "commit": "40d4e98fcc3e6f485f0e8924c63734bc7e305967" }, "crates.nvim": { "branch": "main", "commit": "1c924d5a9ea3496c4e1a02d0d51388ba809f8468" }, - "friendly-snippets": { "branch": "main", "commit": "00ba9dd3df89509f95437b8d595553707c46d5ea" }, - "gitsigns.nvim": { "branch": "main", "commit": "1ef74b546732f185d0f806860fa5404df7614f28" }, - "image.nvim": { "branch": "master", "commit": "f95cb9cca3a05033d5e94cfd760a48ec9a7d4719" }, - "indent-blankline.nvim": { "branch": "master", "commit": "18603eb949eba08300799f64027af11ef922283f" }, - "lazy.nvim": { "branch": "main", "commit": "460e1cd8f24e364d54543a4b0e83f6f4ec1f65fb" }, + "friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" }, + "gitsigns.nvim": { "branch": "main", "commit": "863903631e676b33e8be2acb17512fdc1b80b4fb" }, + "image.nvim": { "branch": "master", "commit": "88e9693e188b8464b1c426aebb4389fd9db2fcbf" }, + "indent-blankline.nvim": { "branch": "master", "commit": "e7a4442e055ec953311e77791546238d1eaae507" }, + "lazy.nvim": { "branch": "main", "commit": "1159bdccd8910a0fd0914b24d6c3d186689023d9" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" }, "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, - "nvim-autopairs": { "branch": "master", "commit": "f158dcb865c36f72c92358f87787dab2c272eaf3" }, + "menu": { "branch": "main", "commit": "b5115af73efe97f31214c433cf0ec05eb987e228" }, + "minty": { "branch": "main", "commit": "8809b2c7c2edbeb3fa9c3b05bd2e89934d54f526" }, + "nvim-autopairs": { "branch": "master", "commit": "ee297f215e95a60b01fde33275cc3c820eddeebe" }, "nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" }, - "nvim-colorizer.lua": { "branch": "master", "commit": "0671e0eabc6842676d3310370e8fae4e1c51d7f9" }, "nvim-lsp-endhints": { "branch": "main", "commit": "391ef40521b631a8a2fb7aef78db6967ead6b39d" }, - "nvim-lspconfig": { "branch": "master", "commit": "dd329912c8d446240584a2dbcd3802af3a19105a" }, - "nvim-tree.lua": { "branch": "master", "commit": "8405ecfbd6bb08a94ffc9c68fef211eea56e8a3b" }, - "nvim-treesitter": { "branch": "master", "commit": "6511cd984ab4b21e28f83af488f38dc89c3b0586" }, + "nvim-lspconfig": { "branch": "master", "commit": "d3f169f436e1b44538bfe7e13b4721eec48dbc59" }, + "nvim-tree.lua": { "branch": "master", "commit": "50e919426a4a2053f78b2f8ab001c8ad8eb47ef6" }, + "nvim-treesitter": { "branch": "master", "commit": "9d2acd49976e2a9da72949008df03436f781fd23" }, "nvim-ufo": { "branch": "main", "commit": "203c9f434feec57909ab4b1e028abeb3349b7847" }, - "nvim-web-devicons": { "branch": "master", "commit": "26220156aafb198b2de6a4cf80c1b120a3768da0" }, + "nvim-web-devicons": { "branch": "master", "commit": "56f17def81478e406e3a8ec4aa727558e79786f3" }, "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, "project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" }, "promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" }, - "rainbow-delimiters.nvim": { "branch": "master", "commit": "5f73b24aeb94f5274c218955573153c69ce4d1ee" }, - "rustaceanvim": { "branch": "master", "commit": "dc0ab4e36f9944901ed8a59878f92c2f818799a7" }, - "telescope.nvim": { "branch": "master", "commit": "b324469959908c1c7434eb65d80e87895e6828f7" }, - "ui": { "branch": "v2.5", "commit": "62f6ede07573a04e7c1a76ec48e7ce19b43d39f3" }, - "which-key.nvim": { "branch": "main", "commit": "fb070344402cfc662299d9914f5546d840a22126" } + "rainbow-delimiters.nvim": { "branch": "master", "commit": "d227e6c9879bb50af35cd733461198666981d482" }, + "rustaceanvim": { "branch": "master", "commit": "29f42cc149f915d771c550b6dfe7c788d856cf04" }, + "telescope.nvim": { "branch": "master", "commit": "dc6fc321a5ba076697cca89c9d7ea43153276d81" }, + "ui": { "branch": "v3.0", "commit": "2be2b1983b5cda5b360faeff67ffe409fa668996" }, + "volt": { "branch": "main", "commit": "43f72b49037c191eb3cfe26ba7a5574b4bfce226" }, + "which-key.nvim": { "branch": "main", "commit": "8badb359f7ab8711e2575ef75dfe6fbbd87e4821" } } diff --git a/nvim/lua/chadrc.lua b/nvim/lua/chadrc.lua index e2fc2a4..0f6e731 100644 --- a/nvim/lua/chadrc.lua +++ b/nvim/lua/chadrc.lua @@ -1,5 +1,5 @@ -- This file needs to have same structure as nvconfig.lua --- https://github.com/NvChad/ui/blob/v2.5/lua/nvconfig.lua +-- https://github.com/NvChad/ui/blob/v3.0/lua/nvconfig.lua ---@type ChadrcConfig local M = {} @@ -95,39 +95,48 @@ M.ui = { theme = "vscode_colored", }, - nvdash = { - load_on_startup = true, - header = { - " ▄▄ ▄ ▄▄▄▄▄▄▄ ", - "▄▀███▄ ▄██ █████▀ ", - "██▄▀███▄ ███ ", - "███ ▀███▄ ███ ", - "███ ▀██ ███ ", - "███ ▀ ███ ", - "▀██ █████▄▀█▀▄██████▄ ", - " ▀ ▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀ ", - }, - buttons = { - { "  Projects", "Spc f p", "Telescope projects" }, - { "  Find File", "Spc f f", "Telescope find_files" }, - { " 󰈚 Recent Files", "Spc f o", "Telescope oldfiles" }, - { " 󰈭 Find Word", "Spc f w", "Telescope live_grep" }, - { "  Bookmarks", "Spc m a", "Telescope marks" }, + cmp = { + style="atom_colored" + } + +} + +M.nvdash = { + load_on_startup = true, + buttons = { + { txt = "  Projects", keys = "Spc f p", cmd = "Telescope projects" }, + { txt = "  Find File", keys = "Spc f f", cmd = "Telescope find_files" }, + { txt = " 󰈚 Recent Files", keys = "Spc f o", cmd = "Telescope oldfiles" }, + { txt = " 󰈭 Find Word", keys = "Spc f w", cmd = "Telescope live_grep" }, + { txt = "  Bookmarks", keys = "Spc m a", cmd = "Telescope marks" }, + { txt = "─", hl = "NvDashLazy", no_gap = true, rep = true }, + + { + txt = function() + local stats = require("lazy").stats() + local ms = math.floor(stats.startuptime) .. " ms" + return " Loaded " .. stats.loaded .. "/" .. stats.count .. " plugins in " .. ms + end, + hl = "NvDashLazy", + no_gap = true, }, + + { txt = "─", hl = "NvDashLazy", no_gap = true, rep = true }, }, + } M.term = { - -- hl = "Normal:term,WinSeparator:WinSeparator", - -- sizes = { sp = 0.3, vsp = 0.2 }, - float = { - relative = "editor", - row = 0.04, - col = 0.045, - width = 0.9, - height = 0.8, - border = "single", - }, + -- hl = "Normal:term,WinSeparator:WinSeparator", + -- sizes = { sp = 0.3, vsp = 0.2 }, + float = { + relative = "editor", + row = 0.04, + col = 0.045, + width = 0.9, + height = 0.8, + border = "single", + }, } return M diff --git a/nvim/lua/configs/cmp.lua b/nvim/lua/configs/cmp.lua deleted file mode 100644 index 0f33c3b..0000000 --- a/nvim/lua/configs/cmp.lua +++ /dev/null @@ -1,20 +0,0 @@ -local cmp_ui = require("nvconfig").ui.cmp - -return { - formatting = { - -- default fields order i.e completion word + item.kind + item.kind icons - fields = { "abbr", "kind" }, - - format = function(_, item) - local icons = require "nvchad.icons.lspkind" - local icon = (cmp_ui.icons and icons[item.kind]) or "" - - icon = cmp_ui.lspkind_text and (" " .. icon .. " ") or icon - item.kind = string.format("%s %s", icon, cmp_ui.lspkind_text and item.kind or "") - - item.abbr = item.abbr:match "[^(]+" - item.menu = "" - return item - end, - }, -} diff --git a/nvim/lua/mappings.lua b/nvim/lua/mappings.lua index 004ea78..6de8838 100644 --- a/nvim/lua/mappings.lua +++ b/nvim/lua/mappings.lua @@ -2,7 +2,6 @@ require "nvchad.mappings" local nomap = vim.keymap.del nomap("n", "x") -nomap("n", "cc") nomap("n", "ch") nomap("n", "cm") nomap("n", "v") diff --git a/nvim/lua/plugins/crates.lua b/nvim/lua/plugins/crates.lua index 2faf12c..98704e9 100644 --- a/nvim/lua/plugins/crates.lua +++ b/nvim/lua/plugins/crates.lua @@ -2,8 +2,7 @@ return { "saecki/crates.nvim", tag = "stable", event = { "BufRead Cargo.toml" }, - config = function() - require("crates").setup{ + opts = { lsp = { enabled = true, actions = true, @@ -18,5 +17,4 @@ return { }, } } - end, } diff --git a/nvim/lua/plugins/endhints.lua b/nvim/lua/plugins/endhints.lua index 1680d70..0d09d3a 100644 --- a/nvim/lua/plugins/endhints.lua +++ b/nvim/lua/plugins/endhints.lua @@ -1,7 +1,9 @@ return { "chrisgrieser/nvim-lsp-endhints", - event = "LspAttach", - opts = {icons = { - type = "󱈤 ", - },},} - + event = "LspAttach", + opts = { + icons = { + type = "󱈤 ", + }, + }, +} diff --git a/nvim/lua/plugins/init.lua b/nvim/lua/plugins/init.lua index 6280c02..3e0b5a1 100644 --- a/nvim/lua/plugins/init.lua +++ b/nvim/lua/plugins/init.lua @@ -5,16 +5,13 @@ return { }, { "neovim/nvim-lspconfig", - config = function() - require "configs.lspconfig" - end, + opts = + require "configs.lspconfig" }, { "Pocco81/auto-save.nvim", - config = function() - require("auto-save").setup() - end, - lazy = false, + opts = {}, + event = { "BufEnter" }, }, { "nvim-treesitter/nvim-treesitter", @@ -29,7 +26,6 @@ return { }, { "hrsh7th/nvim-cmp", - opts = require "configs.cmp", }, { "3rd/image.nvim", @@ -40,6 +36,7 @@ return { package.path = package.path .. ";" .. vim.fn.expand "$HOME" .. "/.luarocks/share/lua/5.1/?/init.lua" package.path = package.path .. ";" .. vim.fn.expand "$HOME" .. "/.luarocks/share/lua/5.1/?.lua" end, - ft = { "markdown", "" }, + ft = { "markdown" }, + event = { "BufRead *.png", "BufRead *.jpg", "BufRead *.jpeg", "BufRead *.gif", "BufRead *.wepb", "BufRead *.avif" }, }, } diff --git a/nvim/lua/plugins/mason-tool-installer.lua b/nvim/lua/plugins/mason-tool-installer.lua index bac8fbe..2fab400 100644 --- a/nvim/lua/plugins/mason-tool-installer.lua +++ b/nvim/lua/plugins/mason-tool-installer.lua @@ -1,7 +1,5 @@ return { "WhoIsSethDaniel/mason-tool-installer.nvim", lazy = false, - config = function() - require("mason-tool-installer").setup(require "configs.default-lsp") - end, + opts = require "configs.default-lsp" } diff --git a/nvim/lua/plugins/project.lua b/nvim/lua/plugins/project.lua index 2ab1266..a828aec 100644 --- a/nvim/lua/plugins/project.lua +++ b/nvim/lua/plugins/project.lua @@ -1,12 +1,9 @@ -return { - "ahmedkhalf/project.nvim", - lazy = false, - config = function() - require("telescope").load_extension "projects" - require("project_nvim").setup { - -- your configuration comes here - -- or leave it empty to use the default settings - -- refer to the configuration section below - } - end, - } +return { + "ahmedkhalf/project.nvim", + lazy = false, + config = function() + require("telescope").load_extension "projects" + require("project_nvim").setup { + } + end, +} diff --git a/nvim/lua/plugins/ufo.lua b/nvim/lua/plugins/ufo.lua index 09eb371..12bf66c 100644 --- a/nvim/lua/plugins/ufo.lua +++ b/nvim/lua/plugins/ufo.lua @@ -1,12 +1,10 @@ return { "kevinhwang91/nvim-ufo", - config = function() - require("ufo").setup { + opts = { provider_selector = function(_, _, _) return { "treesitter", "indent" } end, - } - end, + }, lazy = false, dependencies = { "kevinhwang91/promise-async" }, }