Skip to content

Commit

Permalink
[#98] Add SymbolTag values for access modifiers and other modifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
travkin79 committed Nov 15, 2024
1 parent 2344e6a commit df54989
Show file tree
Hide file tree
Showing 2 changed files with 234 additions and 3 deletions.
120 changes: 118 additions & 2 deletions _specifications/lsp/3.18/language/documentSymbol.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,127 @@ export namespace SymbolTag {

/**
* Render a symbol as obsolete, usually using a strike-out.
* @since 3.16
*/
export const Deprecated: 1 = 1;
export const Deprecated = 1;

/**
* Render a symbol with visibility / access modifier "private".
* @since 3.18
*/
export const Private = 2;

/**
* Render a symbol with visibility "package private", e.g. in Java.
* @since 3.18
*/
export const Package = 3;

/**
* Render a symbol with visibility / access modifier "protected".
* The modifier could be combined e.g. with "internal" or "private" in languages like C#.
* @since 3.18
*/
export const Protected = 4;

/**
* Render a symbol with visibility / access modifier "public".
* @since 3.18
*/
export const Public = 5;

/**
* Render a symbol with visibility / access modifier "internal", e.g. in C# or Kotlin.
* @since 3.18
*/
export const Internal= 6;

/**
* Render a symbol with visibility / access modifier "file", e.g. in C#.
* @since 3.18
*/
export const File = 7;

/**
* Render a symbol as "static".
* @since 3.18
*/
export const Static = 8;

/**
* Render a symbol as "abstract".
* @since 3.18
*/
export const Abstract = 9;

/**
* Render a symbol as "final".
* @since 3.18
*/
export const Final = 10;

/**
* Render a symbol as "sealed", e.g. classes and interfaces in Kotlin.
* @since 3.18
*/
export const Sealed = 11;

/**
* Render a symbol as "transient", e.g. in Java.
* @since 3.18
*/
export const Transient = 12;

/**
* Render a symbol as "volatile", e.g. in Java.
* @since 3.18
*/
export const Volatile = 13;

/**
* Render a symbol as "synchronized", e.g. in Java.
* @since 3.18
*/
export const Synchronized = 14;

/**
* Render a symbol as "virtual", e.g. in C++.
* @since 3.18
*/
export const Virtual = 15;

/**
* Render a symbol as "nullable", e.g. types with '?' in Kotlin.
* @since 3.18
*/
export const Nullable = 16;

/**
* Render a symbol as "never null", e.g. types without '?' in Kotlin.
* @since 3.18
*/
export const NonNull = 17;

/**
* Render a symbol as declaration.
* @since 3.18
*/
export const Declaration = 18;

/**
* Render a symbol as definition (in contrast to declaration), e.g. in header files in C++.
* @since 3.18
*/
export const Definition = 19;

/**
* Render a symbol as "read-only", i.e. variables / properties that cannot be changed.
* @since 3.18
*/
export const ReadOnly = 20;
}

export type SymbolTag = 1;
export type SymbolTag = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20;
```

<div class="anchorHolder"><a href="#documentSymbol" name="documentSymbol" class="linkableAnchor"></a></div>
Expand Down
117 changes: 116 additions & 1 deletion _specifications/lsp/3.18/metaModel/metaModel.json
Original file line number Diff line number Diff line change
Expand Up @@ -14164,7 +14164,122 @@
{
"name": "Deprecated",
"value": 1,
"documentation": "Render a symbol as obsolete, usually using a strike-out."
"documentation": "Render a symbol as obsolete, usually using a strike-out.",
"since": "3.16"
},
{
"name": "Private",
"value": 2,
"documentation": "Render a symbol with visibility / access modifier \"private\".",
"since": "3.18"
},
{
"name": "Package",
"value": 3,
"documentation": "Render a symbol with visibility \"package private\", e.g. in Java.",
"since": "3.18"
},
{
"name": "Protected",
"value": 4,
"documentation": "Render a symbol with visibility / access modifier \"protected\". The modifier could be combined e.g. with \"internal\" or \"private\" in languages like C#.",
"since": "3.18"
},
{
"name": "Public",
"value": 5,
"documentation": "Render a symbol with visibility / access modifier \"public\".",
"since": "3.18"
},
{
"name": "Internal",
"value": 6,
"documentation": "Render a symbol with visibility / access modifier \"internal\", e.g. in C# or Kotlin.",
"since": "3.18"
},
{
"name": "File",
"value": 7,
"documentation": "Render a symbol with visibility / access modifier \"file\", e.g. in C#.",
"since": "3.18"
},
{
"name": "Static",
"value": 8,
"documentation": "Render a symbol as \"static\".",
"since": "3.18"
},
{
"name": "Abstract",
"value": 9,
"documentation": "Render a symbol as \"abstract\".",
"since": "3.18"
},
{
"name": "Final",
"value": 10,
"documentation": "Render a symbol as \"final\".",
"since": "3.18"
},
{
"name": "Sealed",
"value": 11,
"documentation": "Render a symbol as \"sealed\", e.g. classes and interfaces in Kotlin.",
"since": "3.18"
},
{
"name": "Transient",
"value": 12,
"documentation": "Render a symbol as \"transient\", e.g. in Java.",
"since": "3.18"
},
{
"name": "Volatile",
"value": 13,
"documentation": "Render a symbol as \"volatile\", e.g. in Java.",
"since": "3.18"
},
{
"name": "Synchronized",
"value": 14,
"documentation": "Render a symbol as \"synchronized\", e.g. in Java.",
"since": "3.18"
},
{
"name": "Virtual",
"value": 15,
"documentation": "Render a symbol as \"virtual\", e.g. in C++.",
"since": "3.18"
},
{
"name": "Nullable",
"value": 16,
"documentation": "Render a symbol as \"nullable\", e.g. types with '?' in Kotlin.",
"since": "3.18"
},
{
"name": "NonNull",
"value": 17,
"documentation": "Render a symbol as \"never null\", e.g. types without '?' in Kotlin.",
"since": "3.18"
},
{
"name": "Declaration",
"value": 18,
"documentation": "Render a symbol as declaration.",
"since": "3.18"
},
{
"name": "Definition",
"value": 19,
"documentation": "Render a symbol as definition (in contrast to declaration), e.g. in header files in C++.",
"since": "3.18"
},
{
"name": "ReadOnly",
"value": 20,
"documentation": "Render a symbol as \"read-only\", i.e. variables / properties that cannot be changed.",
"since": "3.18"
}
],
"documentation": "Symbol tags are extra annotations that tweak the rendering of a symbol.\n\n@since 3.16",
Expand Down

0 comments on commit df54989

Please sign in to comment.