-
Notifications
You must be signed in to change notification settings - Fork 6
Refactor Syntax Highlighting Config #40
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
Conversation
…g file to and from /.config directory in user file system
| QString configPath = qgetenv("CONFIG_DIR"); | ||
| if (configPath.isEmpty()) | ||
| QString userSyntaxDir = QDir::homePath() + "/.config/codeastra/syntax"; | ||
| QDir dir(userSyntaxDir); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we still provide a way to change the default config location?
It could be a good idea to keep a universal location for these files for simplicity (and security) reasons as is done here now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this is the universal location. I took the same example as Neo Vim, where the config is located at /.config/nvim/*
Description
This PR refactors how we handle syntax-highlighting files. Instead of fetching from the project directory, when users first run the project, a new directory will be created in the user's config directory in the home directory named
/.config/codeastra/syntax/*. All the default syntax highlight configuration will then be migrated there.Users can still update an existing syntax config file or create a new one, but this time directly from
~/.config/codeastra/syntax/xxx.syntax.yamlrather than this project directory.