New answers tagged


This was fixed by adding this in my vimrc, which is described in lua <<EOF require'nvim-treesitter.configs'.setup { highlight = { enable = true, custom_captures = { -- Highlight the capture group with the "Identifier" highlight group. ["


For more folding than the standard currently (vim 8.1) provides, see (Fandom) Syntax folding of Vim scripts It has an explanation and a script to add folding for: for/endfor while/endwhile if/elseif/else/endif try/catch/finally/endtry comments I recently added this fragment, to provide the comment folding. " Fold multiple comment lines, except those ...


Your example lines make up a nested list. Looking in $VIMRUNTIME/syntax/markdown.vim at the syn line with the pattern that matches list lines... " TODO: real nesting syn match markdownListMarker "\%(\t\| \{0,4\}\)[-*+]\%(\s\+\S\)\@=" contained Translation: currently you can only have one tab or 0-4 spaces preceding the list marker char (-, *, ...


As far as I know :h text-properties were designed with this in mind. The main use for text properties is to highlight text. This can be seen as a replacement for syntax highlighting. Instead of defining patterns to match the text, the highlighting is set by a script, possibly using the output of an external parser. This only needs to be done once, not ...


I moved on, after hacking something together that works for now: " Add syntax group for vulkan types that are handles. " The regular expression was generated with: " RE=$(egrep '^(VK_DEFINE_NON_DISPATCHABLE_HANDLE|VK_DEFINE_HANDLE)' Vulkan-Hpp/Vulkan-Headers/include/vulkan/vulkan_core.h | sed -e 's/.*(\([^)]*\)).*/\1/;s/^Vk//' | sort | awk '{ ...


How about this? syn region cParen start=/setup(/ end=/)/ contains=cwNamespaceVkTag syn match cwNamespaceVkTag /\<vk::\(Instance\|Device\)\>/ contains=cwVulkanHandle contained syn match cwVulkanHandle /::\w\+/ contained I didn't use the \v (very magic) atom because I'm more used to Vim's "standard" regular expression format.

Top 50 recent answers are included