epwalsh / epwalsh/obsidian.nvim

Link obsidian highlight groups to vim's default ones

Open
#764 0 comments 0 reactions 0 assignees View on GitHub
feature request
Dominant language
Lua
Stars
6.2k
Forks
250
PR merge metrics
No merged PRs in 30d

Description

### 🚀 The feature, motivation and pitch

Hard-coding the highlights does clash with most colorschmemes, overriding them is inconvenient for the user.

A solution is to link to [nvims built-in highlights](https://neovim.io/doc/user/syntax.html#_2.-syntax-files):

```vim
hi! link ObsidianTodo DiagnosticError
hi! link ObsidianDone DiagnosticOk
hi! link ObsidianRightArrow SpecialChar
hi! link ObsidianTilde DiagnosticFloatingHint
hi! link ObsidianImportant DiagnosticError
hi! link ObsidianBullet SpecialChar
hi! link ObsidianRefText Tag
hi! link ObsidianExtLinkIcon Tag
hi! link ObsidianTag Tag
hi! link ObsidianBlockID Tag
hi! link ObsidianHighlightText Search
```

### Additional context

This should also solve #755.

Contributor guide

Open the contributing guide

Research direction

No file or test is named in the issue. Start by locating where the Obsidian highlight groups are defined, then compare that setup with the listed Neovim built-in groups. Done means the named groups use the requested links instead of hard-coded colors and the change also addresses #755.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
tooling
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.