Update lua/lazyvim/plugins/extras/lang/java.lua

Co-authored-by: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com>
This commit is contained in:
Ibrahim Delice 2024-05-19 23:30:25 +03:00 committed by GitHub
parent 2a619bac38
commit 5c298e7afc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -193,8 +193,9 @@ return {
local client = vim.lsp.get_client_by_id(args.data.client_id) local client = vim.lsp.get_client_by_id(args.data.client_id)
if client and client.name == "jdtls" then if client and client.name == "jdtls" then
-- INFO: without this the inlay hints start toggled off by default. -- INFO: without this the inlay hints start toggled off by default.
-- Maybe because `nvim-jdtls` attaches on a `FileType` event?? -- Probably because `nvim-lspconfig` is not used to set up `nvim-jdtls`
-- Still with this the inlay hints are toggled on by default -- and `LazyVim.toggle.inlay_hints` doesn't execute, so we have
-- to execute it again ourselves in this autocmd in `LspAttach`
LazyVim.toggle.inlay_hints(args.buf, true) LazyVim.toggle.inlay_hints(args.buf, true)
local wk = require("which-key") local wk = require("which-key")
wk.register({ wk.register({