feat: add builtin style configuration
style: format
This commit is contained in:
		
							parent
							
								
									04753e6b08
								
							
						
					
					
						commit
						f55494a73d
					
				@ -15,6 +15,7 @@ local defaults = {
 | 
			
		||||
		storage_class = 'NONE',
 | 
			
		||||
		structure = 'NONE',
 | 
			
		||||
		loop_cond = 'NONE',
 | 
			
		||||
		builtin = 'NONE',
 | 
			
		||||
	},
 | 
			
		||||
	disable = {
 | 
			
		||||
		background = false, -- Disable setting the background color
 | 
			
		||||
 | 
			
		||||
@ -10,7 +10,7 @@ function theme.highlights(c, config)
 | 
			
		||||
 | 
			
		||||
		local syntax = {
 | 
			
		||||
			-- int, long, char, etc.
 | 
			
		||||
      Type = { fg = c.quartz },
 | 
			
		||||
			Type = { fg = c.yellow },
 | 
			
		||||
			-- static, register, volatile, etc.
 | 
			
		||||
			StorageClass = { fg = c.yellow, style = config.styles.storage_class },
 | 
			
		||||
			-- struct, union, enum, etc.
 | 
			
		||||
@ -147,13 +147,13 @@ function theme.highlights(c, config)
 | 
			
		||||
			-- directory names (and other special names in listings)
 | 
			
		||||
			Directory = { fg = c.light_blue, bg = c.none },
 | 
			
		||||
			-- diff mode: Added line
 | 
			
		||||
      DiffAdd = { fg = c.none, bg = c.green },
 | 
			
		||||
			DiffAdd = { fg = c.green, bg = c.none },
 | 
			
		||||
			-- diff mode: Changed line
 | 
			
		||||
      DiffChange = { fg = c.none, bg = c.brown },
 | 
			
		||||
			DiffChange = { fg = c.brown, bg = c.none },
 | 
			
		||||
			-- diff mode: Deleted line
 | 
			
		||||
      DiffDelete = { fg = c.none, bg = c.red1 },
 | 
			
		||||
			DiffDelete = { fg = c.red_1, bg = c.none },
 | 
			
		||||
			-- diff mode: Changed text within a changed line
 | 
			
		||||
      DiffText = { fg = c.none, bg = c.green },
 | 
			
		||||
			DiffText = { fg = c.none, bg = c.none },
 | 
			
		||||
			-- error messages
 | 
			
		||||
			ErrorMsg = { fg = c.red_1 },
 | 
			
		||||
			-- line used for closed folds
 | 
			
		||||
@ -434,7 +434,7 @@ function theme.highlights(c, config)
 | 
			
		||||
			-- Type (and class) definitions and annotations.
 | 
			
		||||
			['@type'] = { fg = c.yellow, style = config.styles.storage_class },
 | 
			
		||||
			-- Built-in types: `i32` in Rust.
 | 
			
		||||
      ['@type.builtin'] = { fg = c.quartz },
 | 
			
		||||
			['@type.builtin'] = { fg = c.quartz, style = config.styles.builtin },
 | 
			
		||||
			-- Variable names that don't fit into other categories.
 | 
			
		||||
			['@variable'] = { fg = c.fg, style = config.styles.variables },
 | 
			
		||||
			-- Variable names defined by the language: `this` or `self` in Javascript.
 | 
			
		||||
@ -576,27 +576,31 @@ function theme.highlights(c, config)
 | 
			
		||||
			TroubleText = { fg = c.fg },
 | 
			
		||||
 | 
			
		||||
			-- Diff
 | 
			
		||||
      diffAdded = { fg = c.green },
 | 
			
		||||
      diffRemoved = { fg = c.red_1 },
 | 
			
		||||
      diffChanged = { fg = c.yellow },
 | 
			
		||||
      diffOldFile = { fg = c.brown },
 | 
			
		||||
      diffNewFile = { fg = c.light_blue },
 | 
			
		||||
      diffFile = { fg = c.wisteria },
 | 
			
		||||
      diffLine = { fg = c.bg5 },
 | 
			
		||||
      diffIndexLine = { fg = c.wisteria1 },
 | 
			
		||||
			-- diffAdded = { fg = c.green, bg = c.bg1 },
 | 
			
		||||
			-- diffRemoved = { fg = c.red_1, bg = c.bg1 },
 | 
			
		||||
			-- diffChanged = { fg = c.yellow },
 | 
			
		||||
			-- diffOldFile = { fg = c.brown },
 | 
			
		||||
			-- diffNewFile = { fg = c.light_blue },
 | 
			
		||||
			-- diffFile = { fg = c.wisteria },
 | 
			
		||||
			-- diffLine = { fg = c.bg5 },
 | 
			
		||||
			-- diffIndexLine = { fg = c.wisteria1 },
 | 
			
		||||
 | 
			
		||||
			-- Neogit
 | 
			
		||||
      NeogitBranch = { fg = c.wisteria1 },
 | 
			
		||||
			NeogitBranch = { fg = c.yellow },
 | 
			
		||||
			NeogitRemote = { fg = c.brown },
 | 
			
		||||
			NeogitHunkHeader = { fg = c.fg, bg = c.bg1 },
 | 
			
		||||
			NeogitHunkHeaderHighlight = { fg = c.yellow, bg = c.bg1 },
 | 
			
		||||
      NeogitDiffContextHighlight = { bg = c.bg1 },
 | 
			
		||||
      NeogitDiffDeleteHighlight = { fg = c.red },
 | 
			
		||||
      NeogitDiffAddHighlight = { fg = c.green },
 | 
			
		||||
 | 
			
		||||
      NeogitNotificationInfo = { fg = c.yellow },
 | 
			
		||||
      NeogitNotificationWarning = { fg = c.red_1 },
 | 
			
		||||
      NeogitNotificationError = { fg = c.red1 },
 | 
			
		||||
			NeogitDiffContextHighlight = { bg = c.none },
 | 
			
		||||
			NeogitDiffDeleteHighlight = { fg = c.red_1, bg = c.none },
 | 
			
		||||
			NeogitDiffDeleteRegion = { fg = c.red_1, bg = c.none },
 | 
			
		||||
			NeogitDiffAddHighlight = { fg = c.green, bg = c.none },
 | 
			
		||||
			NeogitDiffAddRegion = { fg = c.green, bg = c.none },
 | 
			
		||||
			NeogitDiffDelete = { fg = c.red },
 | 
			
		||||
			NeogitDiffAdd = { fg = c.green },
 | 
			
		||||
			NeogitCommitViewHeader = { fg = c.quartz },
 | 
			
		||||
			NeogitNotificationInfo = { fg = c.wisteria },
 | 
			
		||||
			NeogitNotificationWarning = { fg = c.brown },
 | 
			
		||||
			NeogitNotificationError = { fg = c.red_1 },
 | 
			
		||||
 | 
			
		||||
			-- WhichKey
 | 
			
		||||
			WhichKey = { fg = c.wisteria1, style = 'bold' },
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user