Coder Social home page Coder Social logo

miikanissi / modus-themes.nvim Goto Github PK

View Code? Open in Web Editor NEW
153.0 1.0 13.0 1004 KB

Highly accessible themes for Neovim, conforming with the highest standard for color contrast between background and foreground values (WCAG AAA). A Neovim port of the original Modus Themes built for GNU Emacs.

License: GNU General Public License v3.0

Lua 97.30% Shell 1.52% JavaScript 1.17%
neovim neovim-colorscheme neovim-theme nvim theme vim vim-colorscheme vim-theme accessibility wcag

modus-themes.nvim's People

Contributors

github-actions[bot] avatar jdbrewer avatar jgelens avatar kylechui avatar miikanissi avatar tjkuson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

modus-themes.nvim's Issues

Very overpowering inlay hints

Description

Hi,
firstly great theme! I just added this to AstroNvim for everybody to try!
I'm encountering a small problem regarding inlay hints:

image

IMHO the inlay hints are too overpowering (compare the big bold teal boxes), and they should be more subtle as they're only an additional/optional source of information. Currently, it looks like they're the main source of information that I absolutely have to look at.

Neovim version

NVIM v0.10.0
Build type: Release
LuaJIT 2.1.1713773202

Terminal and multiplexer

kitty 0.34.1

Modus themes version

v1.2.1

Steps to reproduce

Just set the modus_vivendi them on any rust code for example :)

Repro

No response

Text in Markdown headings invisible with headlines.nvim plugin

Description

When using lukas-reineke/headlines.nvim", Markdown headings are not highlighted properly with modus light theme. The pic below shows how heading 1, 2 and 3 are rendered. It seems some other themes have this kind of issue too, as my test result, the catppuccin theme works well with headlines.nvim.

screenshot_20240101-160448UTC

Neovim version

NVIM v0.9.4
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3

Terminal and multiplexer

kitty 0.29.2

Modus themes version

modus-themes.nvim v1.1.1

Steps to reproduce

  1. Set style to modus_operandi
  2. Activate modus theme

Repro

Settings for modus-themes.nvim:

  {
    "miikanissi/modus-themes.nvim",
    priority = 1000,
    opts = {
      style = "modus_operandi",
      variant = "deuteranopia", -- tinted, deuteranopia, tritanopia
      -- dim_inactive = true,
    },
  },

Settings for headlines.nvim:

  {
    "lukas-reineke/headlines.nvim",
    enabled = false,
    opts = function()
      local opts = {}
      for _, ft in ipairs({ "markdown", "norg", "rmd", "org" }) do
        opts[ft] = {
          headline_highlights = {},
        }
        for i = 1, 6 do
          local hl = "Headline" .. i
          vim.api.nvim_set_hl(0, hl, { link = "Headline", default = true })
          table.insert(opts[ft].headline_highlights, hl)
        end
      end
      return opts
    end,
    ft = { "markdown", "norg", "rmd", "org" },
    config = function(_, opts)
      vim.schedule(function()
        require("headlines").setup(opts)
        require("headlines").refresh()
      end)
    end,
  },

Low contrast on uncommitted changed files in neotree

Description

I've found the color (orange) of uncommitted changed files in neotree has low contrast against the background. It may be the nature of modus theme, but would you mind doing a bit of modification to make it more visible?

screenshot_20240415-141552UTC

Neovim version

NVIM v0.9.5
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3

Terminal and multiplexer

kitty 0.33.1

Modus themes version

v1.1.1

Steps to reproduce

Launch nvim in terminal with colorscheme set to modus tinted

Repro

My nvim configuration with lazy.nvim:


{
   "miikanissi/modus-themes.nvim",
  priority = 1000,
  opts = {
    style = "modus_operandi",
    variant = "tinted",
  },
}

Telescope prompt has a red and grey border

Description

I just updated the plugin and now the Telescope search prompt has a strange-border around it. It doesn't look intentional, and I think it looks worse than it was before.

Before the update:

Screenshot 2024-05-21 at 21 56 04

After the update:

Screenshot 2024-05-21 at 21 56 11

There were also changes to class, from and import keywords that weren't documented, but they might be intentional.

PS: Thank you for your maintenance of the project and the new update! I especially like the italic docstrings.

Neovim version

NVIM v0.10.0
Build type: Release
LuaJIT 2.1.1713773202

Terminal and multiplexer

iTerm2 3.5.0

Modus themes version

modus-themes.nvim 1.2.0

Steps to reproduce

  1. nvim -u repro.lua
  2. :Telescope
  3. Observe the Telescope prompt
Screenshot 2024-05-21 at 22 04 38

Repro

local root = vim.fn.fnamemodify("./.repro", ":p")

for _, name in ipairs({ "config", "data", "state", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath })
end
vim.opt.runtimepath:prepend(lazypath)

local plugins = {
  "miikanissi/modus-themes.nvim",
  { "nvim-telescope/telescope.nvim", dependencies = { "nvim-lua/plenary.nvim" } },
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("modus")

Marks in gutter have a different background

Description

When I create marks they have a distinctive background around them.
Screenshot 2024-01-15 at 10 00 42
Not sure if it is a bug, it may be related to some settings in LazyVim which I am using. I've noticed that in theme screenshot in the reprositary marks and git status are in the same line. On the other side, I've not seen such behavior in any other theme I've used.

UPDATE: Ok, I cannot see such behavior in WezTerm, it seems to be iTerm-related.
Screenshot 2024-01-15 at 10 28 21
But WezTerm does not show line numbers and git gutter having a separate background at all, other than if selected. I am confused. Can the separate background for line numbers and marks be switched off, completely?

Neovim version

NVIM v0.9.5
Build type: Release
LuaJIT 2.1.1703358377

Terminal and multiplexer

iTerm2 3.5.0beta18

Modus themes version

modus-themes.nvim v1.1.1

Steps to reproduce

Open any file and set a mark

Repro

No response

Add option to enable transparency

Description

Hello, would you be open to add an option (just like dim_inactive) to allow users to enable transparency (as supported by the terminal)?

Thanks!

Additional context

For example, here's how gruvbox, kanagawa and bamboo do it. Personally I prefer the approach taken by bamboo since it works very well alongside dim_inactive and other plugins (including nvim-tree).

Wezterm Modus Operandi has bright colors

Description

Hi, thanks for this great nvim theme. I tried your wezterm colors as well but they look too bright, modus is quite decent (like your nvim colors). Comparing it to ishan9299 your wezterm colors look quite a bit brighter and I find both modus themes are quite far from the nvim colors.
In the screenshot you can see left the ishan-theme right yours and on the bottom is github-light.
image

Neovim version

NVIM v0.9.5
Build type: Release
LuaJIT 2.1.1702233742

Terminal and multiplexer

wezterm 20240203-110809-5046fc22

Modus themes version

master

Steps to reproduce

Install wezterm and add the color scheme:

color_scheme_dirs = join(home, ".config", "wezterm", "colors")
color_scheme = 'Modus Operandi',

Repro

not nvim related

Implement the tinted version of both themes

Description

There's modus-operandi-tinted and modus-vivendi-tinted, which provide the advantage of slightly less contrast (too much contrast can tire the eyes) while remaining highly legible. I'd love to see these implemented.

Additional context

No response

kitty bold black contrast

Description

Hi, thanks for the awesome project. I've replaced some of my own ports with your generated ones.

Unfortunately, I find the default bold black, color8 #1e1e1e to lack sufficient contrast in some cases. Here are a couple examples which don't look awful at large size, but when regular screen size are quite hard to see.

senpai

image

btop

multiple items, including text for changing options

image

I could patch this color myself, but I'm wondering if maybe you'd be interested in picking a lighter grey?

Neovim version

not neovim related :)

Terminal and multiplexer

kitty 0.31.0

Modus themes version

v1.1.1

Steps to reproduce

load modus-vivendi in kitty, open btop or senpai.

Repro

No response

Adjust highlight groups for better readability?

Right now treesitter highlights everything with color in c++. For example, "ifndef" is completely highlighted in red (because both "PreProc" and "Macro" link to the same color), whereas in the screenshot below with the modus theme there is white text (also for number literals).

https://emacs.amodernist.com/static/images/modus-vivendi.svg

Sometimes it is tough to distinguish between color coded elements because there are a lot of clashes (eg: class is purple, function is purple, and operators are purple) between highlight groups.

Is there a way to adjust this? If you would like me to fix this I wouldn't mind attempting, but I'm not very familiar with treesitter so it might take a while.

NotifyBackground not working properly?

Description

It's more than likely this is a problem with my setup, but I wanted to ask anyway. Notice the below screenshot:

image

I can see that the NotifyBackground is correctly set in the theme highlights here so it's kind of weird that nvim is complaining about this. I'd appreciate any advice on how to debug this further.

Thanks!

Neovim version

NVIM v0.9.4
Build type: Release
LuaJIT 2.1.1702233742

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info

Terminal and multiplexer

wezterm (20230712-072601-f4abf8fd) + tmux

Modus themes version

"modus-themes.nvim": { "branch": "master", "commit": "f54eb8ceeea916db06acb8bbbc78e0d07d8abd27" },

Steps to reproduce

I have updated the repro.lua below, once you do nvim -u repro.lua and execute any non-existent command (like :Vp or whatever) it should complain about the NotifyBackground highlight not present.

Repro

The repro.lua is as follows:

-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
	vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
	vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
	{
		"miikanissi/modus-themes.nvim",
		lazy = false,
		enabled = true,
		cond = true,
		priority = 1000,
		config = function()
			require("modus-themes").setup({
				style = "auto",
				variant = "default",
				dim_inactive = true,
				transparent = true,
				styles = {
					comments = { italic = false },
					keywords = { italic = false },
					functions = { italic = false },
					variables = { italic = false },
					string = { italic = false },
				},
				on_colors = function(_) end,
				on_highlights = function(_, _) end,
			})
			vim.cmd("colorscheme modus_vivendi")
		end,
	},

	-- add any other plugins here
	{
		"folke/noice.nvim",
		event = "VeryLazy",
		dependencies = {
			"MunifTanjim/nui.nvim",
			"rcarriga/nvim-notify",
		},
		opts = {
			lsp = {
				progress = {
					enabled = false,
				},
				override = {
					["vim.lsp.util.convert_input_to_markdown_lines"] = true,
					["vim.lsp.util.stylize_markdown"] = true,
					["cmp.entry.get_documentation"] = true,
				},
			},
			routes = {
				{
					filter = {
						event = "msg_show",
						any = {
							{ find = "%d+L, %d+B" },
							{ find = "; after #%d+" },
							{ find = "; before #%d+" },
						},
					},
					view = "mini",
				},
			},
			presets = {
				bottom_search = true,
				command_palette = true,
				long_message_to_split = true,
				inc_rename = true,
			},
		},
	},
	--
}
require("lazy").setup(plugins, {
	root = root .. "/plugins",
})

vim.cmd.colorscheme("modus")
-- add anything else here

Add option to disable dimming inactive buffers

I think nvim ports of Modus themes started dimming NormalNC highlight because early versions of Modus themes supported Solaire-mode, the emacs package for dimming non-text buffers, however:

  • Solaire mode does not dim inactive buffers at all, it dims non-text buffers like terminals and file explorer drawers
  • Modus themes removed support for Solaire mode (reasons here)

So it would be nice to have an option to disable dimming inactive buffers to more closely mimic Modus Themes' behavior (I'd argue that not dimming should be the default)

Workaround I could use instead would be

 on_highlights = function(hl, c)
                hl.NormalNC = { bg = "#FFFFFF" }
            end,

How to set highlight color

Description

Hi,
sorry for the noob question but I would like to use this function from nvim-kickstart with modus-operandi. But the highlight color is dark blue. How would I set the color for `document_highlight`?


          if client and client.server_capabilities.documentHighlightProvider then
            vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, {
              buffer = event.buf,
              callback = vim.lsp.buf.document_highlight,
            })

            vim.api.nvim_create_autocmd({ 'CursorMoved', 'CursorMovedI' }, {
              buffer = event.buf,
              callback = vim.lsp.buf.clear_references,
            })
          end

Thank you for this colorscheme. Greatly appreciated.



### Additional context

_No response_

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.