From b32fb526ce856f81f88c00cef2add580fa819160 Mon Sep 17 00:00:00 2001 From: taco boi Date: Sat, 30 Nov 2024 14:59:00 -0600 Subject: [PATCH 1/2] testing nvchad plugins --- init.lua | 6 ++++ lazy-lock.json | 48 ++++++++++++++++-------------- lua/custom/plugins/colorscheme.lua | 18 +++++++++++ 3 files changed, 49 insertions(+), 23 deletions(-) diff --git a/init.lua b/init.lua index 23e6540..21b1c2b 100644 --- a/init.lua +++ b/init.lua @@ -95,6 +95,9 @@ vim.keymap.set("n", "", function() vim.cmd("so") end) +-- put this in your main init.lua file ( before lazy setup ) +vim.g.base46_cache = vim.fn.stdpath "data" .. "/base46_cache/" + -- [[ Install `lazy.nvim` plugin manager ]] -- https://github.com/folke/lazy.nvim -- `:help lazy.nvim.txt` for more info @@ -111,6 +114,9 @@ if not vim.loop.fs_stat(lazypath) then end vim.opt.rtp:prepend(lazypath) +for _, v in ipairs(vim.fn.readdir(vim.g.base46_cache)) do + dofile(vim.g.base46_cache .. v) +end -- [[ Configure plugins ]] -- NOTE: Here is where you install your plugins. -- You can configure plugins using the `config` key. diff --git a/lazy-lock.json b/lazy-lock.json index 55857e9..7158cf1 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,55 +1,57 @@ { "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, - "LuaSnip": { "branch": "master", "commit": "e808bee352d1a6fcf902ca1a71cee76e60e24071" }, - "catppuccin": { "branch": "main", "commit": "63685e1562ef53873c9764b483d7ac5c7a608922" }, + "LuaSnip": { "branch": "master", "commit": "0f7bbce41ea152a94d12aea286f2ce98e63c0f58" }, + "catppuccin": { "branch": "main", "commit": "faf15ab0201b564b6368ffa47b56feefc92ce3f4" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, - "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, + "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, "fidget.nvim": { "branch": "main", "commit": "d855eed8a06531a7e8fd0684889b2943f373c469" }, - "friendly-snippets": { "branch": "main", "commit": "00ba9dd3df89509f95437b8d595553707c46d5ea" }, + "friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" }, "gitsigns.nvim": { "branch": "main", "commit": "1ef74b546732f185d0f806860fa5404df7614f28" }, - "gruvbox.nvim": { "branch": "main", "commit": "7a1b23e4edf73a39642e77508ee6b9cbb8c60f9e" }, - "harpoon": { "branch": "master", "commit": "1bc17e3e42ea3c46b33c0bbad6a880792692a1b3" }, + "gruvbox.nvim": { "branch": "main", "commit": "68c3460a5d1d1a362318960035c9f3466d5011f5" }, + "harpoon": { "branch": "master", "commit": "a84ab829eaf3678b586609888ef52f7779102263" }, "indent-blankline.nvim": { "branch": "master", "commit": "18603eb949eba08300799f64027af11ef922283f" }, "kanagawa.nvim": { "branch": "master", "commit": "f491b0fe68fffbece7030181073dfe51f45cda81" }, - "lazy.nvim": { "branch": "main", "commit": "460e1cd8f24e364d54543a4b0e83f6f4ec1f65fb" }, - "lspkind.nvim": { "branch": "master", "commit": "cff4ae321a91ee3473a92ea1a8c637e3a9510aec" }, + "lazy.nvim": { "branch": "main", "commit": "56ead98e05bb37a4ec28930a54d836d033cf00f2" }, + "lspkind.nvim": { "branch": "master", "commit": "a700f1436d4a938b1a1a93c9962dc796afbaef4d" }, "lua-utils.nvim": { "branch": "main", "commit": "e565749421f4bbb5d2e85e37c3cef9d56553d8bd" }, - "lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "25c11854aa25558ee6c03432edfa0df0217324be" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "8e46de9241d3997927af12196bd8faa0ed08c29a" }, "mason-nvim-dap.nvim": { "branch": "main", "commit": "8b9363d83b5d779813cdd2819b8308651cec2a09" }, "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, + "material.nvim": { "branch": "main", "commit": "31429eef4b7233ebdae3ddb57b7165ee4f1bd653" }, + "mini.icons": { "branch": "main", "commit": "54686be7d58807906cb2c8c2216e0bf9c044f19a" }, + "mini.nvim": { "branch": "main", "commit": "c8922aef8207137e66c80acdb9523668599ba62a" }, "neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" }, - "neorg": { "branch": "main", "commit": "ba35900b21921c439e676b063a79c8fad914eac9" }, - "noice.nvim": { "branch": "main", "commit": "c1ba80ccf6b3bd8c7fc88fe2e61085131d44ad65" }, + "neorg": { "branch": "main", "commit": "7a893a176a7d9c074a5371865b53c6aa4e223991" }, "nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" }, - "nvim-autopairs": { "branch": "master", "commit": "f158dcb865c36f72c92358f87787dab2c272eaf3" }, - "nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" }, + "nvim-autopairs": { "branch": "master", "commit": "b464658e9b880f463b9f7e6ccddd93fb0013f559" }, + "nvim-cmp": { "branch": "main", "commit": "ed31156aa2cc14e3bc066c59357cc91536a2bc01" }, "nvim-dap": { "branch": "master", "commit": "90616ae6ae40053103dc66872886fc26b94c70c8" }, "nvim-dap-go": { "branch": "main", "commit": "5511788255c92bdd845f8d9690f88e2e0f0ff9f2" }, "nvim-dap-ui": { "branch": "master", "commit": "1c351e4e417d4691da12948b6ecf966936a56d28" }, "nvim-lint": { "branch": "master", "commit": "968a35d54b3a4c1ce66609cf80b14d4ae44fe77f" }, - "nvim-lspconfig": { "branch": "master", "commit": "a9bc587e9ae0cbcb3e90a2e9342f86b3b78c4408" }, + "nvim-lspconfig": { "branch": "master", "commit": "86dcd4d4ec014c5cb47033c52a54508acd503b97" }, "nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" }, - "nvim-notify": { "branch": "master", "commit": "fbef5d32be8466dd76544a257d3f3dce20082a07" }, - "nvim-treesitter": { "branch": "master", "commit": "0c8a582e474e248f2a4406188e0c653f92a064cf" }, - "nvim-treesitter-textobjects": { "branch": "master", "commit": "bf8d2ad35d1d1a687eae6c065c3d524f7ab61b23" }, + "nvim-treesitter": { "branch": "master", "commit": "4d035005d338e4b1eb71a175bd44974e2f64740f" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "3e450cd85243da99dc23ebbf14f9c70e9a0c26a4" }, + "oil.nvim": { "branch": "master", "commit": "3c2de37accead0240fbe812f5ccdedfe0b973557" }, "onedarkpro.nvim": { "branch": "main", "commit": "ada0798b1bf6d0bde1fbf239c22de778bf5efbd1" }, "oxocarbon.nvim": { "branch": "main", "commit": "004777819ba294423b638a35a75c9f0c7be758ed" }, "pathlib.nvim": { "branch": "main", "commit": "57e5598af6fe253761c1b48e0b59b7cd6699e2c1" }, "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, "rose-pine": { "branch": "main", "commit": "8b1fd252255a7f2c41b4192a787ab62660b29f72" }, - "rustaceanvim": { "branch": "master", "commit": "6eb1c41463a0ad02a4fe799321cc7f651b87e576" }, + "rustaceanvim": { "branch": "master", "commit": "b2df0caa67d41c63a7284b03e80aeff15d8e31ca" }, + "snacks.nvim": { "branch": "main", "commit": "da53742d238abda7167d3609567095109073faa3" }, "solarized-osaka.nvim": { "branch": "main", "commit": "126d394c0c979a99206214a2b6b8c86e456c9c0f" }, "tailwind-sorter.nvim": { "branch": "main", "commit": "e03eea3909c28509375993fb77a42454ac8ecbb2" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, - "telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, - "trouble.nvim": { "branch": "main", "commit": "6efc446226679fda0547c0fd6a7892fd5f5b15d8" }, - "vim-fugitive": { "branch": "master", "commit": "d4877e54cef67f5af4f950935b1ade19ed6b7370" }, + "telescope.nvim": { "branch": "0.1.x", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" }, + "trouble.nvim": { "branch": "main", "commit": "46cf952fc115f4c2b98d4e208ed1e2dce08c9bf6" }, + "vim-fugitive": { "branch": "master", "commit": "320b18fba2a4f2fe3c8225c778c687e0d2620384" }, "vim-rhubarb": { "branch": "master", "commit": "ee69335de176d9325267b0fd2597a22901d927b1" }, "vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" }, "web-tools.nvim": { "branch": "master", "commit": "eb0ac27bd3eb0beb06b7190a11e2e043049a4ccc" }, - "which-key.nvim": { "branch": "main", "commit": "fb070344402cfc662299d9914f5546d840a22126" } + "which-key.nvim": { "branch": "main", "commit": "9b365a6428a9633e3eeb34dbef1b791511c54f70" } } diff --git a/lua/custom/plugins/colorscheme.lua b/lua/custom/plugins/colorscheme.lua index 2abd257..980e2c5 100644 --- a/lua/custom/plugins/colorscheme.lua +++ b/lua/custom/plugins/colorscheme.lua @@ -1,4 +1,22 @@ return { + "nvim-lua/plenary.nvim", + + { + "nvchad/ui", + config = function() + require "nvchad" + end + }, + + { + "nvchad/base46", + lazy = true, + build = function() + require("base46").load_all_highlights() + end, + }, + + -- or just use Telescope themes { "catppuccin/nvim", name = "catppuccin", From 472145339e42509765fc058448d6e65e445fd34a Mon Sep 17 00:00:00 2001 From: taco boi Date: Sat, 30 Nov 2024 18:38:14 -0600 Subject: [PATCH 2/2] added stuff --- ] | 59 ++++++++++++++++++++++++++++++ init.lua | 7 ++-- lazy-lock.json | 6 ++- lua/custom/plugins/colorscheme.lua | 6 ++- lua/custom/plugins/nvim-cmp.lua | 12 +++--- 5 files changed, 77 insertions(+), 13 deletions(-) create mode 100644 ] mode change 100644 => 100755 lua/custom/plugins/colorscheme.lua diff --git a/] b/] new file mode 100644 index 0000000..47bff1b --- /dev/null +++ b/] @@ -0,0 +1,59 @@ +return { + "hrsh7th/nvim-cmp", + event = "InsertEnter", + dependencies = { + "hrsh7th/cmp-buffer", -- source for text in buffer + "hrsh7th/cmp-path", -- source for file system paths + "L3MON4D3/LuaSnip", -- snippet engine + "saadparwaiz1/cmp_luasnip", -- for autocompletion + "rafamadriz/friendly-snippets", -- useful snippets + "onsails/lspkind.nvim", -- vs-code like pictograms + }, + config = function() + local cmp = require("cmp") + + local luasnip = require("luasnip") + + local lspkind = require("lspkind") + + -- loads vscode style snippets from installed plugins (e.g. friendly-snippets) + require("luasnip.loaders.from_vscode").lazy_load() + cmp.setup({ + completion = { + completeopt = "menu,menuone,preview,noselect", + }, + snippet = { -- configure how nvim-cmp interacts with snippet engine + expand = function(args) + luasnip.lsp_expand(args.body) + end, + }, + + mapping = cmp.mapping.preset.insert({ + ["K"] = cmp.mapping.select_prev_item(), -- previous suggestion + [""] = cmp.mapping.select_next_item(), -- next suggestion [""] = cmp.mapping.scroll_docs(-4), + [""] = cmp.mapping.scroll_docs(4), + [""] = cmp.mapping.complete(), -- show completion suggestions + [""] = cmp.mapping.abort(), -- close completion window + [""] = cmp.mapping.confirm({ select = true }), + }), + -- sources for autocompletion + sources = cmp.config.sources({ + { name = "nvim_lsp" }, + { name = "luasnip" }, -- snippets + { name = "buffer" }, -- text within current buffer + { name = "path" }, -- file system paths + }), + + experimental = { + ghost_text = true, + }, + -- configure lspkind for vs-code like pictograms in completion menu + formatting = { + format = lspkind.cmp_format({ + maxwidth = 50, + ellipsis_char = "...", + }), + }, + }) + end, +} diff --git a/init.lua b/init.lua index 21b1c2b..33c36a0 100644 --- a/init.lua +++ b/init.lua @@ -191,8 +191,9 @@ require('lazy').setup({ opts = {} }, - -- Additional lua configuration, makes nvim stuff amazing! - 'folke/neodev.nvim', + { + "folke/lazydev.nvim", + }, }, }, { @@ -730,7 +731,7 @@ local servers = { } -- Setup neovim lua configuration -require('neodev').setup() +require('lazydev').setup() -- nvim-cmp supports additional completion capabilities, so broadcast that to servers local capabilities = vim.lsp.protocol.make_client_capabilities() diff --git a/lazy-lock.json b/lazy-lock.json index 7158cf1..a50de0f 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,6 +1,7 @@ { "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, "LuaSnip": { "branch": "master", "commit": "0f7bbce41ea152a94d12aea286f2ce98e63c0f58" }, + "base46": { "branch": "v2.5", "commit": "0e1824f7e4a3df36180e607e1adb3bdbd96db07f" }, "catppuccin": { "branch": "main", "commit": "faf15ab0201b564b6368ffa47b56feefc92ce3f4" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, @@ -9,21 +10,21 @@ "fidget.nvim": { "branch": "main", "commit": "d855eed8a06531a7e8fd0684889b2943f373c469" }, "friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" }, "gitsigns.nvim": { "branch": "main", "commit": "1ef74b546732f185d0f806860fa5404df7614f28" }, + "gruvbox-material": { "branch": "master", "commit": "170148af9350f578f3623f810e54698fa1e5bdbf" }, "gruvbox.nvim": { "branch": "main", "commit": "68c3460a5d1d1a362318960035c9f3466d5011f5" }, "harpoon": { "branch": "master", "commit": "a84ab829eaf3678b586609888ef52f7779102263" }, "indent-blankline.nvim": { "branch": "master", "commit": "18603eb949eba08300799f64027af11ef922283f" }, "kanagawa.nvim": { "branch": "master", "commit": "f491b0fe68fffbece7030181073dfe51f45cda81" }, "lazy.nvim": { "branch": "main", "commit": "56ead98e05bb37a4ec28930a54d836d033cf00f2" }, + "lazydev.nvim": { "branch": "main", "commit": "f59bd14a852ca43db38e3662395354cb2a9b13e0" }, "lspkind.nvim": { "branch": "master", "commit": "a700f1436d4a938b1a1a93c9962dc796afbaef4d" }, "lua-utils.nvim": { "branch": "main", "commit": "e565749421f4bbb5d2e85e37c3cef9d56553d8bd" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "8e46de9241d3997927af12196bd8faa0ed08c29a" }, "mason-nvim-dap.nvim": { "branch": "main", "commit": "8b9363d83b5d779813cdd2819b8308651cec2a09" }, "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, - "material.nvim": { "branch": "main", "commit": "31429eef4b7233ebdae3ddb57b7165ee4f1bd653" }, "mini.icons": { "branch": "main", "commit": "54686be7d58807906cb2c8c2216e0bf9c044f19a" }, "mini.nvim": { "branch": "main", "commit": "c8922aef8207137e66c80acdb9523668599ba62a" }, - "neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" }, "neorg": { "branch": "main", "commit": "7a893a176a7d9c074a5371865b53c6aa4e223991" }, "nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" }, "nvim-autopairs": { "branch": "master", "commit": "b464658e9b880f463b9f7e6ccddd93fb0013f559" }, @@ -49,6 +50,7 @@ "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, "telescope.nvim": { "branch": "0.1.x", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" }, "trouble.nvim": { "branch": "main", "commit": "46cf952fc115f4c2b98d4e208ed1e2dce08c9bf6" }, + "ui": { "branch": "v3.0", "commit": "5be808e184d5566846bdad3abaeea9caabf91e12" }, "vim-fugitive": { "branch": "master", "commit": "320b18fba2a4f2fe3c8225c778c687e0d2620384" }, "vim-rhubarb": { "branch": "master", "commit": "ee69335de176d9325267b0fd2597a22901d927b1" }, "vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" }, diff --git a/lua/custom/plugins/colorscheme.lua b/lua/custom/plugins/colorscheme.lua old mode 100644 new mode 100755 index 980e2c5..605cfa3 --- a/lua/custom/plugins/colorscheme.lua +++ b/lua/custom/plugins/colorscheme.lua @@ -1,6 +1,8 @@ return { - "nvim-lua/plenary.nvim", - + { + 'sainnhe/gruvbox-material', + lazy = false, + }, { "nvchad/ui", config = function() diff --git a/lua/custom/plugins/nvim-cmp.lua b/lua/custom/plugins/nvim-cmp.lua index 81d79fe..47bff1b 100644 --- a/lua/custom/plugins/nvim-cmp.lua +++ b/lua/custom/plugins/nvim-cmp.lua @@ -2,12 +2,12 @@ return { "hrsh7th/nvim-cmp", event = "InsertEnter", dependencies = { - "hrsh7th/cmp-buffer", -- source for text in buffer - "hrsh7th/cmp-path", -- source for file system paths - "L3MON4D3/LuaSnip", -- snippet engine - "saadparwaiz1/cmp_luasnip", -- for autocompletion + "hrsh7th/cmp-buffer", -- source for text in buffer + "hrsh7th/cmp-path", -- source for file system paths + "L3MON4D3/LuaSnip", -- snippet engine + "saadparwaiz1/cmp_luasnip", -- for autocompletion "rafamadriz/friendly-snippets", -- useful snippets - "onsails/lspkind.nvim", -- vs-code like pictograms + "onsails/lspkind.nvim", -- vs-code like pictograms }, config = function() local cmp = require("cmp") @@ -33,7 +33,7 @@ return { [""] = cmp.mapping.select_next_item(), -- next suggestion [""] = cmp.mapping.scroll_docs(-4), [""] = cmp.mapping.scroll_docs(4), [""] = cmp.mapping.complete(), -- show completion suggestions - [""] = cmp.mapping.abort(), -- close completion window + [""] = cmp.mapping.abort(), -- close completion window [""] = cmp.mapping.confirm({ select = true }), }), -- sources for autocompletion