From 293d1e8f0246eb3c4bbe4c663b49d1aa9f94882f Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Wed, 1 Nov 2023 07:33:14 -0500 Subject: [PATCH] feat(nvim): add syntax highlight to Org tables MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀 --- dots/.config/nvim/lua/plugins/configs/kanagawa.lua | 3 +++ dots/.config/nvim/syntax/org.vim | 5 +++++ 2 files changed, 8 insertions(+) create mode 100644 dots/.config/nvim/syntax/org.vim diff --git a/dots/.config/nvim/lua/plugins/configs/kanagawa.lua b/dots/.config/nvim/lua/plugins/configs/kanagawa.lua index 7348b9e7..6aae6ce8 100644 --- a/dots/.config/nvim/lua/plugins/configs/kanagawa.lua +++ b/dots/.config/nvim/lua/plugins/configs/kanagawa.lua @@ -204,6 +204,9 @@ return { NotifyTRACEBorder = { link = "NvimNotifyTrace" }, NotifyTRACEIcon = { link = "NvimNotifyTrace" }, NotifyTRACETitle = { link = "NvimNotifyTrace" }, + org_table_sep = { fg = colors.springBlue, bg = colors.winterBlue }, + org_table_header = { fg = colors.crystalBlue, bg = colors.winterBlue }, + org_table = { bg = colors.winterBlue } } return overrides diff --git a/dots/.config/nvim/syntax/org.vim b/dots/.config/nvim/syntax/org.vim new file mode 100644 index 00000000..711e2990 --- /dev/null +++ b/dots/.config/nvim/syntax/org.vim @@ -0,0 +1,5 @@ +syn match org_table_sep /\(|\|\(-\|=\)\|+\)/ contained +syn match org_table_header /|.*|/ contained contains=org_table_sep +syn match org_table_header_region /|.*|\_s*|\_s*\(-+\|\-\|=\).*|$/ contained contains=org_table_header +syn match org_table /|.*|$/ contained contains=org_table_sep,org_table_header_region +syn match org_table_region /^\s*|.*|$/ contains=org_table