Skip to content

Commit

Permalink
enable slang features unconditionally (#598)
Browse files Browse the repository at this point in the history
  • Loading branch information
OmarTawfik authored Sep 16, 2024
1 parent 8fd2794 commit d8d3408
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 97 deletions.
76 changes: 0 additions & 76 deletions server/src/services/initialization/featureFlags.ts

This file was deleted.

24 changes: 3 additions & 21 deletions server/src/services/initialization/onInitialize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { tokensTypes } from "../semanticHighlight/tokenTypes";
import { isSlangSupported } from "../../parser/slangHelpers";
import { indexWorkspaceFolders } from "./indexWorkspaceFolders";
import { updateAvailableSolcVersions } from "./updateAvailableSolcVersions";
import { fetchFeatureFlags, isFeatureEnabled } from "./featureFlags";

export const onInitialize = (serverState: ServerState) => {
const { logger } = serverState;
Expand Down Expand Up @@ -43,29 +42,12 @@ export const onInitialize = (serverState: ServerState) => {
workspaceFolders,
});

// fetch available solidity versions and feature flags
const [flags, _] = await Promise.all([
fetchFeatureFlags(serverState),
updateAvailableSolcVersions(serverState),
]);
await updateAvailableSolcVersions(serverState);

logger.info("Language server ready");

const slangSupported = isSlangSupported();

const semanticTokensEnabled = isFeatureEnabled(
serverState,
flags,
"semanticHighlighting",
machineId
);

const documentSymbolsEnabled = isFeatureEnabled(
serverState,
flags,
"documentSymbol",
machineId
);
// Index and analysis
await serverState.telemetry.trackTiming("indexing", async (transaction) => {
await indexWorkspaceFolders(
Expand Down Expand Up @@ -106,9 +88,9 @@ export const onInitialize = (serverState: ServerState) => {
tokenModifiers: [],
},
range: false,
full: slangSupported && semanticTokensEnabled,
full: slangSupported,
},
documentSymbolProvider: slangSupported && documentSymbolsEnabled,
documentSymbolProvider: slangSupported,
workspace: {
workspaceFolders: {
supported: false,
Expand Down

0 comments on commit d8d3408

Please sign in to comment.