Open chbk opened 3 years ago
Preview of the changes with Atom's default syntax themes:
Without naming conventions (current Tree-sitter grammar) |
With naming conventions in theme and Tree-sitter grammar |
---|---|
Solarized Dark |
Solarized Dark |
One Dark |
One Dark |
Base16 Tomorrow Dark |
Base16 Tomorrow Dark |
Atom Dark |
Atom Dark |
Solarized Light |
Solarized Light |
One Light |
One Light |
Base16 Tomorrow Light |
Base16 Tomorrow Light |
Atom Light |
Atom Light |
Code snippet:
require 'nebuchadnezzar.rb'
# That is the sound of inevitability
BEGIN {
call = ['Knock', 'Knock', 'Neo']
call.each do |x| puts x end
}
follow = /^(?:white)\s[rR]ab{2}it$/
door == 101 ? IO.open : IO.close
module Program
class Smith < Agent
include KungFu
def -@
super %(zion = #{23 << 1})
end
public
def capture(morpheus: nil)
if block_given?
yield self
else
@humans = virus | mammal
end
end
alias_method 'torment', :capture
end
end
$red_dress = Program::Smith.new
$red_dress&.torment(morpheus: true)
begin
6.times { *pills = :red, :blue }
rescue => unplug
PHONEBOOTH = {
'last_name': 'Anderson',
:first_name => 'Thomas'
}
end
Description of the Change
This is a rewrite of the Tree-sitter grammar to implement naming conventions for syntax scopes.
Benefits
Possible Drawbacks
Some new scopes to be added to themes. The changes aim to facilitate theme development, filling the template is enough to ensure coherent highlighting across languages, instead of painfully creating styling rules for every language separately.
Applicable Issues
Related Pull Requests