From 12f1fa233f4743fce8bf1de9b007abc141409178 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Fri, 19 Dec 2025 09:41:27 +0100 Subject: [PATCH] changes for vscode --- init.lua | 10 ++++------ lua/config/lazy.lua | 21 +++++++++++++++++---- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/init.lua b/init.lua index 3d931a8..ceb8a6f 100644 --- a/init.lua +++ b/init.lua @@ -1,8 +1,6 @@ vim.g.mapleader = ',' vim.g.maplocalleader = ',' -if not vim.g.vscode then - require('config.lazy') - require('my_keymappings') - require('my_autocommands') - require('config.options') -end +require('config.lazy') +require('my_keymappings') +require('my_autocommands') +require('config.options') diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua index 3f7c862..0cf9423 100644 --- a/lua/config/lazy.lua +++ b/lua/config/lazy.lua @@ -10,15 +10,28 @@ if not vim.loop.fs_stat(lazypath) then }) end vim.opt.rtp:prepend(lazypath) +local lazy_spec = {} + +if vim.g.vscode then + -- Manually list the files you want in VSCode + lazy_spec = { + { import = 'plugins.mini_ai' }, + { import = 'plugins.flash' }, + -- Do NOT import 'plugins' (which loads the whole folder) + } +else + -- Standard Neovim: Load the entire folder + themes + lazy_spec = { + { import = 'plugins' }, + { import = 'themes' }, + } +end require('lazy').setup({ defaults = { version = false, }, - spec = { - { import = 'plugins' }, - { import = 'themes' }, - }, + spec = lazy_spec, change_detection = { -- automatically check for config file changes and reload the ui enabled = true,