aboutsummaryrefslogtreecommitdiffstats
path: root/lua/alpha
diff options
context:
space:
mode:
authorAriel D'Alessandro <dalessandro.ariel@gmail.com>2023-06-22 10:30:59 +0200
committerAriel D'Alessandro <dalessandro.ariel@gmail.com>2023-06-22 10:30:59 +0200
commit58c0d7ea66e621350896d86d71073c2b13b0b133 (patch)
tree3af8c77e9432b1b9e8534427b370d622572b11ad /lua/alpha
parent2f20c8b58b8d0d6ce93cbf3e8f2d942f8fdf76b9 (diff)
downloadnvim-conf-58c0d7ea66e621350896d86d71073c2b13b0b133.tar.gz
nvim-conf-58c0d7ea66e621350896d86d71073c2b13b0b133.zip
enable inlay hint if the client supports it
Diffstat (limited to 'lua/alpha')
-rw-r--r--lua/alpha/lsp/attach.lua4
1 files changed, 3 insertions, 1 deletions
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)