From 0a859f314e0d1bc3ea86a6f70556159bd8f82b83 Mon Sep 17 00:00:00 2001 From: dlond Date: Mon, 26 May 2025 06:26:18 +1200 Subject: [PATCH] more cleanup --- init.lua | 10 ++++------ lua/custom/plugins/init.lua | 12 ++++++++---- lua/custom/plugins/telescope.lua | 1 - 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/init.lua b/init.lua index b27ccf4e..1f1d2276 100644 --- a/init.lua +++ b/init.lua @@ -166,6 +166,7 @@ vim.o.scrolloff = 10 -- See `:help 'confirm'` vim.o.confirm = true +require 'custom.options' -- [[ Basic Keymaps ]] -- See `:help vim.keymap.set()` @@ -205,6 +206,8 @@ vim.keymap.set('n', '', '', { desc = 'Move focus to the upper win -- vim.keymap.set("n", "", "J", { desc = "Move window to the lower" }) -- vim.keymap.set("n", "", "K", { desc = "Move window to the upper" }) +require 'custom.keymaps' + -- [[ Basic Autocommands ]] -- See `:help lua-guide-autocommands` @@ -246,6 +249,7 @@ rtp:prepend(lazypath) -- -- NOTE: Here is where you install your plugins. require('lazy').setup({ + { import = 'custom.plugins' }, -- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link). 'NMAC427/guess-indent.nvim', -- Detect tabstop and shiftwidth automatically @@ -377,9 +381,6 @@ require('lazy').setup({ end, }, { 'nvim-telescope/telescope-ui-select.nvim' }, - - -- Useful for getting pretty icons, but requires a Nerd Font. - { 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font }, }, config = function() -- Telescope is a fuzzy finder that comes with a lot of different things that @@ -940,7 +941,6 @@ require('lazy').setup({ -- This is the easiest way to modularize your config. -- -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. - { import = 'custom.plugins' }, -- -- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec` -- Or use telescope! @@ -968,8 +968,6 @@ require('lazy').setup({ }, }) -require 'custom.options' -require 'custom.keymaps' require 'custom.utils' -- The line beneath this is called `modeline`. See `:help modeline` diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index aac28135..1241e745 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -3,6 +3,14 @@ -- -- See the kickstart.nvim README for more information return { + { + 'nvim-tree/nvim-web-devicons', + lazy = false, + priority = 1000, + config = function() + require('nvim-web-devicons').setup() + end, + }, { import = 'custom.plugins.completion' }, { import = 'custom.plugins.debug' }, { import = 'custom.plugins.formatting' }, @@ -11,8 +19,4 @@ return { { import = 'custom.plugins.telescope' }, { import = 'custom.plugins.theme' }, { import = 'custom.plugins.treesitter' }, - { - 'nvim-tree/nvim-web-devicons', - lazy = true, - }, } diff --git a/lua/custom/plugins/telescope.lua b/lua/custom/plugins/telescope.lua index e821007f..2b5c79be 100644 --- a/lua/custom/plugins/telescope.lua +++ b/lua/custom/plugins/telescope.lua @@ -15,7 +15,6 @@ return { end, }, { 'nvim-telescope/telescope-ui-select.nvim' }, - { 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font }, -- Conditionally enable based on options }, opts = { -- Use opts to merge/override defaults pickers = {