Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add basic syntax detection and highlighting #2

Draft
wants to merge 42 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
26100d7
Add filetype detection for TypeQL
agrski Oct 9, 2022
d4f34bf
Add basic tab/indentation settings
agrski Oct 9, 2022
db9a5c4
Add header/manifest to syntax file
agrski Oct 9, 2022
4785a06
Add prelude/syntax check to syntax file
agrski Oct 9, 2022
dcee0a5
Add syntax matching options for case and keyword characters
agrski Oct 9, 2022
1e72feb
Add TypeQL keywords
agrski Oct 9, 2022
d5607fa
Add default highlighting for keyword groups
agrski Oct 9, 2022
5aaf845
Use full-form syntax instead of syn for keyword definitions
agrski Oct 10, 2022
2efc29b
Add Vim fold marker for highlighting section
agrski Oct 10, 2022
a68e8e2
Add syntactic matching & highlighting for comments & TODOs
agrski Oct 10, 2022
4403394
Add syntactic matching & highlighting for string literals
agrski Oct 10, 2022
2700c5a
Add matches & region identifiers for blocks in inference rules
agrski Oct 13, 2022
aaf51fe
Align syntax file header block
agrski Oct 29, 2022
5e2ca66
Add creation metadata to syntax file
agrski Oct 29, 2022
69b1d97
Update link for source of TypeQL grammar
agrski Oct 29, 2022
279239d
Add missing keywords to a couple of syntax groups
agrski Oct 29, 2022
f4363b1
Remove keyword from wrong syntax group
agrski Oct 29, 2022
7e0a2fc
Add keyword group for type var constraints
agrski Oct 29, 2022
341e3a0
Update & rename keyword group for thing-var constraints
agrski Oct 29, 2022
f0c9dee
Update keyword group for operators
agrski Oct 29, 2022
b86593f
Add keyword group for predicates
agrski Oct 29, 2022
dcf29e6
Add keyword group for query aggregations
agrski Oct 29, 2022
477730d
Use consistent alignment for keywords section
agrski Oct 29, 2022
22eaa9b
Reorder keyword groups for logical grouping
agrski Oct 29, 2022
10bce20
Add default highlight for new keyword groups
agrski Oct 29, 2022
af4f813
Split region definition over multiple lines for legibility
agrski Oct 29, 2022
f5d4807
Move Booleans to literals section & rename syntax group
agrski Oct 29, 2022
569ff31
Add match for single-quoted strings
agrski Oct 29, 2022
77634e2
Add syntactic matching & highlighting for integer literals
agrski Oct 29, 2022
061d858
Add syntactic matching & highlighting for floating-point literals
agrski Oct 29, 2022
cb60226
Highlight Booleans as such, not as general constants
agrski Oct 29, 2022
4b9c4f0
Add syntactic matching & highlighting for date & date-time literals
agrski Oct 30, 2022
284728d
Reorder syntax definition sections
agrski Oct 30, 2022
bbfcca0
Separate variable detection to separate section
agrski Oct 30, 2022
3d8f2c3
Add syntactic matching for anonymous variables
agrski Oct 30, 2022
9089cdc
Update syntactic matching for named variables
agrski Oct 30, 2022
c52f7d7
Use consistent alignmnt for highlighting section
agrski Oct 30, 2022
3737281
Order values lexically per keyword group
agrski Oct 30, 2022
0aee33f
Use match for keyword that aliases a Vim syntax option
agrski Oct 30, 2022
492177b
Add TODO comments for syntax concerns
agrski Dec 10, 2023
52742ee
Add placeholder indentation file
agrski Dec 10, 2023
a6efec7
Add notes on how to set up Vim indentation files
agrski Dec 10, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add syntactic matching & highlighting for comments & TODOs
  • Loading branch information
agrski committed Oct 10, 2022
commit a68e8e2839a1208b2246cc8f2f07758c3a1e2e3d
6 changes: 6 additions & 0 deletions syntax/typedb-tql.vim
Original file line number Diff line number Diff line change
@@ -25,6 +25,10 @@ syntax keyword typedbTqlStatementProp abstract as has iid isa isa! owns plays r
syntax keyword typedbTqlOperator is like or not
syntax keyword typedbTqlLiteral false true

" Comments {{{1
syntax keyword typedbTqlTodo contained TODO FIXME XXX NOTE
syntax match typedbTqlComment /#.*$/ contains=typedbTqlTodo

" Default highlighting {{{1
highlight default link typedbTqlNativeType Identifier
highlight default link typedbTqlDataType Type
@@ -33,4 +37,6 @@ highlight default link typedbTqlQueryModifier Statement
highlight default link typedbTqlStatementProp Statement
highlight default link typedbTqlOperator Operator
highlight default link typedbTqlLiteral Constant
highlight default link typedbTqlTodo Todo
highlight default link typedbTqlComment Comment