2022-12-06 15:12:59 +00:00
|
|
|
export enum MetricCounter {
|
|
|
|
words,
|
|
|
|
characters,
|
|
|
|
sentences,
|
|
|
|
files,
|
|
|
|
}
|
|
|
|
|
|
|
|
export enum MetricType {
|
|
|
|
file,
|
|
|
|
daily,
|
|
|
|
total,
|
|
|
|
folder,
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface Metric {
|
|
|
|
type: MetricType;
|
|
|
|
counter: MetricCounter;
|
|
|
|
folder?: string;
|
2022-11-06 16:27:06 +00:00
|
|
|
}
|
2022-11-08 04:45:18 +00:00
|
|
|
|
2022-11-06 16:27:06 +00:00
|
|
|
export interface StatusBarItem {
|
2022-11-10 15:23:23 +00:00
|
|
|
prefix: string;
|
|
|
|
suffix: string;
|
2022-12-06 15:12:59 +00:00
|
|
|
metric: Metric;
|
2022-11-06 16:27:06 +00:00
|
|
|
}
|
2021-07-07 12:34:39 +00:00
|
|
|
|
2022-11-08 04:45:18 +00:00
|
|
|
export const BLANK_SB_ITEM: StatusBarItem = {
|
2022-11-10 15:23:23 +00:00
|
|
|
prefix: "",
|
|
|
|
suffix: "",
|
2022-12-06 15:12:59 +00:00
|
|
|
metric: {
|
|
|
|
type: null,
|
|
|
|
counter: null,
|
|
|
|
},
|
2022-11-08 04:45:18 +00:00
|
|
|
};
|
|
|
|
|
2021-07-07 12:34:39 +00:00
|
|
|
export interface BetterWordCountSettings {
|
2022-11-06 16:27:06 +00:00
|
|
|
statusBar: StatusBarItem[];
|
2022-12-06 15:12:59 +00:00
|
|
|
altBar: StatusBarItem[];
|
2021-07-07 12:34:39 +00:00
|
|
|
countComments: boolean;
|
|
|
|
collectStats: boolean;
|
|
|
|
}
|
|
|
|
|
2022-12-06 15:12:59 +00:00
|
|
|
export const DEFAULT_SETTINGS: BetterWordCountSettings = {
|
2022-11-06 16:27:06 +00:00
|
|
|
statusBar: [
|
|
|
|
{
|
2022-11-10 15:23:23 +00:00
|
|
|
prefix: "",
|
|
|
|
suffix: " words",
|
2022-12-06 15:12:59 +00:00
|
|
|
metric: {
|
|
|
|
type: MetricType.file,
|
|
|
|
counter: MetricCounter.words,
|
|
|
|
},
|
2022-11-06 16:27:06 +00:00
|
|
|
},
|
|
|
|
{
|
2022-11-10 15:23:23 +00:00
|
|
|
prefix: " ",
|
|
|
|
suffix: " characters",
|
2022-12-06 15:12:59 +00:00
|
|
|
metric: {
|
|
|
|
type: MetricType.file,
|
|
|
|
counter: MetricCounter.characters,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
altBar: [
|
|
|
|
{
|
|
|
|
prefix: "",
|
|
|
|
suffix: "files",
|
|
|
|
metric: {
|
|
|
|
type: MetricType.total,
|
|
|
|
counter: MetricCounter.files,
|
|
|
|
},
|
2022-11-06 16:27:06 +00:00
|
|
|
},
|
|
|
|
],
|
|
|
|
countComments: false,
|
|
|
|
collectStats: false,
|
2022-12-06 15:12:59 +00:00
|
|
|
};
|