Testing inlay hints
This commit is contained in:
		@@ -1,7 +1,20 @@
 | 
				
			|||||||
require'lsp_extensions'.inlay_hints{
 | 
					local inlay_hints = require('lsp_extensions.inlay_hints')
 | 
				
			||||||
	highlight = "Comment",
 | 
					
 | 
				
			||||||
	prefix = " > ",
 | 
					local M = {}
 | 
				
			||||||
	aligned = false,
 | 
					
 | 
				
			||||||
	only_current_line = false,
 | 
					-- Global function, so you can just call it on the lua side
 | 
				
			||||||
	enabled = {"TypeHint", "ChainingHint", "ParameterHint"}
 | 
					ShowInlineInlayHints = function()
 | 
				
			||||||
}
 | 
					  vim.lsp.buf_request(0, 'rust-analyzer/inlayHints', inlay_hints.get_params(), inlay_hints.get_callback {
 | 
				
			||||||
 | 
					    only_current_line = true
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					-- @rockerboo
 | 
				
			||||||
 | 
					M.show_line_hints_on_cursor_events = function()
 | 
				
			||||||
 | 
					  vim.cmd [[augroup ShowLineHints]]
 | 
				
			||||||
 | 
					  vim.cmd [[  au!]]
 | 
				
			||||||
 | 
					  vim.cmd [[  autocmd CursorHold,CursorHoldI,CursorMoved *.rs :lua ShowInlineInlayHints()]]
 | 
				
			||||||
 | 
					  vim.cmd [[augroup END]]
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					return M
 | 
				
			||||||
		Reference in New Issue
	
	Block a user