Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom symbols for checkboxes break when used as narrow symbols in kitty #810

Open
Anaritus opened this issue Jan 10, 2025 · 0 comments
Open
Labels
bug Something isn't working

Comments

@Anaritus
Copy link

🐛 Describe the bug

When using custom symbols for checkboxes, specified to be rendered narrow in kitty terminal, they look fine. But if you reload kitty config (that is not the only way of triggering bug, but the most consistent one), symbols are displayed at full size, but cut off at 1 cell width

This is it originally
image

The only thing changed is kitty config reloaded
image

This is so weird, the issue then persists for every narrow symbol in any kitty window (even new ones), and is fixable in only two ways:

  • force quit & relaunch kitty
  • reloading config without looking at nvim buffer with loaded obsidian.nvim

Disabling ui does not help, preventable only by completely disabling obsidian.nvim
Does not reproduce with render-markdown.nvim (and obsidian.nvim completely disabled), or in clean install of nvim with custom syntax items. A really weird bug, specific only to obsidian.nvim

Config

Screenshots above come from this minimal config file:

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",
		"--single-branch",
		"https://github.com/folke/lazy.nvim.git",
		lazypath,
	})
end
vim.opt.runtimepath:prepend(lazypath)
vim.opt.conceallevel = 2

-- install plugins
local plugins = {
	{
		"epwalsh/obsidian.nvim",
		version = "*", -- recommended, use latest release instead of latest commit
		lazy = false,
		dependencies = {
			"nvim-lua/plenary.nvim",
			-- optionals:
			"hrsh7th/nvim-cmp",
			"nvim-telescope/telescope.nvim",
			"nvim-treesitter/nvim-treesitter",
		},
		opts = {
			workspaces = {
				{
					name = "personal",
					path = "~/Notes",
					overrides = {
						notes_subdir = "inbox",
					},
				},
			},
			ui = {
				checkboxes = {
					[" "] = { char = "", order = 1, hl_group = "ObsidianTodo" },
					["x"] = { char = "", order = 2, hl_group = "ObsidianDone" },
					[">"] = { char = "", order = 3, hl_group = "ObsidianRightArrow" },
					["~"] = { char = "", order = 4, hl_group = "ObsidianTilde" },
					["!"] = { char = "!", order = 5, hl_group = "ObsidianImportant" },
				},
			},
		},
	},
}
require("lazy").setup(plugins, {
	root = root .. "/plugins",
})

Steps to reproduce:

  1. In kitty, specify any nerd font symbols as narrow symbols
  2. use those symbols for checkbox items (I believe one is enough, also should work with list items)
  3. write any note with modified item
  4. reload config
  5. ??
  6. profit

Environment

NVIM

NVIM v0.10.2
Build type: Release
LuaJIT 2.1.1727870382
Run "nvim -V1 -v" for more info

obsidian.nvim

Obsidian.nvim v3.9.0 (ae1f76a75c7ce36866e1d9342a8f6f5b9c2caf9b)
Status:
  • buffer directory: nil
  • working directory: /Users/som38/Notes/diary
Workspaces:
  ✓ active workspace: Workspace(name='personal', path='/Users/som38/Notes', root='/Users/som38/Notes')
  ✗ inactive workspace: Workspace(name='pets', path='/Users/som38/Notes', root='/Users/som38/Notes')
  ✗ inactive workspace: Workspace(name='straight', path='/Users/som38/Notes', root='/Users/som38/Notes')
Dependencies:
  ✓ plenary.nvim: 2d9b06177a975543726ce5c73fca176cedbffe9d
  ✓ nvim-cmp: 3403e2e9391ed0a28c3afddd8612701b647c8e26
  ✓ telescope.nvim: a0bbec21143c7bc5f8bb02e0005fa0b982edc026
Integrations:
  ✓ picker: TelescopePicker()
  ✓ completion: enabled (nvim-cmp) ✗ refs, ✗ tags, ✗ new
    all sources:
      • nvim_lua
      • nvim_lsp
      • luasnip
      • buffer
      • path
      • vim-dadbod-completion
      • crates
      • render-markdown
Tools:
  ✓ rg: ripgrep 14.1.0
Environment:
  • operating system: Darwin
Config:
  • notes_subdir: inbox%
@Anaritus Anaritus added the bug Something isn't working label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant