yaml: Adjust filetype-specific highlights
authorAntoine Cotten <hello@acotten.com>
Sat, 13 Aug 2022 14:13:40 +0000 (16:13 +0200)
committerAntoine Cotten <hello@acotten.com>
Sat, 13 Aug 2022 14:28:30 +0000 (16:28 +0200)
lua/nord/theme.lua
lua/nord/util.lua

index 5480103466ad971e4c7676e314ca85fab7ebec83..91957a535f6caa06f46789cd0e51d3c63dd753b4 100644 (file)
@@ -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
 
index b605e729d1136d37332f554f72a59e09f9ef7c1e..6042b32e5ac3a590495224a34f632c8d8d0a7126 100644 (file)
@@ -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