Comments (13)
This didn't happen until the recent changes.
This may be important information. Rather than reload the buffer by :edit
, do inlay hints appear when you modify the document?
Edit: I found I can reproduce it by clangd
, and they do appear after editing, thanks.
from neovim.
Ah it looks like we opened issues separately regarding similar things with vim.lsp.inlay_hint
(#28625). I actually didn't even see if the inlay hints actually get displayed in my issue and just referred to the incorrect state behavior of the enabling. Let me know if we should consolidate my issue into this to centralize bugs with the new API.
from neovim.
Seems to be separate problems, For now, I can reproduce from the case @mehalter provided and I know the reason, but I can't reproduce from what @justinmk provided. I will look into this issue
from neovim.
#28627 should fix the case @mehalter provided, I'm not sure if it fixes the problem @justinmk is having.
from neovim.
I will move over the case I found here:
vim.lsp.inlay_hint.is_enabled() -- false (ok ✅)
vim.lsp.inlay_hint.enable(true) -- enable globally
vim.lsp.inlay_hint.is_enabled() -- true (ok ✅)
vim.lsp.inlay_hint.is_enabled({ bufnr = 0 }) -- true (ok ✅)
vim.lsp.inlay_hint.enable(false, { bufnr = 0 })
vim.lsp.inlay_hint.is_enabled({ bufnr = 0 }) -- true (wrong ❌)
from neovim.
Thanks for investigating @ofseed let me know if you want me to reopen my issue to separate them. I figured they may be resulting from the same root cause. Granted I also can't replicate the other issue with just calling enable without a buffer number
from neovim.
@justinmk I still can't find how to reproduce, can you please provide a more detailed use case?
from neovim.
can you please provide a more detailed use case?
tested with 5282361 :
- open a file which has a LSP server that provides inline hints.
- run
lua vim.lsp.inlay_hint.enable()
- inlay hints not displayed.
- reload the buffer with
:edit
, now the inlay hints are displayed.
If step (2) is changed to lua vim.lsp.inlay_hint.enable(true, {bufnr=0})
, then there is no issue (step 3 shows inlay hints).
from neovim.
Hm, I can't replicate this at all either, tested with 5282361 as well
As soon as I run lua vim.lsp.inlay_hint.enable()
it shows the inlay hints (assuming the language server is fully loaded). What language server are you testing it with @justinmk ?
from neovim.
clangd
, opening main.c
from Nvim source tree. This didn't happen until the recent changes.
from neovim.
Rather than reload the buffer by
:edit
, do inlay hints appear when you modify the document?
yes
from neovim.
Also, it might take time before the inlay hints are shown. I've this experience with a rust project that has a few "heavy" dependencies and rust_analyzer is "chewing" on the code for some minutes. And until then nothing is shown. Inlay hints are the last thing that seems to be performed. I've observed the same behavior in vscode.
Can you check with top to see that clangd is indeed "done".
from neovim.
This is a bug that needs to meet certain conditions to occur, and it does exist. #28629 will fix it.
from neovim.
Related Issues (20)
- Flatpak build fails to launch HOT 2
- Does the builtin comment feature miss the `gco` etc function? HOT 10
- Crash with signcolumn=number and numberwidth=1 HOT 1
- LSP Error: _changetracking.lua:305: attempt to index local 'buf_state' HOT 3
- ":terminal foo" doesn't open terminal on the same active virtualenv HOT 6
- `vim.o.mouse = nil` no longer works as of nvim 0.10.0 HOT 5
- speed up check for pynvim HOT 7
- Surprising behaviour of default 0.10 color scheme groups: `Added`, `Changed`, `Delimiter`, `Operator`, `Removed` and `@variable` HOT 6
- too many curl processes make OS broken HOT 1
- Can't nested use native vim.snippet HOT 2
- `BUILD.md` file mentions non-existent `stable` branch of repository HOT 2
- Display distortion when setting window width to 1 in diff mode with set number
- Different termcodes of `<M-]>` from string vs from input HOT 4
- Crash while opening large log file HOT 1
- Properly integrate cmake.deps into toplevel build system HOT 5
- Perl syntax highlighting of named sub signatures highlights as a possible error HOT 1
- initial file open sometimes replaces character under cursor with 'g' HOT 2
- LSP diagnostics not cleared on client stop for unattached buffers
- SHA256 sums for multiple dependencies in deps.txt are not stable HOT 2
- "Option 'commentstring' is empty" in .cpp files HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neovim.