Skip to content

Commit 35fbf73

Browse files
committed
fix: remove lodash from utils
1 parent 8e37e84 commit 35fbf73

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/utils.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
} from "atom";
99
import React from "react";
1010
import ReactDOM from "react-dom";
11-
import _ from "lodash";
11+
import findKey from "lodash/findKey";
1212
import os from "os";
1313
import path from "path";
1414
import Config from "./config";
@@ -76,7 +76,7 @@ export function grammarToLanguage(grammar: Grammar | null | undefined) {
7676
const grammarLanguage = grammar.name.toLowerCase();
7777
const mappings = Config.getJson("languageMappings");
7878

79-
const kernelLanguage = _.findKey(
79+
const kernelLanguage = findKey(
8080
mappings,
8181
(l) => l.toLowerCase() === grammarLanguage
8282
);
@@ -174,7 +174,7 @@ export function getEmbeddedScope(
174174
const scopes = editor
175175
.scopeDescriptorForBufferPosition(position)
176176
.getScopesArray();
177-
return _.find(scopes, (s) => s.indexOf("source.embedded.") === 0);
177+
return scopes.find((s) => s.indexOf("source.embedded.") === 0);
178178
}
179179
export function getEditorDirectory(editor: TextEditor | null | undefined) {
180180
if (!editor) {

0 commit comments

Comments
 (0)