From bd463178037602cd1b3e242320e37255e38a9f16 Mon Sep 17 00:00:00 2001 From: Michiel Scholten Date: Mon, 19 Jan 2026 11:17:31 +0100 Subject: [PATCH] Moved settings to their 'correct lazyvim' places --- .config/nvim/lua/config/lazy.lua | 58 +++++++++++------------------ .config/nvim/lua/config/options.lua | 16 ++++++++ .config/nvim/lua/plugins/snacks.lua | 7 ++++ 3 files changed, 45 insertions(+), 36 deletions(-) create mode 100644 .config/nvim/lua/config/options.lua create mode 100644 .config/nvim/lua/plugins/snacks.lua diff --git a/.config/nvim/lua/config/lazy.lua b/.config/nvim/lua/config/lazy.lua index ee49045..0d6ca56 100644 --- a/.config/nvim/lua/config/lazy.lua +++ b/.config/nvim/lua/config/lazy.lua @@ -1,49 +1,35 @@ -- Bootstrap lazy.nvim local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not (vim.uv or vim.loop).fs_stat(lazypath) then - local lazyrepo = "https://github.com/folke/lazy.nvim.git" - local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) - if vim.v.shell_error ~= 0 then - vim.api.nvim_echo({ - { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, - { out, "WarningMsg" }, - { "\nPress any key to exit..." }, - }, true, {}) - vim.fn.getchar() - os.exit(1) - end + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end end vim.opt.rtp:prepend(lazypath) -- Make sure to setup `mapleader` and `maplocalleader` before -- loading lazy.nvim so that mappings are correct. -- This is also a good place to setup other settings (vim.opt) -vim.g.mapleader = "," -vim.g.maplocalleader = "," - -vim.opt.number = true -vim.opt.relativenumber = false -- relative line numbers -vim.opt.tabstop = 4 -- tab width -vim.opt.shiftwidth = 4 -- indent width -vim.opt.expandtab = true -- spaces instead of tabs -vim.opt.smartindent = true -- smart indentation -vim.opt.termguicolors = true -- true color support -vim.opt.clipboard = "unnamedplus" -- system clipboard - --- vim.cmd.colorscheme 'kanagawa-dragon' -vim.opt.smoothscroll = true -- Setup lazy.nvim require("lazy").setup({ - spec = { - -- add LazyVim and import its plugins - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - -- import your plugins - { import = "plugins" }, - }, - -- Configure any other settings here. See the documentation for more details. - -- colorscheme that will be used when installing plugins. - install = { colorscheme = { "kanagawa-dragon" } }, - -- automatically check for plugin updates - checker = { enabled = true }, + spec = { + -- add LazyVim and import its plugins + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + -- import your plugins + { import = "plugins" }, + }, + -- Configure any other settings here. See the documentation for more details. + -- colorscheme that will be used when installing plugins. + install = { colorscheme = { "kanagawa-dragon" } }, + -- automatically check for plugin updates + checker = { enabled = true }, }) diff --git a/.config/nvim/lua/config/options.lua b/.config/nvim/lua/config/options.lua new file mode 100644 index 0000000..191fda5 --- /dev/null +++ b/.config/nvim/lua/config/options.lua @@ -0,0 +1,16 @@ +-- Default options: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua + +vim.g.mapleader = "," +vim.g.maplocalleader = "," + +vim.opt.number = true +vim.opt.relativenumber = false -- relative line numbers +vim.opt.tabstop = 4 -- tab width +vim.opt.shiftwidth = 4 -- indent width +vim.opt.expandtab = true -- spaces instead of tabs +vim.opt.smartindent = true -- smart indentation +vim.opt.termguicolors = true -- true color support +vim.opt.clipboard = "unnamedplus" -- system clipboard +-- vim.opt.smoothscroll = true + +-- Colorscheme is set in its plugin file diff --git a/.config/nvim/lua/plugins/snacks.lua b/.config/nvim/lua/plugins/snacks.lua new file mode 100644 index 0000000..b434ee9 --- /dev/null +++ b/.config/nvim/lua/plugins/snacks.lua @@ -0,0 +1,7 @@ +return { + "folke/snacks.nvim", + opts = { + scroll = { enabled = false }, + -- other stuff + }, +}