navarasu / onedark.nvim

One dark and light colorscheme for neovim >= 0.5.0 written in lua based on Atom's One Dark and Light theme. Additionally, it comes with 5 color variant styles
MIT License
1.52k stars 151 forks source link

undercurl support for this theme ? #183

Open ipatch opened 1 year ago

ipatch commented 1 year ago

first off, hello and thank you for this theme. 🙏 recently i've noticed several newer terminals such as kitty and alacritty (my daily driver) have added support for undercurls (under curls), and so has tmux. i've verified with alacritty,

echo -e "\e[4:3mTEST"

added the below to my tmux.conf

# tmux / styling / undercurl, under curl
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm'  # undercurl support
set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m'  # underscore colours - needs tmux-3.0

and reran the above echo command within tmux and got undercurls displaying.

image

however, i'm currently not seeing any undercurls for misspellings in a document using neovim when i toggle spell checking. i'm still just seeing a straight red line.

image

would this be a feature this colorscheme could enable eventually or are we the user of this colorscheme expected to enable this setting ourselves? thanks again for this colorscheme. 🙏

ipatch commented 1 year ago

forgive me for not rereading the readme 🤦‍♂️ i do see, there is support for undercurls and sure enough i see them below on lsp diagnositic messages. But I do not seem them when i toggle spell checking, i assume that is something i need to setup on my end?

image

ipatch commented 1 year ago

okay so opening of a markdown document ie. a README.md, toggling spell checking and running :Inspect on a misspelling gives me the below output,

Treesitter
  - @spell.markdown links to @spell markdown

Press ENTER or type command to continue

image

i think there should be a treesitter update for @spell possibly for the below file?

https://github.com/navarasu/onedark.nvim/blob/09b71d84bd2524438e48c0aa5b54d855cc72af32/lua/onedark/highlights.lua#L172

ipatch commented 1 year ago

this got me the results i was looking for,

-- NOTE: ipatch below line required or bg color is not updated in terminal
cmd [[silent! colorscheme onedark]]

-- ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ NOTE: ipatch, this needs to be below the `colorscheme onedark` cmd above
vim.cmd [[hi SpellBad gui=undercurl]]

image