diff --git a/lua/astrobox/config.lua b/lua/astrobox/config.lua index 1633460..64654f5 100644 --- a/lua/astrobox/config.lua +++ b/lua/astrobox/config.lua @@ -17,6 +17,8 @@ local M = { ---@param user_cfg Config ---@return Config -function M.make_config(user_cfg) return user_cfg and vim.tbl_extend("force", M.default, user_cfg) or M.default end +function M.make_config(user_cfg) + return user_cfg and vim.tbl_extend("force", M.default, user_cfg) or M.default +end return M diff --git a/lua/astrobox/highlights/modules/syntax.lua b/lua/astrobox/highlights/modules/syntax.lua index 9570a05..15d50ff 100644 --- a/lua/astrobox/highlights/modules/syntax.lua +++ b/lua/astrobox/highlights/modules/syntax.lua @@ -142,15 +142,16 @@ return function(theme, palette) ["@lsp.type.string"] = { link = "@string" }, ["@lsp.type.struct"] = { link = "@struct" }, ["@lsp.type.typeParameter"] = { link = "@type" }, + ["@lsp.type.unresolvedReference"] = { fg = palette.purple }, ["@lsp.type.variable"] = { link = "@variable" }, ["@lsp.typemod.class.constructorOrDestructor"] = { link = "@constructor" }, ["@lsp.typemod.comment.documentation"] = { link = "@comment.documentation" }, + ["@lsp.typemod.const.constant"] = { link = "Constant" }, + ["@lsp.typemod.constParameter.constant"] = { link = "Constant" }, ["@lsp.typemod.derive.attribute"] = { fg = palette.blue }, ["@lsp.typemod.method"] = { link = "@method" }, ["@lsp.typemod.selfKeyword"] = theme.highlight_bold, - ["@lsp.typemod.string.attribute"] = { link = "String" }, -- Hmmmm + ["@lsp.typemod.string.attribute"] = { link = "String" }, ["@lsp.typemod.variable.readonly"] = { link = "Constant" }, - ["@lsp.typemod.const.constant"] = { link = "Constant" }, - ["@lsp.typemod.constParameter.constant"] = { link = "Constant" }, } end diff --git a/lua/astrobox/init.lua b/lua/astrobox/init.lua index 4830dd6..1988c95 100644 --- a/lua/astrobox/init.lua +++ b/lua/astrobox/init.lua @@ -18,7 +18,9 @@ local M = { function M.setup(user_cfg) M.cfg = config.make_config(user_cfg) -- If the colors are set, assume we're reloading and auto apply - if vim.g.colors_name == "astrobox" then vim.cmd.colorscheme("astrobox") end + if vim.g.colors_name == "astrobox" then + vim.cmd.colorscheme("astrobox") + end end function M.set_highlights(list) diff --git a/lua/astrobox/palette/colors.lua b/lua/astrobox/palette/colors.lua index bffb6a6..e8c70c3 100644 --- a/lua/astrobox/palette/colors.lua +++ b/lua/astrobox/palette/colors.lua @@ -132,7 +132,6 @@ return { }, }, - -- untested -- 0.6 with exceptions light = { --- @type Colors diff --git a/lua/astrobox/palette/init.lua b/lua/astrobox/palette/init.lua index 0699371..b6ee5d6 100644 --- a/lua/astrobox/palette/init.lua +++ b/lua/astrobox/palette/init.lua @@ -12,8 +12,6 @@ local colors = require("astrobox.palette.colors") --- TODO Split into palette and theme (float, bars)? - --- @return Palette return function(config) local vimbg = vim.o.background diff --git a/lua/astrobox/utils.lua b/lua/astrobox/utils.lua index 8e8cbb3..a28e430 100644 --- a/lua/astrobox/utils.lua +++ b/lua/astrobox/utils.lua @@ -20,7 +20,9 @@ function M.visit_astrobox_modules(module, visitor) end while true do local entry, type = vim.loop.fs_scandir_next(hdl) - if entry == nil then break end + if entry == nil then + break + end if type == "file" and vim.endswith(entry, ".lua") then local mod_name = entry:sub(0, -5) -- cut extension local ok, mod = pcall(require, "astrobox." .. module .. "." .. mod_name) diff --git a/stylua.toml b/stylua.toml index 66068bb..18c892f 100644 --- a/stylua.toml +++ b/stylua.toml @@ -2,7 +2,7 @@ column_width = 120 line_endings = "Unix" indent_type = "Spaces" call_parentheses = "Always" -collapse_simple_statement = "Always" +collapse_simple_statement = "Never" [sort_requires] enabled = true