29 lines
756 B
Lua
29 lines
756 B
Lua
require('lsp-inlayhints').setup({
|
|
inlay_hints = {
|
|
parameter_hints = {
|
|
show = false
|
|
},
|
|
type_hints = {
|
|
remove_colon_start = true,
|
|
remove_colon_end = true
|
|
},
|
|
max_len_align = false,
|
|
highlight = "Comment",
|
|
},
|
|
enabled_at_startup = false,
|
|
})
|
|
|
|
vim.api.nvim_create_augroup("LspAttach_inlayhints", {})
|
|
vim.api.nvim_create_autocmd("LspAttach", {
|
|
group = "LspAttach_inlayhints",
|
|
callback = function(args)
|
|
if not (args.data and args.data.client_id) then
|
|
return
|
|
end
|
|
|
|
local bufnr = args.buf
|
|
local client = vim.lsp.get_client_by_id(args.data.client_id)
|
|
require("lsp-inlayhints").on_attach(client, bufnr)
|
|
end,
|
|
})
|