obsidian.nvim icon indicating copy to clipboard operation
obsidian.nvim copied to clipboard

Code blocks containing `==` are rendered as linktext

Open kusnezoff-alexander opened this issue 1 year ago • 0 comments

🐛 Describe the bug

Example:

`a==1` some-text `b==2`

Renders as `a1some-textb2` (hiding the == on both sides) Executing :Inspect upon the text yields:

Treesitter                                                                 
  - @spell.markdown links to @spell markdown
Extmarks                                                                           
  - markdownLinkText ObsidianUI # <- that shouldn't be, right?

Config

	{
		"epwalsh/obsidian.nvim",
		version = "*",  -- recommended, use latest release instead of latest commit
		lazy = true,
		ft = "markdown",
		-- Replace the above line with this if you only want to load obsidian.nvim for markdown files in your vault:
		-- event = {
			--   -- If you want to use the home shortcut '~' here you need to call 'vim.fn.expand'.
			--   -- E.g. "BufReadPre " .. vim.fn.expand "~" .. "/my-vault/*.md"
			--   -- refer to `:h file-pattern` for more examples
			--   "BufReadPre path/to/my-vault/*.md",
			--   "BufNewFile path/to/my-vault/*.md",
			-- },
			dependencies = {
				-- Required.
				"nvim-lua/plenary.nvim", -- lua-lib in neovim (includes lua-utility functions)

				-- see below for full list of optional dependencies 👇
			},
			opts = {
				workspaces = {
					{
						name = "personal",
						path = "<my-workspace>",
					},
					{
						name = "work",
						path = "<my-workspac2>",
					},
				},
				templates = {
					folder = "templates",
					date_format = "%Y-%m-%d-%a",
					time_format = "%H:%M",
				},
				daily_notes = {
					-- Optional, if you keep daily notes in a separate directory.
					folder = "daily_notes",
					-- Optional, if you want to change the date format for the ID of daily notes.
					date_format = "%Y-%m-%d",
					-- Optional, if you want to change the date format of the default alias of daily notes.
					alias_format = "%B %-d, %Y",
					-- Optional, if you want to automatically insert a template from your template directory like 'daily.md'
					template = nil
				},

				ui = {
					enable = true,  -- set to false to disable all additional syntax features
					update_debounce = 200,  -- update delay after a text change (in milliseconds)
					max_file_length = 5000,  -- disable UI features for files with more than this many lines
					-- Define how various check-boxes are displayed
					checkboxes = {
						-- NOTE: the 'char' value has to be a single character, and the highlight groups are defined below.
						[" "] = { char = "󰄱", hl_group = "@text.todo" },
						["x"] = { char = "", hl_group = "@text.todo" },
						[">"] = { char = "", hl_group = "@text.todo" },
						["~"] = { char = "󰰱", hl_group = "@text.todo" },
						["!"] = { char = "", hl_group = "@text.todo" },
						-- Replace the above with this if you don't have a patched font:
						-- [" "] = { char = "☐", hl_group = "ObsidianTodo" },
						-- ["x"] = { char = "✔", hl_group = "ObsidianDone" },

						-- You can also add more custom ones...
					},
					-- Use bullet marks for non-checkbox lists.
					-- Use bullet marks for non-checkbox lists.
					bullets = { char = "•", hl_group = nil },
					external_link_icon = { char = "", hl_group = "markdownLinkText" },
					-- Replace the above with this if you don't have a patched font:
					-- external_link_icon = { char = "", hl_group = "ObsidianExtLinkIcon" },
					reference_text = { hl_group = "markdownLinkText" },
					highlight_text = { hl_group = "markdownLinkText" },
					tags = { hl_group = "ObsidianTag" },
					block_ids = { hl_group = "ObsidianBlockID" },
				},
				-- see below for full list of options 👇
				attachments = {
					-- The default folder to place images in via `:ObsidianPasteImg`.
					-- If this is a relative path it will be interpreted as relative to the vault root.
					-- You can always override this per image by passing a full path to the command instead of just a filename.
					img_folder = "media",  -- This is the default
				}
			},
		},

Environment

NVIM v0.10.2
Build type: RelWithDebInfo
LuaJIT 2.1.1720049189
Run "nvim -V1 -v" for more info
Obsidian.nvim v3.9.0 (ae1f76a75c7ce36866e1d9342a8f6f5b9c2caf9b)
Status:
  • buffer directory: nil
  • working directory: <my-dir>
Workspaces:
  ✓ active workspace: Workspace(name='personal', path='<my-path>', root='<my-root-vault>')
  ✗ inactive workspace: Workspace(name='work', path='<my-path>', root='<my-root-vault>')
Dependencies:
  ✓ plenary.nvim: 2d9b06177a975543726ce5c73fca176cedbffe9d
  ✓ nvim-cmp: ca4d3330d386e76967e53b85953c170658255ecb
  ✓ telescope.nvim: 2eca9ba22002184ac05eddbe47a7fe2d5a384dfc
Integrations:
  ✓ picker: TelescopePicker()
  ✓ completion: enabled (nvim-cmp) ✗ refs, ✗ tags, ✗ new
    all sources:
      • nvim_lsp
      • vsnip
      • buffer
      • cmp_zotcite
Tools:
  ✓ rg: ripgrep 13.0.0
Environment:
  • operating system: Linux
Config:

kusnezoff-alexander avatar Dec 13 '24 11:12 kusnezoff-alexander