From 58c0d7ea66e621350896d86d71073c2b13b0b133 Mon Sep 17 00:00:00 2001 From: Ariel D'Alessandro Date: Thu, 22 Jun 2023 10:30:59 +0200 Subject: enable inlay hint if the client supports it --- lua/alpha/lsp/attach.lua | 4 +++- lua/plugins/neodev.lua | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 lua/plugins/neodev.lua (limited to 'lua') diff --git a/lua/alpha/lsp/attach.lua b/lua/alpha/lsp/attach.lua index 7fc7643..6b4b0cb 100644 --- a/lua/alpha/lsp/attach.lua +++ b/lua/alpha/lsp/attach.lua @@ -29,7 +29,9 @@ return function(client, bufnr) vim.bo.omnifunc = "v:lua.vim.lsp.omnifunc" - vim.lsp.buf.inlay_hint(bufnr) + if client.server_capabilities.inlayHintProvider then + vim.lsp.buf.inlay_hint(bufnr, true) + end -- Attach any filetype specific options to the client filetype_attach[filetype](client, bufnr) diff --git a/lua/plugins/neodev.lua b/lua/plugins/neodev.lua new file mode 100644 index 0000000..1bb0cd1 --- /dev/null +++ b/lua/plugins/neodev.lua @@ -0,0 +1,4 @@ +return { + "folke/neodev.nvim", + opts = {} +} -- cgit v1.2.3