From: Antoine Cotten Date: Sat, 13 Aug 2022 14:13:40 +0000 (+0200) Subject: yaml: Adjust filetype-specific highlights X-Git-Url: https://git.lhaegele.de/?a=commitdiff_plain;h=94f029e03aeb476e91402a4e14dd10dad9003d68;p=nvim%2Fnord.nvim.git yaml: Adjust filetype-specific highlights --- 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