Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
machty committed Jan 9, 2025
1 parent f36441a commit 7d797fe
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/core/src/volar/language-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ import { offsetToPosition } from '../language-server/util/position.js';
import { Disposable } from '@volar/language-service';

const connection = createConnection();

const server = createServer(connection);

const EXTENSIONS = ['js', 'ts', 'gjs', 'gts', 'hbs'];

/**
* Handle the `initialize` request from the client. This is the first request sent by the client to
* the server. It includes the set of capabilities supported by the client as well as
Expand All @@ -36,8 +37,8 @@ const server = createServer(connection);
connection.onInitialize((parameters) => {
// Not sure how tsLocalized is used.
const tsLocalized = undefined;
const watchingExtensions = new Set<string>();
let fileWatcher: Promise<Disposable> | undefined;
const watchingExtensions = new Set<string>();
let fileWatcher: Promise<Disposable> | undefined;

const project = createTypeScriptProject(ts, tsLocalized, (projectContext) => {
const configFileName = projectContext.configFileName;
Expand Down Expand Up @@ -111,9 +112,8 @@ connection.onInitialize((parameters) => {
}),
);

function updateFileWatcher() {
const extensions = ['js', 'ts', 'gjs', 'gts', 'hbs'];
const newExtensions = extensions.filter((ext) => !watchingExtensions.has(ext));
function updateFileWatcher(): void {
const newExtensions = EXTENSIONS.filter((ext) => !watchingExtensions.has(ext));
if (newExtensions.length) {
for (const ext of newExtensions) {
watchingExtensions.add(ext);
Expand Down

0 comments on commit 7d797fe

Please sign in to comment.