mirror of
https://github.com/EnumeratedDev/typer.git
synced 2026-09-16 05:36:10 +00:00
Add simple syntax highlighting
This commit is contained in:
+1
-1
@@ -6,5 +6,5 @@ selected_style_fallback: "default-fallback" # Style for 8-color capable terminal
|
||||
show_top_menu: true
|
||||
show_line_index: true
|
||||
extend_line_index: false # Extend line index to the bottom of the screen
|
||||
buffer_info_message: "File: %f Cursor: (%x, %y, %p) Chars: %c"
|
||||
buffer_info_message: "File: %f, Filetype: %t, Cursor: (%x, %y, %p), Chars: %c"
|
||||
tab_indentation: 4 # Length of tab characters
|
||||
|
||||
@@ -19,3 +19,11 @@ colors:
|
||||
message_bar_fg: "black" # Message bar text color
|
||||
input_bar_bg: "245" # Input bar background color
|
||||
input_bar_fg: "black" # Input bar text color
|
||||
|
||||
# Syntax highlighting
|
||||
syntax_comment: "darkgray"
|
||||
syntax_keyword: "lightgreen"
|
||||
syntax_identifier: "yellow"
|
||||
syntax_constant: "purple"
|
||||
syntax_variable: "yellow"
|
||||
syntax_string: "purple"
|
||||
|
||||
@@ -5,6 +5,7 @@ style_type: "256-color"
|
||||
|
||||
# Colors
|
||||
colors:
|
||||
# Main colors
|
||||
buffer_area_bg: "234" # Buffer area background color
|
||||
buffer_area_fg: "white" # Buffer area text color
|
||||
buffer_area_sel: "243" # Buffer area selected text and cursor background color
|
||||
@@ -18,4 +19,12 @@ colors:
|
||||
message_bar_bg: "236" # Message bar background color
|
||||
message_bar_fg: "white" # Message bar text color
|
||||
input_bar_bg: "236" # Input bar background color
|
||||
input_bar_fg: "white" # Input bar text color
|
||||
input_bar_fg: "white" # Input bar text color
|
||||
|
||||
# Syntax highlighting
|
||||
syntax_comment: "gray"
|
||||
syntax_keyword: "gold"
|
||||
syntax_identifier: "purple"
|
||||
syntax_constant: "teal"
|
||||
syntax_variable: "purple"
|
||||
syntax_string: "blue"
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
filetype: yaml
|
||||
filenames: ".y[a]?ml$"
|
||||
|
||||
rules:
|
||||
- type: string # Strings
|
||||
regex: '(["''])(.*?)(["''])'
|
||||
- type: comment
|
||||
regex: "#.*"
|
||||
- type: identifier # Keys
|
||||
regex: '^[[:blank:]]*(-.)?([a-z0-9\._\-])+:'
|
||||
multiline: true
|
||||
- type: constant # Number values
|
||||
regex: '\d+(\.\d+)?'
|
||||
- type: constant # True/false values
|
||||
regex: '\b(YES|yes|Y|y|ON|on|TRUE|True|true|NO|no|N|n|OFF|off|FALSE|False|false)\b'
|
||||
Reference in New Issue
Block a user