mirror of
https://github.com/junegunn/vim-easy-align.git
synced 2025-11-14 04:43:48 -05:00
Resolve syntax highlighting group in neovim/treesitter (#160)
Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
This commit is contained in:
@@ -517,7 +517,7 @@ highlighted as code comments or strings are ignored.
|
||||
>
|
||||
" Default:
|
||||
" If a delimiter is in a highlight group whose name matches
|
||||
" any of the followings, it will be ignored.
|
||||
" any of the following regular expressions, it will be ignored.
|
||||
let g:easy_align_ignore_groups = ['Comment', 'String']
|
||||
<
|
||||
For example, the following paragraph
|
||||
@@ -567,6 +567,17 @@ opposite meaning. For instance, if `ignore_groups` is given as `['!Comment']`,
|
||||
delimiters that are not highlighted as Comment will be ignored during the
|
||||
alignment.
|
||||
|
||||
To make `ignore_groups` work, and to debug the related issues, it is useful to
|
||||
know which highlight group a certain location in a file belongs to. A special
|
||||
function exists for this purpose, returning exactly the name of the highlight
|
||||
group that is used by the easy align plugin.
|
||||
>
|
||||
" Highlight group name of the cursor position
|
||||
echo easy_align#get_highlight_group_name()
|
||||
|
||||
" Highlight group name of the line 10, column 20
|
||||
echo easy_align#get_highlight_group_name(10, 20)
|
||||
<
|
||||
|
||||
< Ignoring unmatched lines >__________________________________________________~
|
||||
*easy-align-ignoring-unmatched-lines*
|
||||
|
||||
Reference in New Issue
Block a user