Skip to content
This repository has been archived by the owner on Apr 29, 2021. It is now read-only.

Syntax file rewrite #7

Open
PotatoesMaster opened this issue Oct 19, 2014 · 3 comments
Open

Syntax file rewrite #7

PotatoesMaster opened this issue Oct 19, 2014 · 3 comments

Comments

@PotatoesMaster
Copy link
Owner

The syntax file needs a rewrite, for several reasons:

  • The current highlighting does not take account of the context (Are we in the middle of a command? In a binding declaration?). I use syn region for exec commands and string and nextgroup= at several places, but it does not work that well as of now and need to be rethought.
  • client.* keywords are not highlighted, because client itself is a keyword and take precedence.
  • Command scopes are ignored.

i3 generate its syntax from custom files, parsed by a perl script (spec files, script). These files could be used to generate a syntax file.

@michaelmrose
Copy link

So how goes this project? Thanks for your work btw.

@PotatoesMaster
Copy link
Owner Author

You're welcome. :)

No progress on that so far, and I did not try recently.
I will give it another shot in the next few days and write here how it is going.

PotatoesMaster added a commit that referenced this issue Oct 22, 2015
Highlight considering the context :

 - highlight arguments if they are valid for use with the preceding command;
 - highlight commands depending on the surrounding block (mode/bar/none).

The goal is to correctly highlight a same word used as command and as
argument (e.g. scratchpad, floating).
@PotatoesMaster
Copy link
Owner Author

It's good so far.
I now remember having problems with syncing before (highlighting was incorrect after scrolling). I read some documentation and added the line syn sync fromstart. Forcing vim to treat the file as a whole and not trying to be lazy fix that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants