This is an archive of the discontinued LLVM Phabricator instance.

[MLIR] Fix MLIR vim syntax file
ClosedPublic

Authored by sgrechanik on Mar 28 2022, 5:58 PM.

Details

Summary

This commit fixes several things in the MLIR vim syntax file:

  • Spell checking is now on by default only in comments.
  • '#' now starts an identifier instead of starting an outline attribute declaration, which fixes coloring the rest of the line as a preprocessor directive when there is a '#' in the middle.
  • '!' and '^' -prefixed identifiers are now colored as types and labels.

Diff Detail

Event Timeline

sgrechanik created this revision.Mar 28 2022, 5:58 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 28 2022, 5:58 PM
sgrechanik requested review of this revision.Mar 28 2022, 5:58 PM

Thanks for this. Can you also add the bullets from the commit summary as comments in the syntax file itself?

Added comments

Won't this change the color for the attribute definitions? (from PreProc to Identifier)

Yes, it will. I can separate it into a separate group if you want it to stand out more.

sgrechanik edited the summary of this revision. (Show Details)

Added separate groups for different kinds of identifiers, they will have different colors now.

This revision is now accepted and ready to land.Apr 4 2022, 2:45 AM
This revision was automatically updated to reflect the committed changes.