Skip to content

Commit

Permalink
fix(config): set opts.user_default_options to plugin_default_options …
Browse files Browse the repository at this point in the history
…if nil (#119)
  • Loading branch information
catgoose authored Dec 25, 2024
1 parent c36f673 commit 078d5aa
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 23 deletions.
20 changes: 7 additions & 13 deletions .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
---
name: Bug
about: Create a bug report
title: 'Bug:'
title: "Bug:"
labels: bug
assignees: akianonymus

assignees: catgoose
---

**Describe the bug**
A clear and concise description of what the bug is.
A description of what the bug is.

**To Reproduce**
Your configuration and/or a small reproducible test, and/or the steps required to reproduce.
Use `test/minimal.lua` to produce a minimal config.
Provide your config and steps to reproduce.
You can use `test/minimal.lua` to produce a minimal config.

**Expected behavior**
A clear and concise description of what you expected to happen.
A description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.
Expand All @@ -24,12 +23,7 @@ If applicable, add screenshots to help explain your problem.
e.g. Ubuntu 16.04

**Neovim Version:**
e.g. 0.4.2

**Colorizer Version:**
Paste the output of

`find ~/.config/nvim/ -type d -name 'nvim-colorizer.lua' -exec git rev-parse HEAD \;`
e.g. 0.9.0

**Additional context**
Add any other context about the problem here.
1 change: 1 addition & 0 deletions lua/colorizer/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ end
function M.get_setup_options(opts)
init_options()
opts = opts or {}
opts.user_default_options = opts.user_default_options or plugin_user_default_options
opts.user_default_options = M.apply_alias_options(opts.user_default_options)
M.options = vim.tbl_deep_extend("force", M.options, opts)
return M.options
Expand Down
20 changes: 10 additions & 10 deletions test/expect.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@ local opts = {
lua = {
names = true,
names_custom = {
red_purple = "#017dac",
["red=green"] = "#3700c2",
["green@blue"] = "#e9e240",
["green!blue"] = "#a9e042",
["green!!blue"] = "#09e392",
one_two = "#017dac",
["three=four"] = "#3700c2",
["five@six"] = "#e9e240",
["seven!eight"] = "#a9e042",
["nine!!ten"] = "#09e392",
},
-- names_custom = function()
-- local colors = require("kanagawa.colors").setup()
-- return colors.palette
-- end,
},
},
buftypes = { "*", "!prompt", "!popup" },
user_commands = true,
user_default_options = {
names = false,
names_custom = function()
local colors = require("kanagawa.colors").setup()
return colors.palette
end,
RGB = true,
RRGGBB = true,
RRGGBBAA = true,
Expand Down Expand Up @@ -61,7 +61,7 @@ oniViolet oniViolet2 crystalBlue springViolet1 springViolet2 springBlue
lightBlue waveAqua2
Additional names with non-alphanumeric characters
red_purple red=green green@blue green!blue green!!blue
one_two three=four five@six seven!eight nine!!ten
Hexadecimal:
#RGB:
Expand Down

0 comments on commit 078d5aa

Please sign in to comment.