Skip to content

fix: switches underdotter and underdot arround #11

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

Closed
wants to merge 2 commits into from

Conversation

ulisses-cruz
Copy link

@ulisses-cruz ulisses-cruz commented Aug 6, 2022

This made the 'darkplus' theme stop working for me.
It is a tiny fix.

@ulisses-cruz ulisses-cruz changed the title fix: replaces underdotter to underdot fix: switch underdotter and underdot arround Aug 6, 2022
@ulisses-cruz ulisses-cruz changed the title fix: switch underdotter and underdot arround fix: switches underdotter and underdot arround Aug 6, 2022
@gepbird
Copy link
Contributor

gepbird commented Aug 6, 2022

What's your neovim version?
If you are using a release (latest is v0.7.2), then it should be underdot.
But if you use a non-released, development version (after this PR got merged) then it should be underdotted.
I assume you have an outdated development build, please update if this is the case.

@ulisses-cruz
Copy link
Author

image

@gepbird
Copy link
Contributor

gepbird commented Aug 7, 2022

You have a development build, but it doesn't show the exact version (due to compiler flags), we don't know which is the last commit for your build, but it's behind the commit that changed underdot to underdotted. Also version with a commit looks like this:
nvim-version

Older 0.8.0 builds only speak underdot and new ones underdotted. As far as I know it is not possible to check the commit version using vim.fn.has.

Your best choice is to use another version. Either downgrade to stable 0.7.2, or upgrade to the latest development build.

@gepbird
Copy link
Contributor

gepbird commented Aug 7, 2022

You can use a protected call to try setting the highlight with underdotted, and if that fails fall back to the old underdot, this way we don't need to check version at all:

  local underdotted_ok, _ = pcall(hl, 0, "markdownUrl", { fg = c.cyan, bg = 'NONE', underdotted=true })
  if not underdotted_ok then
    hl(0, "markdownUrl", { fg = c.cyan, bg = 'NONE', underdot=true, })
  end

But I still recommend keeping your neovim updated especially when using a development build.

@ulisses-cruz
Copy link
Author

Thanks @gutyina70. I've reinstalled neovim, and it works fine for me now.
You can close the pull request if you want.

@gepbird
Copy link
Contributor

gepbird commented Aug 8, 2022

I'm glad it's working for you @ulisses-cruz!
I would say this issue is uncommon and should not be fixed by this repo instead the user should update.
Can you please close this PR? I don't have permission to do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants