Skip to content

Commit 86b7b0d

Browse files
committed
fix: make config a json file
1 parent f68e826 commit 86b7b0d

File tree

4 files changed

+30
-30
lines changed

4 files changed

+30
-30
lines changed

lib/config.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"showDataTipOnCursorMove": {
3+
"title": "Show datatip automatically on 'cursor' stay",
4+
"description": "If set to true, the data tip is shown as soon as you move your cursor stays on a word. Otherwise you will have to activate it via keypress.",
5+
"type": "boolean",
6+
"default": true
7+
},
8+
"showDataTipOnMouseMove": {
9+
"description": "If set to true, the data tip is shown as soon as mouse hovers on a word.",
10+
"title": "Show datatip automatically on 'mouse' hover",
11+
"type": "boolean",
12+
"default": false
13+
},
14+
"hoverTime": {
15+
"title": "Hover/Stay Time",
16+
"description": "The time that the mouse/cursor should hover/stay to show a datatip. Also specifies the time that the datatip is still shown when the mouse/cursor moves [ms].",
17+
"type": "number",
18+
"default": 80
19+
},
20+
"glowOnHover": {
21+
"title": "Glow on hover",
22+
"description": "Should the datatip glow when you hover on it?",
23+
"type": "boolean",
24+
"default": true
25+
}
26+
}

lib/main.ts

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import { CompositeDisposable } from "atom"
44
import { DataTipManager } from "./datatip-manager"
55
import type { DatatipService } from "atom-ide-base"
66

7+
export { default as config } from "./config.json"
8+
79
/**
810
* [subscriptions description]
911
*/
@@ -54,32 +56,3 @@ export function deactivate() {
5456
export function provideDatatipService(): DatatipService {
5557
return datatipManager!.datatipService
5658
}
57-
58-
export const config = {
59-
showDataTipOnCursorMove: {
60-
title: 'Show datatip automatically on "cursor" stay',
61-
description:
62-
"If set to true, the data tip is shown as soon as you move your cursor stays on a word. Otherwise you will have to activate it via keypress.",
63-
type: "boolean",
64-
default: true,
65-
},
66-
showDataTipOnMouseMove: {
67-
title: 'Show datatip automatically on "mouse" hover',
68-
description: "If set to true, the data tip is shown as soon as mouse hovers on a word.",
69-
type: "boolean",
70-
default: false,
71-
},
72-
hoverTime: {
73-
title: "Hover/Stay Time",
74-
description:
75-
"The time that the mouse/cursor should hover/stay to show a datatip. Also specifies the time that the datatip is still shown when the mouse/cursor moves [ms].",
76-
type: "number",
77-
default: 80,
78-
},
79-
glowOnHover: {
80-
title: "Glow on hover",
81-
description: "Should the datatip glow when you hover on it?",
82-
type: "boolean",
83-
default: true,
84-
},
85-
}

lib/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"target": "ES2018",
2323
"allowJs": true,
2424
"esModuleInterop": true,
25+
"resolveJsonModule": true,
2526
"module": "commonjs",
2627
"moduleResolution": "node",
2728
"importHelpers": false,

rollup.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { createPlugins } from "rollup-plugin-atomic"
22

3-
const plugins = createPlugins([["ts", { tsconfig: "./lib/tsconfig.json" }, true], "js"])
3+
const plugins = createPlugins([["ts", { tsconfig: "./lib/tsconfig.json" }, true], "js", "json"])
44

55
export default [
66
{

0 commit comments

Comments
 (0)