Skip to content

Conversation

@chrisdedman
Copy link
Member

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.yaml rather than this project directory.

@chrisdedman chrisdedman self-assigned this Aug 30, 2025
@chrisdedman chrisdedman added the enhancement New feature or request label Aug 30, 2025
@chrisdedman chrisdedman requested a review from grivera64 August 30, 2025 19:54
@chrisdedman chrisdedman moved this to In Progress in CodeAstra MVP Aug 30, 2025
Comment on lines -10 to +11
QString configPath = qgetenv("CONFIG_DIR");
if (configPath.isEmpty())
QString userSyntaxDir = QDir::homePath() + "/.config/codeastra/syntax";
QDir dir(userSyntaxDir);
Copy link
Member

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.

Copy link
Member Author

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/*

@chrisdedman chrisdedman requested a review from grivera64 August 30, 2025 23:03
@chrisdedman chrisdedman merged commit 4c299ac into main Aug 31, 2025
5 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in CodeAstra MVP Aug 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants