feat(nvim): add markup concealments
This commit is contained in:
parent
c9a5d45ca1
commit
ff1de2cb01
@ -1,5 +1,4 @@
|
||||
vim.opt_local.tabstop = 2
|
||||
vim.opt_local.conceallevel = 0
|
||||
vim.opt_local.shiftwidth = 2
|
||||
vim.opt_local.textwidth = 120
|
||||
|
||||
|
@ -4,11 +4,11 @@
|
||||
(list_marker_star)
|
||||
(list_marker_plus)
|
||||
(list_marker_minus)
|
||||
]) @markup.list.markdown
|
||||
(#offset! @markup.list.markdown 0 0 0 -1)
|
||||
]) @markup.list
|
||||
(#offset! @markup.list 0 0 0 -1)
|
||||
(#set! conceal "•")
|
||||
)
|
||||
|
||||
; checkboxes
|
||||
((task_list_marker_unchecked) @markup.list.unchecked.markdown (#set! conceal ""))
|
||||
((task_list_marker_checked) @markup.list.checked.markdown (#set! conceal ""))
|
||||
((task_list_marker_unchecked) @markup.list.unchecked (#set! conceal ""))
|
||||
((task_list_marker_checked) @markup.list.checked (#set! conceal ""))
|
||||
|
@ -3,3 +3,27 @@
|
||||
@punctuation.special
|
||||
(#any-of? @punctuation.special "-" "*" "+")
|
||||
(#set! conceal "•"))
|
||||
|
||||
((checkbox !status) @markup.list.unchecked (#set! conceal ""))
|
||||
|
||||
((checkbox
|
||||
status:
|
||||
(expr)
|
||||
@org-checkbox-content (#any-of? @org-checkbox-content "x" "X")) @markup.list.checked
|
||||
(#set! conceal ""))
|
||||
|
||||
((checkbox
|
||||
status:
|
||||
(expr)
|
||||
@org-checkbox-content (#any-of? @org-checkbox-content "-")) @markup.list.indeterminate
|
||||
(#set! conceal ""))
|
||||
|
||||
; Table highlights
|
||||
(row
|
||||
"|" @punctuation.special)
|
||||
(cell
|
||||
"|" @punctuation.special)
|
||||
(table
|
||||
(row
|
||||
(cell (contents) @markup.heading))
|
||||
(hr) @punctuation.special)
|
||||
|
@ -221,9 +221,10 @@ return {
|
||||
["@OrgTSBlock.org"] = { fg = colors.fujiGray, bold = true, italic = true },
|
||||
["@OrgTSDirective.org"] = { link = "@OrgTSBlock.org" },
|
||||
|
||||
-- Markdown specific
|
||||
["@markdown_check_undone"] = { fg = colors.carpYellow },
|
||||
["@markdown_check_ndone"] = { fg = colors.springGreen },
|
||||
-- Markup specific
|
||||
["@markup.list.checked"] = { fg = colors.springGreen },
|
||||
["@markup.list.indeterminate"] = { fg = colors.carpYellow },
|
||||
["@markup.list.unchecked"] = { fg = colors.crystalBlue },
|
||||
}
|
||||
|
||||
return overrides
|
||||
|
@ -4,23 +4,6 @@ return {
|
||||
branch = "nightly",
|
||||
dependencies = {
|
||||
{ "nvim-treesitter/nvim-treesitter" },
|
||||
{
|
||||
"akinsho/org-bullets.nvim",
|
||||
opts = {
|
||||
concealcursor = true,
|
||||
symbols = {
|
||||
list = "",
|
||||
headlines = {
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
event = "VeryLazy",
|
||||
ft = { "org" },
|
||||
|
@ -1,5 +0,0 @@
|
||||
syn match org_table_sep /\(|\|\-\|+\)/ contained
|
||||
syn match org_table_header /|.*|/ contained contains=org_table_sep
|
||||
syn match org_table_header_region /|.*|\_s*|\_s*\(-+\|\-\).*|\_s*$/ contained contains=org_table_header
|
||||
syn match org_table /|.*|\_s*$/ contained contains=org_table_sep,org_table_header_region
|
||||
syn match org_table_region /^\s*|.*|\_s*$/ contains=org_table
|
Loading…
Reference in New Issue
Block a user