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

CodeLens doesn't always refresh #69

Closed
no1melman opened this issue Jul 4, 2023 · 3 comments
Closed

CodeLens doesn't always refresh #69

no1melman opened this issue Jul 4, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@no1melman
Copy link

Describe the bug
Essentially, after opening a couple of buffers, CodeLens stops loading properly

To Reproduce
Steps to reproduce the behaviour:

I have NvChad, so a tree explorer, and nvim lsp with Ionide loaded

  1. Open up several buffers
  2. See the codelens start to fail

Expected behaviour
CodeLens should always show...

Screenshots
image

Environment (please complete the following information):

  • OS: Windows
  • Neovim version: 0.9.1
  • dotnet SDK version: 7.0.304

Additional context
I have created a command to automagically call this for me

vim.api.nvim_create_user_command("FSharpRefreshCodeLens", function()
  vim.lsp.codelens.refresh()
  print "working..."
end, {
  bang = true,
})

In my init.lua script, if anyone was curious on how to get around this...

@no1melman no1melman added the bug Something isn't working label Jul 4, 2023
@no1melman
Copy link
Author

In actual fact, I've just done better when requiring ionide and auto setting it up.

require("ionide").setup {
  on_attach = function(client, bufnr)
    on_attach(client, bufnr)
    vim.lsp.codelens.refresh()
  end,
  capabilities = capabilities,
}

This seems to force the refresh

@cannorin
Copy link
Member

cannorin commented Jul 4, 2023

@no1melman Hi! Can you check (with the workaround removed) if the fix-69 branch fixes the problem? It injects vim.lsp.codelens.refresh() to on_attach.

@no1melman
Copy link
Author

OOOOoooo I will have a check in a bit

cannorin added a commit that referenced this issue Jul 17, 2023
Fix #69: force refresh CodeLens on attach
JulesNP pushed a commit to JulesNP/Ionide-vim that referenced this issue Nov 5, 2023
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

No branches or pull requests

2 participants