(This is a new pull-request, since I somehow screwed the last one up, sorry about that 😊)
When installing babi in a venv, located somewhere on your pc, it won't pick up babi_grammar's existence,
because the path isn't being searched and therefore syntax highlighting won't work.
This PR tries to fix this by importing babi_grammar and using its path to find the correct grammar_v1 folder.
babi_grammars.__spec__.origin gives us an absolute path to babi_grammars.py. From there we go to the parent directory and into share/babi/grammar_v1
(This is a new pull-request, since I somehow screwed the last one up, sorry about that 😊)
When installing babi in a venv, located somewhere on your pc, it won't pick up babi_grammar's existence, because the path isn't being searched and therefore syntax highlighting won't work. This PR tries to fix this by importing babi_grammar and using its path to find the correct
grammar_v1
folder.babi_grammars.__spec__.origin
gives us an absolute path tobabi_grammars.py
. From there we go to the parent directory and intoshare/babi/grammar_v1