Add auto-completion support for snippet files (#23698)

Release Notes:

- Added auto-completion support for snippet files.


![image](https://github.com/user-attachments/assets/ad165fc7-a6e7-426c-8892-f7004515dfc7)
This commit is contained in:
loczek 2025-01-27 12:32:22 +01:00 committed by GitHub
parent 6e9ea47849
commit 6293b20fd0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 64 additions and 5 deletions

View file

@ -189,6 +189,12 @@ pub fn themes_dir() -> &'static PathBuf {
THEMES_DIR.get_or_init(|| config_dir().join("themes"))
}
/// Returns the path to the snippets directory.
pub fn snippets_dir() -> &'static PathBuf {
static SNIPPETS_DIR: OnceLock<PathBuf> = OnceLock::new();
SNIPPETS_DIR.get_or_init(|| config_dir().join("snippets"))
}
/// Returns the path to the contexts directory.
///
/// This is where the saved contexts from the Assistant are stored.