Skip to content

Commit 797a173

Browse files
authored
Merge pull request #137 from atom-community/locale
fix: add locale to getInitializeParams
2 parents 11c329f + dfce15a commit 797a173

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

lib/auto-languageclient.ts

+1
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ export default class AutoLanguageClient {
109109
processId: lsProcess.pid,
110110
rootPath: projectPath,
111111
rootUri: Convert.pathToUri(projectPath),
112+
locale: atom.config.get("atom-i18n.locale") || "en",
112113
workspaceFolders: null,
113114
// The capabilities supported.
114115
// TODO the capabilities set to false/undefined are TODO. See {ls.ServerCapabilities} for a full list.

typings/atom/index.d.ts

+8-1
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,24 @@ import { Point, Notification, NotificationOptions, TextEditor } from "atom"
55
// need to be more specific here for TextEditor to keep its "class"
66
// status and not be demoted to "interface". Should revert this
77
// once the issue is fixed.
8+
// This is the same for all the following code
9+
810
declare module "atom/src/text-editor" {
911
interface TextEditor {
1012
getNonWordCharacters(position: Point): string
1113
}
1214
}
1315

14-
// NOTE: same here
1516
declare module "atom/src/notification" {
1617
/** Non-public Notification api */
1718
interface Notification {
1819
isDismissed?: () => boolean
1920
getOptions?: () => NotificationOptions | null
2021
}
2122
}
23+
24+
declare module "atom/src/config" {
25+
interface Config {
26+
get<T extends "atom-i18n.locale">(key: T): string
27+
}
28+
}

0 commit comments

Comments
 (0)