fix: disable Nvim v0.9.0 lsp semantic highlights
This commit is contained in:
		
							parent
							
								
									1bbbb0fa4e
								
							
						
					
					
						commit
						1f14c5a0d1
					
				@ -28,6 +28,20 @@ local function create_autocmds()
 | 
			
		||||
			vim.cmd.setlocal("winhighlight=Normal:NormalSB,SignColumn:SignColumnSB")
 | 
			
		||||
		end,
 | 
			
		||||
	})
 | 
			
		||||
 | 
			
		||||
  -- This is a mitigation for new Nvim v0.9.0 lsp semantic highlights
 | 
			
		||||
  -- overriding treesitter highlights. Need to link these to relevant
 | 
			
		||||
  -- treesitter groups in the future. See :h lsp-semantic-highlight
 | 
			
		||||
  vim.api.nvim_create_autocmd("ColorScheme", {
 | 
			
		||||
    group = gruber_darker_group,
 | 
			
		||||
    pattern = "*",
 | 
			
		||||
    callback = function()
 | 
			
		||||
      -- Hide all semantic highlights
 | 
			
		||||
      for _, group in ipairs(vim.fn.getcompletion("@lsp", "highlight")) do
 | 
			
		||||
        vim.api.nvim_set_hl(0, group, {})
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
  })
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
---Clear current highlights and set Neovim global `colors_name`
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user