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

search count messages do not show in Statusline Components #217

Closed
phgz opened this issue Nov 13, 2022 · 9 comments · Fixed by #639
Closed

search count messages do not show in Statusline Components #217

phgz opened this issue Nov 13, 2022 · 9 comments · Fixed by #639
Labels
bug Something isn't working

Comments

@phgz
Copy link

phgz commented Nov 13, 2022

Describe the bug
Since commit e5092c2 (#211), the search count message does not appear in status line. What is weird is that the first result has a search count, but subsequent n/N matchs and searches do not. Status line config can be seen in GIF.

Which version of Neovim are you using?
NVIM v0.9.0-dev-296+g7335a67b5

To Reproduce
Steps to reproduce the behavior:

  1. It was "working" (although disappearing) in fb0e3b0.

Expected Behavior
Search count in status line.

Screenshots
demo

Noice Log
Nothing relevant.

@phgz phgz added the bug Something isn't working label Nov 13, 2022
@folke folke closed this as completed in 80ec5b8 Nov 13, 2022
@folke
Copy link
Owner

folke commented Nov 13, 2022

I assume you had vim.go.hlsearch = false set in your config? That didn't work as intended. Should be fixed now!

@phgz
Copy link
Author

phgz commented Nov 15, 2022

Hi, sorry for the late response.

I tested it on c11d1c6 and unfortunately, it is still the same behaviour as before. Also, as you mentioned, I have vim.go.hlsearch = false. I tried setting it to true, but the problem is still there.

@folke
Copy link
Owner

folke commented Nov 15, 2022

It really should work now. Are you sure you updated?
And it already workes with hlsearch=true.

What is your Noice config?

@phgz
Copy link
Author

phgz commented Nov 15, 2022

Are you sure you updated?

Yes I previously had 7b62ccf stapled in packer (commit = ...) and the feature was working. I removed that option, updated, and double checked the git repo sha in .local/share/nvim/... and it was c11d1c6.

My config is as follow:

require("noice").setup({
  popupmenu = {
    enabled = false, -- enables the Noice popupmenu UI
  },
  notify = {
    enabled = false,
  },
  lsp = {
    progress = {
      enabled = false,
    },
    override = {
      -- override the default lsp markdown formatter with Noice
      ["vim.lsp.util.convert_input_to_markdown_lines"] = true,
      -- override the lsp markdown formatter with Noice
      ["vim.lsp.util.stylize_markdown"] = true,
    },
    documentation = {
      view = "hover",
      opts = {
        lang = "markdown",
        replace = true,
        render = "plain",
        format = { "{message}" },
        win_options = { concealcursor = "n", conceallevel = 3 },
      },
    },
  },
  presets = {
    lsp_doc_border = true
  },
  routes = {
    {
      filter = {
        event = "msg_show",
        ["not"] = {
          kind = { "confirm", "confirm_sub" },
        },
      },
      opts = { skip = true },
    },
  },
})

@folke
Copy link
Owner

folke commented Nov 15, 2022

You will want to remove that lang=markdown. That's no longer needed and will lead to rendering issues most likely.
Also be aware that you're skipping all messages? So command output, errors, ...

Apart from that all works as expected with your config for me.

Please provide a https://github.com/folke/noice.nvim/wiki/Minimal-%60init.lua%60-to-Reproduce-an-Issue

@folke
Copy link
Owner

folke commented Nov 15, 2022

Also, what is your statusline config?

@phgz
Copy link
Author

phgz commented Nov 15, 2022

I was able to get a complete reproductible example with that:

minimal.txt

@folke
Copy link
Owner

folke commented Nov 15, 2022

You're getting the last message in the statusline, not search. Please check the docs

@phgz
Copy link
Author

phgz commented Nov 15, 2022

Oh! Now I get it, thanks! I was searching at the wrong place since the behaviour changed in updating to latest commit. My apologies for the trouble, I did not read the docs correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants