Please provide symbol lookup for the identifiers used amongst `syn match`, `syn region`, and `syn cluster`.

Open
#201 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
vim
Domain
tooling

Research direction

Start by examining the syntax files under .vim/syntax, using syntax/bind-named.vim and syntax/nftables.vim as large examples. Trace how syn match, syn region, and syn cluster identifiers are parsed, then determine how symbol lookup should expose definitions and references such as contains, nextgroup, and containedby. Done means these identifiers can be found through the parser's symbol lookup support.

Written by the indexing model from the issue text.

Description

Often times, the syntax spec file (ones in the .vim/syntax directory, have hundreds, if not thousands of identifiers.

And having the support of the symbol table would greatly cut down lookup efforts (instead of currently doing the selection-word, cut-n-paste into a search bar).

The symbol definition of such identifiers are defined in:

syntax match this_symbol_name ...
syntax region this_symbol_name ...
syntax cluster this_cluster_symbol_name ...

And are easily referenced after keywords like:

\ contains=this_symbol_name[,next_symbol_name ...]
\ contains=@this_cluster_symbol_name[,next_symbol_name ...]
\ nextgroup=this_symbol_name[,next_symbol_name ...]
\ containedby=this_symbol_name[,next_symbol_name ...]

Support for this will greatly assist the large data science community with easier and even simplistic syntax highlight used against high-speed data streaming outputs.
For large working examples:

Dominant language
Vim Script
Stars
173
Forks
28
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from vim-jp/vim-vimlparser

All issues in vim-jp/vim-vimlparser

Similar issues

More DevTools issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.