I suggest that the File Scanner Provider and the Word List Provider sorts its results based on a pre-set international locale.
Looking at the code, it seems both providers use dictionary_provider.ts. At the end of the getSuggestions() method it does this:
return result.sort((a, b) => a.displayName.length - b.displayName.length);
I suggest it does something like this, instead:
const mycollator = new Intl.Collator('de');
return result.sort((a, b) => mycollator.compare(a.displayName, b.displayName));
I think there should be a new configuration option where the user can specify the locale. I'm not sure if it is possible to obtain the current locale of Obsidian in JS, but even if it is, it would be better to make this selectable by the user. It is possible, that the user uses Obsidian in English but writes his/her notes in a different language.
I suggest that the File Scanner Provider and the Word List Provider sorts its results based on a pre-set international locale.
Looking at the code, it seems both providers use
dictionary_provider.ts
. At the end of thegetSuggestions()
method it does this:I suggest it does something like this, instead:
I think there should be a new configuration option where the user can specify the locale. I'm not sure if it is possible to obtain the current locale of Obsidian in JS, but even if it is, it would be better to make this selectable by the user. It is possible, that the user uses Obsidian in English but writes his/her notes in a different language.