How to use the vscode-languageserver-types.SymbolKind.Variable function in vscode-languageserver-types

To help you get started, we’ve selected a few vscode-languageserver-types examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github MaskRay / vscode-ccls / src / semantic.ts View on Github external
case SymbolKind.Namespace:
      return get('namespace');
    case SymbolKind.Class:
    case SymbolKind.Struct:
    case SymbolKind.Enum:
    case SymbolKind.TypeParameter:
      return get('type');
    case CclsSymbolKind.TypeAlias:
      return get('typeAlias');

    // Variables
    case SymbolKind.Field:
      if (symbol.storage === StorageClass.Static)
        return get('staticMemberVariable');
      return get('memberVariable');
    case SymbolKind.Variable:
      if (symbol.storage === StorageClass.Static)
        return get('staticVariable');
      if (symbol.parentKind === SymbolKind.File ||
          symbol.parentKind === SymbolKind.Namespace)
        return get('globalVariable');
      return get('variable');
    case SymbolKind.EnumMember:
      return get('enum');
    case CclsSymbolKind.Parameter:
      return get('parameter');
    case CclsSymbolKind.Macro:
      return get('macro');
    }
  }
github elastic / kibana / x-pack / plugins / code / public / components / symbol_tree / __test__ / __fixtures__ / props.ts View on Github external
export const props: { structureTree: SymbolWithMembers[] } = {
  structureTree: [
    {
      name: '"stack-control"',
      kind: SymbolKind.Module,
      location: {
        uri:
          'git://github.com/vmware/clarity/blob/master/src/clr-angular/data/stack-view/stack-control.ts',
        range: { start: { line: 0, character: 0 }, end: { line: 27, character: 0 } },
      },
      path: '"stack-control"',
      members: [
        {
          name: 'EventEmitter',
          kind: SymbolKind.Variable,
          location: {
            uri:
              'git://github.com/vmware/clarity/blob/master/src/clr-angular/data/stack-view/stack-control.ts',
            range: { start: { line: 9, character: 9 }, end: { line: 9, character: 21 } },
          },
          containerName: '"stack-control"',
          path: '"stack-control"/EventEmitter',
        },
        {
          name: 'ClrStackView',
          kind: SymbolKind.Variable,
          location: {
            uri:
              'git://github.com/vmware/clarity/blob/master/src/clr-angular/data/stack-view/stack-control.ts',
            range: { start: { line: 10, character: 9 }, end: { line: 10, character: 21 } },
          },
github elastic / kibana / x-pack / legacy / plugins / code / public / components / symbol_tree / __test__ / __fixtures__ / props.ts View on Github external
name: '"stack-control"',
      kind: SymbolKind.Module,
      range: { start: { line: 0, character: 0 }, end: { line: 27, character: 0 } },
      selectionRange: { start: { line: 0, character: 0 }, end: { line: 27, character: 0 } },
      path: '"stack-control"',
      members: [
        {
          name: 'EventEmitter',
          kind: SymbolKind.Variable,
          range: { start: { line: 9, character: 9 }, end: { line: 9, character: 21 } },
          selectionRange: { start: { line: 9, character: 9 }, end: { line: 9, character: 21 } },
          path: '"stack-control"/EventEmitter',
        },
        {
          name: 'ClrStackView',
          kind: SymbolKind.Variable,
          range: { start: { line: 10, character: 9 }, end: { line: 10, character: 21 } },
          selectionRange: { start: { line: 10, character: 9 }, end: { line: 10, character: 21 } },
          path: '"stack-control"/ClrStackView',
        },
        {
          name: 'StackControl',
          kind: SymbolKind.Class,
          range: { start: { line: 12, character: 0 }, end: { line: 26, character: 1 } },
          selectionRange: { start: { line: 12, character: 0 }, end: { line: 26, character: 1 } },
          path: '"stack-control"/StackControl',
          members: [
            {
              name: 'model',
              kind: SymbolKind.Property,
              range: { start: { line: 13, character: 2 }, end: { line: 13, character: 13 } },
              selectionRange: {
github elastic / kibana / x-pack / legacy / plugins / code / public / components / symbol_tree / __test__ / __fixtures__ / props.ts View on Github external
import { SymbolWithMembers } from '../../../../actions/structure';

export const props: { structureTree: SymbolWithMembers[]; uri: string } = {
  uri:
    'git://github.com/vmware/clarity/blob/master/src/clr-angular/data/stack-view/stack-control.ts',
  structureTree: [
    {
      name: '"stack-control"',
      kind: SymbolKind.Module,
      range: { start: { line: 0, character: 0 }, end: { line: 27, character: 0 } },
      selectionRange: { start: { line: 0, character: 0 }, end: { line: 27, character: 0 } },
      path: '"stack-control"',
      members: [
        {
          name: 'EventEmitter',
          kind: SymbolKind.Variable,
          range: { start: { line: 9, character: 9 }, end: { line: 9, character: 21 } },
          selectionRange: { start: { line: 9, character: 9 }, end: { line: 9, character: 21 } },
          path: '"stack-control"/EventEmitter',
        },
        {
          name: 'ClrStackView',
          kind: SymbolKind.Variable,
          range: { start: { line: 10, character: 9 }, end: { line: 10, character: 21 } },
          selectionRange: { start: { line: 10, character: 9 }, end: { line: 10, character: 21 } },
          path: '"stack-control"/ClrStackView',
        },
        {
          name: 'StackControl',
          kind: SymbolKind.Class,
          range: { start: { line: 12, character: 0 }, end: { line: 26, character: 1 } },
          selectionRange: { start: { line: 12, character: 0 }, end: { line: 26, character: 1 } },
github elastic / kibana / x-pack / plugins / code / public / components / symbol_tree / __test__ / __fixtures__ / props.ts View on Github external
path: '"stack-control"',
      members: [
        {
          name: 'EventEmitter',
          kind: SymbolKind.Variable,
          location: {
            uri:
              'git://github.com/vmware/clarity/blob/master/src/clr-angular/data/stack-view/stack-control.ts',
            range: { start: { line: 9, character: 9 }, end: { line: 9, character: 21 } },
          },
          containerName: '"stack-control"',
          path: '"stack-control"/EventEmitter',
        },
        {
          name: 'ClrStackView',
          kind: SymbolKind.Variable,
          location: {
            uri:
              'git://github.com/vmware/clarity/blob/master/src/clr-angular/data/stack-view/stack-control.ts',
            range: { start: { line: 10, character: 9 }, end: { line: 10, character: 21 } },
          },
          containerName: '"stack-control"',
          path: '"stack-control"/ClrStackView',
        },
        {
          name: 'StackControl',
          kind: SymbolKind.Class,
          location: {
            uri:
              'git://github.com/vmware/clarity/blob/master/src/clr-angular/data/stack-view/stack-control.ts',
            range: { start: { line: 12, character: 0 }, end: { line: 26, character: 1 } },
          },
github vuejs / vetur / server / src / modes / script / javascript.ts View on Github external
case 'enum':
      return SymbolKind.Enum;
    case 'module':
      return SymbolKind.Module;
    case 'class':
      return SymbolKind.Class;
    case 'interface':
      return SymbolKind.Interface;
    case 'method':
      return SymbolKind.Method;
    case 'property':
    case 'getter':
    case 'setter':
      return SymbolKind.Property;
  }
  return SymbolKind.Variable;
}
github codesandbox / codesandbox-client / standalone-packages / vscode-extensions / out / extensions / jpoissonnier.vscode-styled-components-0.0.26 / node_modules / vscode-css-languageservice / lib / esm / services / cssNavigation.js View on Github external
kind: SymbolKind.Class,
                location: null
            };
            var locationNode = node;
            if (node instanceof nodes.Selector) {
                entry.name = node.getText();
                locationNode = node.findAParent(nodes.NodeType.Ruleset, nodes.NodeType.ExtendsReference);
                if (locationNode) {
                    entry.location = Location.create(document.uri, getRange(locationNode, document));
                    result.push(entry);
                }
                return false;
            }
            else if (node instanceof nodes.VariableDeclaration) {
                entry.name = node.getName();
                entry.kind = SymbolKind.Variable;
            }
            else if (node instanceof nodes.MixinDeclaration) {
                entry.name = node.getName();
                entry.kind = SymbolKind.Method;
            }
            else if (node instanceof nodes.FunctionDeclaration) {
                entry.name = node.getName();
                entry.kind = SymbolKind.Function;
            }
            else if (node instanceof nodes.Keyframe) {
                entry.name = localize('literal.keyframes', "@keyframes {0}", node.getName());
            }
            else if (node instanceof nodes.FontFace) {
                entry.name = localize('literal.fontface', "@font-face");
            }
            if (entry.name) {
github vuejs / vetur / server / src / modes / style / stylus / symbols-finder.ts View on Github external
function _variableSymbol(node: StylusNode, text: string[]): SymbolInformation {
  const name = node.name;
  const lineno = Number(node.val!.lineno) - 1;
  const column = Math.max(text[lineno].indexOf(name), 0);
  const range = Range.create(lineno, column, lineno, column + name.length);

  return SymbolInformation.create(name, SymbolKind.Variable, range);
}
github neoclide / coc-html / server / modes / javascriptMode.ts View on Github external
case 'enum':
			return SymbolKind.Enum;
		case 'module':
			return SymbolKind.Module;
		case 'class':
			return SymbolKind.Class;
		case 'interface':
			return SymbolKind.Interface;
		case 'method':
			return SymbolKind.Method;
		case 'property':
		case 'getter':
		case 'setter':
			return SymbolKind.Property;
	}
	return SymbolKind.Variable;
}