From 94f029e03aeb476e91402a4e14dd10dad9003d68 Mon Sep 17 00:00:00 2001 From: Antoine Cotten Date: Sat, 13 Aug 2022 16:13:40 +0200 Subject: [PATCH] yaml: Adjust filetype-specific highlights --- lua/nord/theme.lua | 17 +++++++++++++++++ lua/nord/util.lua | 4 ++++ 2 files changed, 21 insertions(+) diff --git a/lua/nord/theme.lua b/lua/nord/theme.lua index 5480103..91957a5 100644 --- a/lua/nord/theme.lua +++ b/lua/nord/theme.lua @@ -337,6 +337,23 @@ theme.loadTreeSitter = function() return treesitter end +theme.loadFiletypes = function() + -- Filetype-specific highlight groups + + local ft = { + -- yaml + yamlBlockMappingKey = { fg = nord.nord7_gui }, + yamlBool = { link = "Boolean" }, + yamlDocumentStart = { link = "Keyword" }, + yamlTSField = { fg = nord.nord7_gui }, + yamlTSString = { fg = nord.nord4_gui }, + yamlTSPunctSpecial = { link = "Keyword" }, + yamlKey = { fg = nord.nord7_gui }, -- stephpy/vim-yaml + } + + return ft +end + theme.loadLSP = function() -- Lsp highlight groups diff --git a/lua/nord/util.lua b/lua/nord/util.lua index b605e72..6042b32 100644 --- a/lua/nord/util.lua +++ b/lua/nord/util.lua @@ -55,6 +55,7 @@ function util.load() local editor = nord.loadEditor() local syntax = nord.loadSyntax() local treesitter = nord.loadTreeSitter() + local filetypes = nord.loadFiletypes() -- load editor highlights util.loadColorSet(editor) @@ -65,6 +66,9 @@ function util.load() -- load treesitter highlights util.loadColorSet(treesitter) + -- load filetype-specific highlights + util.loadColorSet(filetypes) + nord.loadTerminal() -- imort tables for plugins and lsp -- 2.39.5