Skip to content

Commit

Permalink
fix(config): options cant be disabled with lazyvim config. Fixes #566
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Apr 16, 2023
1 parent a9e9204 commit 02c5e8d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 3 additions & 2 deletions lua/lazyvim/config/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ local defaults = {
defaults = {
autocmds = true, -- lazyvim.config.autocmds
keymaps = true, -- lazyvim.config.keymaps
options = true, -- lazyvim.config.options
-- lazyvim.config.options can't be configured here since that's loaded before lazyvim setup
-- if you want to disable loading options, add `package.loaded["lazyvim.config.options"] = true` to the top of your init.lua
},
-- icons used by other plugins
icons = {
Expand Down Expand Up @@ -141,7 +142,7 @@ function M.load(name)
})
end
-- always load lazyvim, then user file
if M.defaults[name] then
if M.defaults[name] or name == "options" then
_load("lazyvim.config." .. name)
end
_load("config." .. name)
Expand Down
5 changes: 2 additions & 3 deletions lua/lazyvim/config/options.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
-- This file is automatically loaded by plugins.config

vim.g.mapleader = " "
vim.g.maplocalleader = " "

Expand Down Expand Up @@ -28,7 +27,7 @@ opt.scrolloff = 4 -- Lines of context
opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize" }
opt.shiftround = true -- Round indent
opt.shiftwidth = 2 -- Size of an indent
opt.shortmess:append { W = true, I = true, c = true }
opt.shortmess:append({ W = true, I = true, c = true })
opt.showmode = false -- Dont show mode since we have a statusline
opt.sidescrolloff = 8 -- Columns of context
opt.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text each time
Expand All @@ -49,7 +48,7 @@ opt.wrap = false -- Disable line wrap

if vim.fn.has("nvim-0.9.0") == 1 then
opt.splitkeep = "screen"
opt.shortmess:append { C = true }
opt.shortmess:append({ C = true })
end

-- Fix markdown indentation settings
Expand Down

0 comments on commit 02c5e8d

Please sign in to comment.