@@ -26,6 +26,17 @@ return {
2626 -- Setup neovim lua configuration
2727 require (' neodev' ).setup ()
2828
29+ local function enable_inlay_hints (client , bufnr )
30+ if not client or not client .server_capabilities or not client .server_capabilities .inlayHintProvider then
31+ return
32+ end
33+ if vim .lsp .inlay_hint and type (vim .lsp .inlay_hint ) == ' table' and vim .lsp .inlay_hint .enable then
34+ vim .lsp .inlay_hint .enable (true , { bufnr = bufnr })
35+ elseif vim .lsp .buf and vim .lsp .buf .inlay_hint then
36+ vim .lsp .buf .inlay_hint (bufnr , true )
37+ end
38+ end
39+
2940 -- Global LSP keymaps via LspAttach (universal, recommended pattern)
3041 local lsp_keys_grp = vim .api .nvim_create_augroup (' UserLspKeys' , { clear = true })
3142 vim .api .nvim_create_autocmd (' LspAttach' , {
@@ -52,6 +63,8 @@ return {
5263 nmap (' K' , vim .lsp .buf .hover , ' Hover Documentation' )
5364 nmap (' <C-k>' , vim .lsp .buf .signature_help , ' Signature Documentation' )
5465 nmap (' gD' , vim .lsp .buf .declaration , ' [G]oto [D]eclaration' )
66+ local client = args .data and vim .lsp .get_client_by_id (args .data .client_id ) or nil
67+ enable_inlay_hints (client , bufnr )
5568 end ,
5669 })
5770
@@ -87,6 +100,8 @@ return {
87100 vim .api .nvim_buf_create_user_command (bufnr , ' Format' , function (_ )
88101 vim .lsp .buf .format ()
89102 end , { desc = ' Format current buffer with LSP' })
103+
104+ enable_inlay_hints (client , bufnr )
90105 end
91106
92107 -- Enable the following language servers
@@ -168,4 +183,8 @@ return {
168183 }
169184 end ,
170185 },
186+ {
187+ ' qvalentin/helm-ls.nvim' ,
188+ ft = ' helm' ,
189+ },
171190}
0 commit comments