mirror of
				https://github.com/neovim/neovim.git
				synced 2025-11-04 01:34:25 +00:00 
			
		
		
		
	fix(lsp): announce diagnostic tag support (#34436)
This commit also adds a type annotation to the returned client capabilities table, because without it lua_ls does not provide autocompletion for the fields within the table.
This commit is contained in:
		@@ -329,6 +329,7 @@ end
 | 
				
			|||||||
--- capabilities.
 | 
					--- capabilities.
 | 
				
			||||||
--- @return lsp.ClientCapabilities
 | 
					--- @return lsp.ClientCapabilities
 | 
				
			||||||
function protocol.make_client_capabilities()
 | 
					function protocol.make_client_capabilities()
 | 
				
			||||||
 | 
					  ---@type lsp.ClientCapabilities
 | 
				
			||||||
  return {
 | 
					  return {
 | 
				
			||||||
    general = {
 | 
					    general = {
 | 
				
			||||||
      positionEncodings = {
 | 
					      positionEncodings = {
 | 
				
			||||||
@@ -340,6 +341,9 @@ function protocol.make_client_capabilities()
 | 
				
			|||||||
    textDocument = {
 | 
					    textDocument = {
 | 
				
			||||||
      diagnostic = {
 | 
					      diagnostic = {
 | 
				
			||||||
        dynamicRegistration = false,
 | 
					        dynamicRegistration = false,
 | 
				
			||||||
 | 
					        tagSupport = {
 | 
				
			||||||
 | 
					          valueSet = get_value_set(constants.DiagnosticTag),
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      inlayHint = {
 | 
					      inlayHint = {
 | 
				
			||||||
        dynamicRegistration = true,
 | 
					        dynamicRegistration = true,
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user