language_server-protocol 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +9 -0
  3. data/.travis.yml +5 -0
  4. data/CODE_OF_CONDUCT.md +74 -0
  5. data/Dockerfile-node.development +6 -0
  6. data/Dockerfile.development +14 -0
  7. data/Gemfile +6 -0
  8. data/LICENSE.txt +21 -0
  9. data/README.md +43 -0
  10. data/Rakefile +10 -0
  11. data/bin/console +14 -0
  12. data/bin/generate_files +5 -0
  13. data/bin/setup +8 -0
  14. data/language_server-protocol.gemspec +27 -0
  15. data/lib/language_server/protocol/constants/completion_item_kind.rb +29 -0
  16. data/lib/language_server/protocol/constants/diagnostic_severity.rb +24 -0
  17. data/lib/language_server/protocol/constants/document_highlight_kind.rb +23 -0
  18. data/lib/language_server/protocol/constants/error_codes.rb +18 -0
  19. data/lib/language_server/protocol/constants/file_change_type.rb +23 -0
  20. data/lib/language_server/protocol/constants/initialize_error.rb +15 -0
  21. data/lib/language_server/protocol/constants/insert_text_format.rb +27 -0
  22. data/lib/language_server/protocol/constants/message_type.rb +24 -0
  23. data/lib/language_server/protocol/constants/symbol_kind.rb +29 -0
  24. data/lib/language_server/protocol/constants/text_document_save_reason.rb +24 -0
  25. data/lib/language_server/protocol/constants/text_document_sync_kind.rb +26 -0
  26. data/lib/language_server/protocol/constants.rb +11 -0
  27. data/lib/language_server/protocol/interfaces/apply_workspace_edit_params.rb +29 -0
  28. data/lib/language_server/protocol/interfaces/apply_workspace_edit_response.rb +29 -0
  29. data/lib/language_server/protocol/interfaces/cancel_params.rb +29 -0
  30. data/lib/language_server/protocol/interfaces/client_capabilities.rb +47 -0
  31. data/lib/language_server/protocol/interfaces/code_action_context.rb +33 -0
  32. data/lib/language_server/protocol/interfaces/code_action_params.rb +50 -0
  33. data/lib/language_server/protocol/interfaces/code_lens.rb +55 -0
  34. data/lib/language_server/protocol/interfaces/code_lens_options.rb +32 -0
  35. data/lib/language_server/protocol/interfaces/code_lens_params.rb +29 -0
  36. data/lib/language_server/protocol/interfaces/code_lens_registration_options.rb +29 -0
  37. data/lib/language_server/protocol/interfaces/command.rb +48 -0
  38. data/lib/language_server/protocol/interfaces/completion_item.rb +145 -0
  39. data/lib/language_server/protocol/interfaces/completion_list.rb +43 -0
  40. data/lib/language_server/protocol/interfaces/completion_options.rb +42 -0
  41. data/lib/language_server/protocol/interfaces/completion_registration_options.rb +39 -0
  42. data/lib/language_server/protocol/interfaces/diagnostic.rb +67 -0
  43. data/lib/language_server/protocol/interfaces/did_change_configuration_params.rb +29 -0
  44. data/lib/language_server/protocol/interfaces/did_change_text_document_params.rb +40 -0
  45. data/lib/language_server/protocol/interfaces/did_change_watched_files_params.rb +29 -0
  46. data/lib/language_server/protocol/interfaces/did_close_text_document_params.rb +29 -0
  47. data/lib/language_server/protocol/interfaces/did_open_text_document_params.rb +29 -0
  48. data/lib/language_server/protocol/interfaces/did_save_text_document_params.rb +39 -0
  49. data/lib/language_server/protocol/interfaces/document_filter.rb +47 -0
  50. data/lib/language_server/protocol/interfaces/document_formatting_params.rb +38 -0
  51. data/lib/language_server/protocol/interfaces/document_highlight.rb +43 -0
  52. data/lib/language_server/protocol/interfaces/document_link.rb +42 -0
  53. data/lib/language_server/protocol/interfaces/document_link_options.rb +32 -0
  54. data/lib/language_server/protocol/interfaces/document_link_params.rb +29 -0
  55. data/lib/language_server/protocol/interfaces/document_link_registration_options.rb +29 -0
  56. data/lib/language_server/protocol/interfaces/document_on_type_formatting_options.rb +41 -0
  57. data/lib/language_server/protocol/interfaces/document_on_type_formatting_params.rb +56 -0
  58. data/lib/language_server/protocol/interfaces/document_on_type_formatting_registration_options.rb +38 -0
  59. data/lib/language_server/protocol/interfaces/document_range_formatting_params.rb +47 -0
  60. data/lib/language_server/protocol/interfaces/document_symbol_params.rb +29 -0
  61. data/lib/language_server/protocol/interfaces/execute_command_options.rb +32 -0
  62. data/lib/language_server/protocol/interfaces/execute_command_params.rb +38 -0
  63. data/lib/language_server/protocol/interfaces/execute_command_registration_options.rb +32 -0
  64. data/lib/language_server/protocol/interfaces/file_event.rb +41 -0
  65. data/lib/language_server/protocol/interfaces/formatting_options.rb +41 -0
  66. data/lib/language_server/protocol/interfaces/hover.rb +42 -0
  67. data/lib/language_server/protocol/interfaces/initialize_error.rb +35 -0
  68. data/lib/language_server/protocol/interfaces/initialize_params.rb +79 -0
  69. data/lib/language_server/protocol/interfaces/initialize_result.rb +29 -0
  70. data/lib/language_server/protocol/interfaces/location.rb +32 -0
  71. data/lib/language_server/protocol/interfaces/log_message_params.rb +38 -0
  72. data/lib/language_server/protocol/interfaces/message.rb +26 -0
  73. data/lib/language_server/protocol/interfaces/message_action_item.rb +29 -0
  74. data/lib/language_server/protocol/interfaces/notification_message.rb +38 -0
  75. data/lib/language_server/protocol/interfaces/parameter_information.rb +44 -0
  76. data/lib/language_server/protocol/interfaces/position.rb +38 -0
  77. data/lib/language_server/protocol/interfaces/publish_diagnostics_params.rb +38 -0
  78. data/lib/language_server/protocol/interfaces/range.rb +38 -0
  79. data/lib/language_server/protocol/interfaces/reference_context.rb +29 -0
  80. data/lib/language_server/protocol/interfaces/reference_params.rb +26 -0
  81. data/lib/language_server/protocol/interfaces/registration.rb +51 -0
  82. data/lib/language_server/protocol/interfaces/registration_params.rb +26 -0
  83. data/lib/language_server/protocol/interfaces/rename_params.rb +49 -0
  84. data/lib/language_server/protocol/interfaces/request_message.rb +47 -0
  85. data/lib/language_server/protocol/interfaces/response_error.rb +48 -0
  86. data/lib/language_server/protocol/interfaces/response_message.rb +48 -0
  87. data/lib/language_server/protocol/interfaces/save_options.rb +32 -0
  88. data/lib/language_server/protocol/interfaces/server_capabilities.rb +183 -0
  89. data/lib/language_server/protocol/interfaces/show_message_params.rb +38 -0
  90. data/lib/language_server/protocol/interfaces/show_message_request_params.rb +47 -0
  91. data/lib/language_server/protocol/interfaces/signature_help.rb +64 -0
  92. data/lib/language_server/protocol/interfaces/signature_help_options.rb +33 -0
  93. data/lib/language_server/protocol/interfaces/signature_help_registration_options.rb +30 -0
  94. data/lib/language_server/protocol/interfaces/signature_information.rb +54 -0
  95. data/lib/language_server/protocol/interfaces/symbol_information.rb +60 -0
  96. data/lib/language_server/protocol/interfaces/text_document_change_registration_options.rb +33 -0
  97. data/lib/language_server/protocol/interfaces/text_document_client_capabilities.rb +155 -0
  98. data/lib/language_server/protocol/interfaces/text_document_content_change_event.rb +51 -0
  99. data/lib/language_server/protocol/interfaces/text_document_edit.rb +38 -0
  100. data/lib/language_server/protocol/interfaces/text_document_identifier.rb +29 -0
  101. data/lib/language_server/protocol/interfaces/text_document_item.rb +57 -0
  102. data/lib/language_server/protocol/interfaces/text_document_position_params.rb +38 -0
  103. data/lib/language_server/protocol/interfaces/text_document_registration_options.rb +30 -0
  104. data/lib/language_server/protocol/interfaces/text_document_save_registration_options.rb +29 -0
  105. data/lib/language_server/protocol/interfaces/text_document_sync_options.rb +66 -0
  106. data/lib/language_server/protocol/interfaces/text_edit.rb +40 -0
  107. data/lib/language_server/protocol/interfaces/unregistration.rb +42 -0
  108. data/lib/language_server/protocol/interfaces/unregistration_params.rb +26 -0
  109. data/lib/language_server/protocol/interfaces/versioned_text_document_identifier.rb +29 -0
  110. data/lib/language_server/protocol/interfaces/will_save_text_document_params.rb +41 -0
  111. data/lib/language_server/protocol/interfaces/workspace_client_capabilites.rb +78 -0
  112. data/lib/language_server/protocol/interfaces/workspace_edit.rb +40 -0
  113. data/lib/language_server/protocol/interfaces/workspace_symbol_params.rb +32 -0
  114. data/lib/language_server/protocol/interfaces.rb +87 -0
  115. data/lib/language_server/protocol/transport/stdio/reader.rb +39 -0
  116. data/lib/language_server/protocol/transport/stdio/writer.rb +38 -0
  117. data/lib/language_server/protocol/transport/stdio.rb +2 -0
  118. data/lib/language_server/protocol/version.rb +5 -0
  119. data/lib/language_server/protocol.rb +7 -0
  120. data/package.json +10 -0
  121. data/scripts/generateFiles.ts +224 -0
  122. data/yarn.lock +293 -0
  123. metadata +207 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 7d941ec17ae7998d45058e8d9bd813ea1500072a
4
+ data.tar.gz: 31dccee17e2ad6f29405633e5c9a44492f76c5d0
5
+ SHA512:
6
+ metadata.gz: b573e09f97f0aef013911972eaacce6b47f49c824d8a3a66af7c1d207d5f3a20165adbeb28e0bf868178c8ba032deb9c1a3731e8d687f520edee113aca24b7ec
7
+ data.tar.gz: f8d4c6178d1a4ba12e1d21213b2f3fd52add3effc248b409f8dfecb4db61b386553ba947abf15b0975ba6e910dfc077f5aa482f5054dbece99990b2e9962b7af
data/.gitignore ADDED
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/.travis.yml ADDED
@@ -0,0 +1,5 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.4.1
5
+ before_install: gem install bundler -v 1.15.3
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at mtsmfm@gmail.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/
@@ -0,0 +1,6 @@
1
+ FROM node:6-alpine
2
+
3
+ RUN mkdir /app && chown node:node /app
4
+
5
+ USER node
6
+ WORKDIR /app
@@ -0,0 +1,14 @@
1
+ ARG RUBY_VERSION=2.4.1
2
+ FROM ruby:$RUBY_VERSION
3
+
4
+ RUN apt-get update && apt-get install less -y
5
+ RUN groupadd --gid 1000 ruby && useradd --uid 1000 --gid ruby --shell /bin/bash --create-home ruby
6
+ RUN mkdir /app && chown ruby:ruby /app
7
+
8
+ ENV LANG=C.UTF-8 \
9
+ BUNDLE_PATH=/app/vendor/bundle/$RUBY_VERSION \
10
+ BUNDLE_JOBS=4
11
+
12
+ USER ruby
13
+ WORKDIR /app
14
+ CMD ["bundle", "exec", "exe/language_server"]
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source "https://rubygems.org"
2
+
3
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ # Specify your gem's dependencies in language_server-protocol.gemspec
6
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2017 Fumiaki MATSUSHIMA
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,43 @@
1
+ # LanguageServer::Protocol
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/language_server/protocol`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'language_server-protocol'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install language_server-protocol
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/language_server-protocol. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
36
+
37
+ ## License
38
+
39
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
40
+
41
+ ## Code of Conduct
42
+
43
+ Everyone interacting in the LanguageServer::Protocol project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/language_server-protocol/blob/master/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ require "bundler/gem_tasks"
2
+ require "rake/testtask"
3
+
4
+ Rake::TestTask.new(:test) do |t|
5
+ t.libs << "test"
6
+ t.libs << "lib"
7
+ t.test_files = FileList["test/**/*_test.rb"]
8
+ end
9
+
10
+ task :default => :test
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "language_server/protocol"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env sh
2
+
3
+ set -ex
4
+ yarn install
5
+ yarn run -s ts-node scripts/generateFiles.ts
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,27 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path("../lib", __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "language_server/protocol/version"
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "language_server-protocol"
8
+ spec.version = LanguageServer::Protocol::VERSION
9
+ spec.authors = ["Fumiaki MATSUSHIMA"]
10
+ spec.email = ["mtsmfm@gmail.com"]
11
+
12
+ spec.summary = %q{A Language Server Protocol SDK}
13
+ spec.description = %q{A Language Server Protocol SDK}
14
+ spec.homepage = "https://github.com/mtsmfm/language_server-protocol-ruby"
15
+ spec.license = "MIT"
16
+
17
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
18
+ f.match(%r{^(test|spec|features)/})
19
+ end
20
+ spec.bindir = "exe"
21
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
+ spec.require_paths = ["lib"]
23
+
24
+ spec.add_development_dependency "bundler", "~> 1.15"
25
+ spec.add_development_dependency "rake", "~> 10.0"
26
+ spec.add_development_dependency "minitest", "~> 5.0"
27
+ end
@@ -0,0 +1,29 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Constants
4
+ #
5
+ # The kind of a completion entry.
6
+ #
7
+ module CompletionItemKind
8
+ TEXT = 1
9
+ METHOD = 2
10
+ FUNCTION = 3
11
+ CONSTRUCTOR = 4
12
+ FIELD = 5
13
+ VARIABLE = 6
14
+ CLASS = 7
15
+ INTERFACE = 8
16
+ MODULE = 9
17
+ PROPERTY = 10
18
+ UNIT = 11
19
+ VALUE = 12
20
+ ENUM = 13
21
+ KEYWORD = 14
22
+ SNIPPET = 15
23
+ COLOR = 16
24
+ FILE = 17
25
+ REFERENCE = 18
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,24 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Constants
4
+ module DiagnosticSeverity
5
+ #
6
+ # Reports an error.
7
+ #
8
+ ERROR = 1
9
+ #
10
+ # Reports a warning.
11
+ #
12
+ WARNING = 2
13
+ #
14
+ # Reports an information.
15
+ #
16
+ INFORMATION = 3
17
+ #
18
+ # Reports a hint.
19
+ #
20
+ HINT = 4
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,23 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Constants
4
+ #
5
+ # A document highlight kind.
6
+ #
7
+ module DocumentHighlightKind
8
+ #
9
+ # A textual occurrence.
10
+ #
11
+ TEXT = 1
12
+ #
13
+ # Read-access of a symbol, like reading a variable.
14
+ #
15
+ READ = 2
16
+ #
17
+ # Write-access of a symbol, like writing to a variable.
18
+ #
19
+ WRITE = 3
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,18 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Constants
4
+ module ErrorCodes
5
+ PARSE_ERROR = -32700
6
+ INVALID_REQUEST = -32600
7
+ METHOD_NOT_FOUND = -32601
8
+ INVALID_PARAMS = -32602
9
+ INTERNAL_ERROR = -32603
10
+ SERVER_ERROR_START = -32099
11
+ SERVER_ERROR_END = -32000
12
+ SERVER_NOT_INITIALIZED = -32002
13
+ UNKNOWN_ERROR_CODE = -32001
14
+ REQUEST_CANCELLED = -32800
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,23 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Constants
4
+ #
5
+ # The file event type.
6
+ #
7
+ module FileChangeType
8
+ #
9
+ # The file got created.
10
+ #
11
+ CREATED = 1
12
+ #
13
+ # The file got changed.
14
+ #
15
+ CHANGED = 2
16
+ #
17
+ # The file got deleted.
18
+ #
19
+ DELETED = 3
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,15 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Constants
4
+ #
5
+ # Known error codes for an `InitializeError`;
6
+ #
7
+ module InitializeError
8
+ #
9
+ # If the protocol version provided by the client can't be handled by the server.
10
+ #
11
+ UNKNOWN_PROTOCOL_VERSION = 1
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,27 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Constants
4
+ #
5
+ # Defines whether the insert text in a completion item should be interpreted as
6
+ # plain text or a snippet.
7
+ #
8
+ module InsertTextFormat
9
+ #
10
+ # The primary text to be inserted is treated as a plain string.
11
+ #
12
+ PLAIN_TEXT = 1
13
+ #
14
+ # The primary text to be inserted is treated as a snippet.
15
+ #
16
+ # A snippet can define tab stops and placeholders with `$1`, `$2`
17
+ # and `${3:foo}`. `$0` defines the final tab stop, it defaults to
18
+ # the end of the snippet. Placeholders with equal identifiers are linked,
19
+ # that is typing in one will update others too.
20
+ #
21
+ # See also: https://github.com/Microsoft/vscode/blob/master/src/vs/editor/contrib/snippet/common/snippet.md
22
+ #
23
+ SNIPPET = 2
24
+ end
25
+ end
26
+ end
27
+ end