enum LSProtocol::LanguageKind

Overview

Predefined Language kinds @since 3.18.0 @proposed

Defined in:

lsprotocol/types.cr

Enum Members

Abap = 0
WindowsBat = 1
BibTeX = 2
Clojure = 3
Coffeescript = 4
C = 5
Cpp = 6
CSharp = 7
Css = 8
D = 9

@since 3.18.0 @proposed

Delphi = 10

@since 3.18.0 @proposed

Diff = 11
Dart = 12
Dockerfile = 13
Elixir = 14
Erlang = 15
FSharp = 16
GitCommit = 17
GitRebase = 18
Go = 19
Groovy = 20
Handlebars = 21
Haskell = 22
Html = 23
Ini = 24
Java = 25
JavaScript = 26
JavaScriptReact = 27
Json = 28
LaTeX = 29
Less = 30
Lua = 31
Makefile = 32
Markdown = 33
ObjectiveC = 34
ObjectiveCpp = 35
Pascal = 36

@since 3.18.0 @proposed

Perl = 37
Perl6 = 38
Php = 39
Powershell = 40
Pug = 41
Python = 42
R = 43
Razor = 44
Ruby = 45
Rust = 46
Scss = 47
Sass = 48
Scala = 49
ShaderLab = 50
ShellScript = 51
Sql = 52
Swift = 53
TypeScript = 54
TypeScriptReact = 55
TeX = 56
VisualBasic = 57
Xml = 58
Xsl = 59
Yaml = 60

Constructors

Instance Method Summary

Constructor Detail

def self.from_json(pull : JSON::PullParser) : self #

[View source]
def self.new(pull : JSON::PullParser) : self #

[View source]
def self.parse(string : String) : self #

[View source]

Instance Method Detail

def abap? #

[View source]
def bib_te_x? #

[View source]
def c? #

[View source]
def c_sharp? #

[View source]
def clojure? #

[View source]
def coffeescript? #

[View source]
def cpp? #

[View source]
def css? #

[View source]
def d? #

[View source]
def dart? #

[View source]
def delphi? #

[View source]
def diff? #

[View source]
def dockerfile? #

[View source]
def elixir? #

[View source]
def erlang? #

[View source]
def f_sharp? #

[View source]
def git_commit? #

[View source]
def git_rebase? #

[View source]
def go? #

[View source]
def groovy? #

[View source]
def handlebars? #

[View source]
def haskell? #

[View source]
def html? #

[View source]
def ini? #

[View source]
def java? #

[View source]
def java_script? #

[View source]
def java_script_react? #

[View source]
def json? #

[View source]
def la_te_x? #

[View source]
def less? #

[View source]
def lua? #

[View source]
def makefile? #

[View source]
def markdown? #

[View source]
def objective_c? #

[View source]
def objective_cpp? #

[View source]
def pascal? #

[View source]
def perl6? #

[View source]
def perl? #

[View source]
def php? #

[View source]
def powershell? #

[View source]
def pug? #

[View source]
def python? #

[View source]
def r? #

[View source]
def razor? #

[View source]
def ruby? #

[View source]
def rust? #

[View source]
def sass? #

[View source]
def scala? #

[View source]
def scss? #

[View source]
def shader_lab? #

[View source]
def shell_script? #

[View source]
def sql? #

[View source]
def swift? #

[View source]
def te_x? #

[View source]
def to_json(builder : JSON::Builder) #
Description copied from struct Enum

Serializes this enum member by name.

For non-flags enums, the serialization is a JSON string. The value is the member name (see #to_s) transformed with String#underscore.

enum Stages
  INITIAL
  SECOND_STAGE
end

Stages::INITIAL.to_json      # => %("initial")
Stages::SECOND_STAGE.to_json # => %("second_stage")

For flags enums, the serialization is a JSON array including every flagged member individually serialized in the same way as a member of a non-flags enum. None is serialized as an empty array, All as an array containing all members.

@[Flags]
enum Sides
  LEFT
  RIGHT
end

Sides::LEFT.to_json                  # => %(["left"])
(Sides::LEFT | Sides::RIGHT).to_json # => %(["left","right"])
Sides::All.to_json                   # => %(["left","right"])
Sides::None.to_json                  # => %([])

ValueConverter.to_json offers a different serialization strategy based on the member value.


[View source]
def to_s(io : IO) : Nil #
Description copied from struct Enum

Appends a String representation of this enum member to the given io.

See also: #to_s.


[View source]
def to_s : String #
Description copied from struct Enum

Returns a String representation of this enum member. In the case of regular enums, this is just the name of the member. In the case of flag enums, it's the names joined by vertical bars, or "None", if the value is zero.

If an enum's value doesn't match a member's value, the raw value is returned as a string.

Color::Red.to_s                     # => "Red"
IOMode::None.to_s                   # => "None"
(IOMode::Read | IOMode::Write).to_s # => "Read | Write"

Color.new(10).to_s # => "10"

[View source]
def type_script? #

[View source]
def type_script_react? #

[View source]
def visual_basic? #

[View source]
def windows_bat? #

[View source]
def xml? #

[View source]
def xsl? #

[View source]
def yaml? #

[View source]