Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

Commit

Permalink
Merge pull request #62 from LoricAndre/develop
Browse files Browse the repository at this point in the history
Add options to doom_config (closes #60)
  • Loading branch information
NTBBloodbath authored Jul 15, 2021
2 parents 3996b4a + 7007ba9 commit 67dea6c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions doom_config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,13 @@ local nvim = {
-- end
-- }
functions = {},
-- Set custom options
-- @default = {}
-- example:
-- {
-- { ['shiftwidth'] = 4 }
-- }
options = {},
}
-- }}}

Expand Down
1 change: 1 addition & 0 deletions lua/doom/core/default/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ M.custom_options = function()
functions.load_custom_settings(config.nvim.functions, 'functions')
functions.load_custom_settings(config.nvim.mappings, 'mappings')
functions.load_custom_settings(config.nvim.global_variables, 'variables')
functions.load_custom_settings(config.nvim.global_options, 'options')
end

return M
4 changes: 4 additions & 0 deletions lua/doom/core/functions/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ M.load_custom_settings = function(settings_tbl, scope)
for var, val in pairs(settings_tbl) do
vim.g[var] = val
end
elseif scope == 'options' then
for var, val in pairs(settings_tbl) do
vim.opt[var] = val
end
end
end
end
Expand Down

0 comments on commit 67dea6c

Please sign in to comment.