Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Last field in object have wrong text color #49

Open
kytosai opened this issue Mar 1, 2023 · 2 comments
Open

Last field in object have wrong text color #49

kytosai opened this issue Mar 1, 2023 · 2 comments

Comments

@kytosai
Copy link

kytosai commented Mar 1, 2023

Example code:

import { GeneralOption, ICompany } from 'src/types';
import { RequestBase, ResponseBase } from 'src/utils';
import { api } from 'src/utils/api';

export const commonApi = api.injectEndpoints({
  endpoints: (build) => ({
    getProductCompanyList: build.query<
      ResponseBase<ICompany[]>,
      { search?: string; page?: number }
    >({
      query: ({
        search = '',
        page = -1,
      }: {
        search?: string;
        page?: number;
      }) => {
        return {
          url: `/products/companies`,
          method: 'GET',
          params: { search: search || null, page },
        };
      },
    }),
    getPaymentMethods: build.query<
      ResponseBase<GeneralOption[]>,
      RequestBase & { default?: number }
    >({
      query: (params) => {
        return {
          url: `/purchase-orders/payment-methods`,
          method: 'GET',
          params,
        };
      },
    }),
  }),
  overrideExisting: false,
});

export const { useGetProductCompanyListQuery, useGetPaymentMethodsQuery } =
  commonApi;

Screenshot:

image

@kytosai kytosai changed the title Last field in object hava wrong text color Last field in object have wrong text color Mar 1, 2023
@hichemfantar
Copy link

Looks fine to me, just reload vscode. Sometimes it breaks like that.

@Noxarro
Copy link

Noxarro commented May 12, 2024

@kytosai

I had the same issue. Turns out adding this to your settings.json fixes the issue:

"editor.semanticHighlighting.enabled": false

source: https://stackoverflow.com/questions/70919562/what-does-it-mean-when-a-textmate-scope-is-strikethrough-text-in-vscode-tokens

I think this has to do with Semantic Coloring getting added. Here is an excerpt from the docs:

Semantic coloring in Color Themes
Two new properties have been added to the Color Theme file format in order to support highlighting based on semantic tokens.

The property semanticHighlighting defines whether the theme is ready for highlighting using semantic tokens. It is false by default, but we encourage all themes to enable it. The property is used when the setting editor.semanticHighlighting.enabled is set to configuredByTheme.

The property semanticTokenColors allows a theme to define new coloring rules that match against the semantic token types and modifiers that are emitted by the semantic token providers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants