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

fix: define NormalFloat #120

Merged
merged 1 commit into from
May 27, 2024
Merged

fix: define NormalFloat #120

merged 1 commit into from
May 27, 2024

Conversation

roosta
Copy link
Member

@roosta roosta commented May 24, 2024

Neovim version 0.10 unlinked NormalFloat with pmenu, which caused the popup background color to default to undefined (black/magenta etc depending on what the default colorscheme is)

Should fix the issue reported by @milogert on discord, and return the previous colors

Ref: #119, #111, #116

Neovim version `0.10` unlinked `NormalFloat` with `pmenu`, which caused
the popup background color to default to undefined (black/magenta etc
depending on what the default colorscheme is)

Should fix the issue reported by @milogert on discord, and return the
previous colors

Ref: #119
@roosta roosta requested review from milogert and MindTooth May 24, 2024 13:53
@MindTooth
Copy link
Member

With my test function, I now have:

Screenshot 2024-05-24 at 16 16 11

It's now very bright. Was that the case before?


Function:

function! BreakHabitsWindow() abort
    " Define the size of the floating window
    let width = 50
    let height = 10

    " Create the scratch buffer displayed in the floating window
    let buf = nvim_create_buf(v:false, v:true)

    " Get the current UI
    let ui = nvim_list_uis()[0]

    " Create the floating window
    let opts = {'relative': 'editor',
                \ 'width': width,
                \ 'height': height,
                \ 'col': (ui.width/2) - (width/2),
                \ 'row': (ui.height/2) - (height/2),
                \ 'anchor': 'NW',
                \ 'style': 'minimal',
                \ }
    let win = nvim_open_win(buf, 1, opts)

    " create the lines to draw a box
    let horizontal_border = '+' . repeat('-', width - 2) . '+'
    let empty_line = '|' . repeat(' ', width - 2) . '|'
    let lines = flatten([horizontal_border, map(range(height-2), 'empty_line'), horizontal_border])

    " set the box in the buffer
    call nvim_buf_set_lines(buf, 0, -1, v:false, lines)
endfunction

@roosta
Copy link
Member Author

roosta commented May 24, 2024

yeah, that's what it was before 0.10. I tried to change the contrast in #111, but there was unforeseen issues so I reverted back.

Problem is I don't use any popups, most of my plugins and whatnot are compatible with vanilla vim, so I don't catch issues sometimes.

@roosta
Copy link
Member Author

roosta commented May 24, 2024

image
I reverted neovim back to 0.9.5, and opened a :LspInfo popup, and took a screenshot. It's xgray2

Copy link
Member

@MindTooth MindTooth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's go with it for now to solve it temporarily. You okay with that?

Copy link
Member

@milogert milogert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great locally!

@milogert
Copy link
Member

Any thoughts about adding something like

call s:HL('CurSearch', s:none, s:bright_yellow)

to the PR? It fixes a highlight that is currently some sort of bright yellow color that's defaulted to NvimLightYellow (screenshot below)

image

@roosta
Copy link
Member Author

roosta commented May 27, 2024

Gonna rebase this, the issue you mention @milogert need some further inspection, not quite sure why its yellow in the first place.

@roosta roosta merged commit 0f358d9 into master May 27, 2024
1 check passed
roosta added a commit that referenced this pull request May 30, 2024
Define CurSearch along the other search highlights, set it to use
xgray/inverse, and be underline and bold. Tweak existing search groups
to work with new CurSearch,

Seems some defaults changed or this hl group got added in nvim 0.10,
`CurSearch` is the `hlsearch` word under the cursor. It was set to
default colorscheme yellow, which messed with text selection, and don't
work with how search is colorized in srcery.

Ref: #120
roosta added a commit that referenced this pull request May 30, 2024
Define CurSearch along the other search highlights, set it to use
xgray/inverse, and be underline and bold. Tweak existing search groups
to work with new CurSearch,

Seems some defaults changed or this hl group got added in nvim 0.10,
`CurSearch` is the `hlsearch` word under the cursor. It was set to
default colorscheme yellow, which messed with text selection, and don't
work with how search is colorized in srcery.

Ref: #120
roosta added a commit that referenced this pull request May 30, 2024
Define CurSearch along the other search highlights, set it to use
xgray/inverse, and be underline and bold. Tweak existing search groups
to work with new CurSearch,

Seems some defaults changed or this hl group got added in nvim 0.10,
`CurSearch` is the `hlsearch` word under the cursor. It was set to
default colorscheme yellow, which messed with text selection, and don't
work with how search is colorized in srcery.

Ref: #120
roosta added a commit that referenced this pull request May 31, 2024
Define CurSearch along the other search highlights, set it to use
xgray/inverse, and be underline and bold. Tweak existing search groups
to work with new CurSearch,

Seems some defaults changed or this hl group got added in nvim 0.10,
`CurSearch` is the `hlsearch` word under the cursor. It was set to
default colorscheme yellow, which messed with text selection, and don't
work with how search is colorized in srcery.

Ref: #120
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.

None yet

3 participants