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.tabstop = 2
|
||||||
vim.opt_local.conceallevel = 0
|
|
||||||
vim.opt_local.shiftwidth = 2
|
vim.opt_local.shiftwidth = 2
|
||||||
vim.opt_local.textwidth = 120
|
vim.opt_local.textwidth = 120
|
||||||
|
|
||||||
|
@ -4,11 +4,11 @@
|
|||||||
(list_marker_star)
|
(list_marker_star)
|
||||||
(list_marker_plus)
|
(list_marker_plus)
|
||||||
(list_marker_minus)
|
(list_marker_minus)
|
||||||
]) @markup.list.markdown
|
]) @markup.list
|
||||||
(#offset! @markup.list.markdown 0 0 0 -1)
|
(#offset! @markup.list 0 0 0 -1)
|
||||||
(#set! conceal "•")
|
(#set! conceal "•")
|
||||||
)
|
)
|
||||||
|
|
||||||
; checkboxes
|
; checkboxes
|
||||||
((task_list_marker_unchecked) @markup.list.unchecked.markdown (#set! conceal ""))
|
((task_list_marker_unchecked) @markup.list.unchecked (#set! conceal ""))
|
||||||
((task_list_marker_checked) @markup.list.checked.markdown (#set! conceal ""))
|
((task_list_marker_checked) @markup.list.checked (#set! conceal ""))
|
||||||
|
@ -3,3 +3,27 @@
|
|||||||
@punctuation.special
|
@punctuation.special
|
||||||
(#any-of? @punctuation.special "-" "*" "+")
|
(#any-of? @punctuation.special "-" "*" "+")
|
||||||
(#set! conceal "•"))
|
(#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 },
|
["@OrgTSBlock.org"] = { fg = colors.fujiGray, bold = true, italic = true },
|
||||||
["@OrgTSDirective.org"] = { link = "@OrgTSBlock.org" },
|
["@OrgTSDirective.org"] = { link = "@OrgTSBlock.org" },
|
||||||
|
|
||||||
-- Markdown specific
|
-- Markup specific
|
||||||
["@markdown_check_undone"] = { fg = colors.carpYellow },
|
["@markup.list.checked"] = { fg = colors.springGreen },
|
||||||
["@markdown_check_ndone"] = { fg = colors.springGreen },
|
["@markup.list.indeterminate"] = { fg = colors.carpYellow },
|
||||||
|
["@markup.list.unchecked"] = { fg = colors.crystalBlue },
|
||||||
}
|
}
|
||||||
|
|
||||||
return overrides
|
return overrides
|
||||||
|
@ -4,23 +4,6 @@ return {
|
|||||||
branch = "nightly",
|
branch = "nightly",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
{ "nvim-treesitter/nvim-treesitter" },
|
{ "nvim-treesitter/nvim-treesitter" },
|
||||||
{
|
|
||||||
"akinsho/org-bullets.nvim",
|
|
||||||
opts = {
|
|
||||||
concealcursor = true,
|
|
||||||
symbols = {
|
|
||||||
list = "",
|
|
||||||
headlines = {
|
|
||||||
"",
|
|
||||||
"",
|
|
||||||
"",
|
|
||||||
"",
|
|
||||||
"",
|
|
||||||
"",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
ft = { "org" },
|
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