language_server-protocol 3.12.0.0 → 3.14.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/Dockerfile.development +1 -1
  4. data/circle.yml +28 -10
  5. data/docker-compose.ci.yml +7 -5
  6. data/docker-compose.override.yml +8 -4
  7. data/docker-compose.yml +20 -12
  8. data/lib/language_server/protocol/constant/error_codes.rb +1 -0
  9. data/lib/language_server/protocol/constant/failure_handling_kind.rb +29 -0
  10. data/lib/language_server/protocol/constant/resource_operation_kind.rb +23 -0
  11. data/lib/language_server/protocol/constant.rb +4 -0
  12. data/lib/language_server/protocol/interface/create_file.rb +54 -0
  13. data/lib/language_server/protocol/interface/create_file_options.rb +45 -0
  14. data/lib/language_server/protocol/interface/delete_file.rb +54 -0
  15. data/lib/language_server/protocol/interface/delete_file_options.rb +45 -0
  16. data/lib/language_server/protocol/interface/did_change_text_document_params.rb +1 -1
  17. data/lib/language_server/protocol/interface/document_filter.rb +8 -0
  18. data/lib/language_server/protocol/interface/file_system_watcher.rb +9 -1
  19. data/lib/language_server/protocol/interface/{folding_range_request_param.rb → folding_range_params.rb} +1 -1
  20. data/lib/language_server/protocol/interface/location_link.rb +63 -0
  21. data/lib/language_server/protocol/interface/markup_content.rb +1 -1
  22. data/lib/language_server/protocol/interface/parameter_information.rb +9 -3
  23. data/lib/language_server/protocol/interface/rename_file.rb +63 -0
  24. data/lib/language_server/protocol/interface/rename_file_options.rb +45 -0
  25. data/lib/language_server/protocol/interface/text_document_client_capabilities.rb +17 -6
  26. data/lib/language_server/protocol/interface/versioned_text_document_identifier.rb +4 -1
  27. data/lib/language_server/protocol/interface/workspace_client_capabilities.rb +1 -1
  28. data/lib/language_server/protocol/interface/workspace_edit.rb +10 -4
  29. data/lib/language_server/protocol/interface.rb +16 -2
  30. data/lib/language_server/protocol/version.rb +1 -1
  31. data/scripts/generateFiles.ts +1 -1
  32. metadata +13 -6
  33. data/lib/language_server/protocol/interface/workspace_client_capabilites.rb +0 -82
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dd4c303397da016e02bccf930e4910d2e185c989028786621b2a85c4c25ed371
4
- data.tar.gz: 2b87beb7052a1fbfe3668b317624900c83e10d87349f7092490b89dcd1199c0f
3
+ metadata.gz: 5176de1e7f223ecd27f7b85449a9c0f8ff07405a6cd87fb79f5ca56de532b170
4
+ data.tar.gz: 6702521a27fe19bd8c56f94341066ca06c92e47d5f749451c3dddfc7947dbfba
5
5
  SHA512:
6
- metadata.gz: 53fa2f0da9a2fd581fa3df068d695327077f8b8ece242f9659a3aa75a5fdbcea6a84ed0ded4447b7463816f9586dbbafec45a1e32f65d38f4307c0ac740bccb4
7
- data.tar.gz: bbda94c4c9a50645b207791c345584423a90b3e1b86f94f299376009678e331466e5615f78c73a9871eb92fd16348ac336d93eaf9f054b162f80589e316f54f9
6
+ metadata.gz: a39910787614a138d310a1d7808124671e79c519322602126a10abcf79571dd3fe7d53e56c117eb13fb6e116f1a87f1463dc7a732c4032139ba54b51c923c8fe
7
+ data.tar.gz: 9effbc1ef1149b92d38229561a0b0f1d86d4d80218d4c1bc8901ef5dceab60e0f08780440dc4f2bae0d20a4d2b3e75780be5cfae752441f112d1431a17f4bded
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Change log
2
2
 
3
+ ## 3.14.0.0
4
+
5
+ - Update Language Server Protocol version to 3.14.0
6
+
3
7
  ## 3.12.0.0
4
8
 
5
9
  - Update Language Server Protocol version to 3.12.0
@@ -1,4 +1,4 @@
1
- ARG RUBY_VERSION=2.5.1
1
+ ARG RUBY_VERSION
2
2
  FROM ruby:$RUBY_VERSION
3
3
 
4
4
  RUN apt-get update && apt-get install less -y
data/circle.yml CHANGED
@@ -1,14 +1,13 @@
1
- version: 2
2
- jobs:
3
- build:
1
+ version: 2.0
2
+ references:
3
+ test: &test
4
4
  docker:
5
5
  - image: tmaier/docker-compose
6
6
  environment:
7
7
  COMPOSE_FILE: docker-compose.yml:docker-compose.ci.yml
8
8
  steps:
9
9
  - checkout
10
- - setup_remote_docker:
11
- version: 17.05.0-ce
10
+ - setup_remote_docker
12
11
  - run:
13
12
  name: setup
14
13
  command: |
@@ -18,11 +17,30 @@ jobs:
18
17
  docker create -v project:/app --name project busybox chown -R 1000:1000 /app
19
18
  docker cp . project:/app
20
19
  docker start project
21
- docker-compose build
20
+ docker-compose build $CIRCLE_JOB
22
21
  - run:
23
22
  name: test
24
23
  command: |
25
- docker-compose run app bundle exec rake test
26
- docker-compose run ruby-2-4 bundle exec rake test
27
- docker-compose run ruby-2-3 bundle exec rake test
28
- docker-compose run ruby-2-2 bundle exec rake test
24
+ docker-compose run $CIRCLE_JOB bundle exec rake test
25
+
26
+ jobs:
27
+ ruby-2-6:
28
+ <<: *test
29
+ ruby-2-5:
30
+ <<: *test
31
+ ruby-2-4:
32
+ <<: *test
33
+ ruby-2-3:
34
+ <<: *test
35
+ ruby-2-2:
36
+ <<: *test
37
+
38
+ workflows:
39
+ version: 2
40
+ test_and_buld:
41
+ jobs:
42
+ - ruby-2-6
43
+ - ruby-2-5
44
+ - ruby-2-4
45
+ - ruby-2-3
46
+ - ruby-2-2
@@ -1,16 +1,18 @@
1
1
  version: "3.0"
2
2
  services:
3
- app: &app
3
+ ruby-2-6: &latest
4
4
  volumes:
5
5
  - project:/app
6
+ ruby-2-5:
7
+ <<: *latest
6
8
  ruby-2-4:
7
- <<: *app
9
+ <<: *latest
8
10
  ruby-2-3:
9
- <<: *app
11
+ <<: *latest
10
12
  ruby-2-2:
11
- <<: *app
13
+ <<: *latest
12
14
  node:
13
- <<: *app
15
+ <<: *latest
14
16
  volumes:
15
17
  project:
16
18
  external: true
@@ -1,15 +1,19 @@
1
- version: '3.0'
1
+ version: "3.0"
2
2
  services:
3
- app: &app
3
+ ruby-2-6: &latest
4
4
  volumes:
5
5
  - .:/app:cached
6
6
  - $HOME/.gitconfig:/home/ruby/.gitconfig:ro
7
7
  - $HOME/.ssh:/home/ruby/.ssh:ro
8
8
  - $HOME/.gem:/home/ruby/.gem
9
+ ruby-2-5:
10
+ <<: *latest
11
+ ruby-2-4:
12
+ <<: *latest
9
13
  ruby-2-3:
10
- <<: *app
14
+ <<: *latest
11
15
  ruby-2-2:
12
- <<: *app
16
+ <<: *latest
13
17
  node:
14
18
  volumes:
15
19
  - .:/app:cached
data/docker-compose.yml CHANGED
@@ -1,28 +1,36 @@
1
1
  version: "3.0"
2
2
  services:
3
- app: &app
4
- build: &app-build
3
+ ruby-2-6: &latest
4
+ build: &build
5
5
  context: .
6
6
  dockerfile: Dockerfile.development
7
+ args:
8
+ RUBY_VERSION: 2.6.0
7
9
  volumes:
8
10
  - vendor:/vendor
9
11
  - home:/home/ruby
12
+ ruby-2-5:
13
+ <<: *latest
14
+ build:
15
+ <<: *build
16
+ args:
17
+ RUBY_VERSION: 2.5.3
10
18
  ruby-2-4:
11
- <<: *app
19
+ <<: *latest
12
20
  build:
13
- <<: *app-build
21
+ <<: *build
14
22
  args:
15
- RUBY_VERSION: 2.4.4
23
+ RUBY_VERSION: 2.4.5
16
24
  ruby-2-3:
17
- <<: *app
25
+ <<: *latest
18
26
  build:
19
- <<: *app-build
27
+ <<: *build
20
28
  args:
21
- RUBY_VERSION: 2.3.7
29
+ RUBY_VERSION: 2.3.8
22
30
  ruby-2-2:
23
- <<: *app
31
+ <<: *latest
24
32
  build:
25
- <<: *app-build
33
+ <<: *build
26
34
  args:
27
35
  RUBY_VERSION: 2.2.10
28
36
  node:
@@ -33,5 +41,5 @@ services:
33
41
  - vendor:/vendor
34
42
  - home:/home/node
35
43
  volumes:
36
- ? vendor
37
- ? home
44
+ vendor:
45
+ home:
@@ -12,6 +12,7 @@ module LanguageServer
12
12
  SERVER_NOT_INITIALIZED = -32002
13
13
  UNKNOWN_ERROR_CODE = -32001
14
14
  REQUEST_CANCELLED = -32800
15
+ CONTENT_MODIFIED = -32801
15
16
  end
16
17
  end
17
18
  end
@@ -0,0 +1,29 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Constant
4
+ module FailureHandlingKind
5
+ #
6
+ # Applying the workspace change is simply aborted if one of the changes provided
7
+ # fails. All operations executed before the failing operation stay executed.
8
+ #
9
+ ABORT = 'abort'
10
+ #
11
+ # All operations are executed transactional. That means they either all
12
+ # succeed or no changes at all are applied to the workspace.
13
+ #
14
+ TRANSACTIONAL = 'transactional'
15
+ #
16
+ # If the workspace edit contains only textual file changes they are executed transactional.
17
+ # If resource changes (create, rename or delete file) are part of the change the failure
18
+ # handling strategy is abort.
19
+ #
20
+ TEXT_ONLY_TRANSACTIONAL = 'textOnlyTransactional'
21
+ #
22
+ # The client tries to undo the operations already executed. But there is no
23
+ # guarantee that this is succeeding.
24
+ #
25
+ UNDO = 'undo'
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,23 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Constant
4
+ #
5
+ # The kind of resource operations supported by the client.
6
+ #
7
+ module ResourceOperationKind
8
+ #
9
+ # Supports creating new files and folders.
10
+ #
11
+ CREATE = 'create'
12
+ #
13
+ # Supports renaming existing files and folders.
14
+ #
15
+ RENAME = 'rename'
16
+ #
17
+ # Supports deleting existing files and folders.
18
+ #
19
+ DELETE = 'delete'
20
+ end
21
+ end
22
+ end
23
+ end
@@ -7,11 +7,13 @@ module LanguageServer
7
7
  autoload :DiagnosticSeverity, "language_server/protocol/constant/diagnostic_severity"
8
8
  autoload :DocumentHighlightKind, "language_server/protocol/constant/document_highlight_kind"
9
9
  autoload :ErrorCodes, "language_server/protocol/constant/error_codes"
10
+ autoload :FailureHandlingKind, "language_server/protocol/constant/failure_handling_kind"
10
11
  autoload :FileChangeType, "language_server/protocol/constant/file_change_type"
11
12
  autoload :InitializeError, "language_server/protocol/constant/initialize_error"
12
13
  autoload :InsertTextFormat, "language_server/protocol/constant/insert_text_format"
13
14
  autoload :MarkupKind, "language_server/protocol/constant/markup_kind"
14
15
  autoload :MessageType, "language_server/protocol/constant/message_type"
16
+ autoload :ResourceOperationKind, "language_server/protocol/constant/resource_operation_kind"
15
17
  autoload :SymbolKind, "language_server/protocol/constant/symbol_kind"
16
18
  autoload :TextDocumentSaveReason, "language_server/protocol/constant/text_document_save_reason"
17
19
  autoload :TextDocumentSyncKind, "language_server/protocol/constant/text_document_sync_kind"
@@ -23,11 +25,13 @@ module LanguageServer
23
25
  require "language_server/protocol/constant/diagnostic_severity"
24
26
  require "language_server/protocol/constant/document_highlight_kind"
25
27
  require "language_server/protocol/constant/error_codes"
28
+ require "language_server/protocol/constant/failure_handling_kind"
26
29
  require "language_server/protocol/constant/file_change_type"
27
30
  require "language_server/protocol/constant/initialize_error"
28
31
  require "language_server/protocol/constant/insert_text_format"
29
32
  require "language_server/protocol/constant/markup_kind"
30
33
  require "language_server/protocol/constant/message_type"
34
+ require "language_server/protocol/constant/resource_operation_kind"
31
35
  require "language_server/protocol/constant/symbol_kind"
32
36
  require "language_server/protocol/constant/text_document_save_reason"
33
37
  require "language_server/protocol/constant/text_document_sync_kind"
@@ -0,0 +1,54 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Interface
4
+ #
5
+ # Create file operation
6
+ #
7
+ class CreateFile
8
+ def initialize(kind:, uri:, options: nil)
9
+ @attributes = {}
10
+
11
+ @attributes[:kind] = kind
12
+ @attributes[:uri] = uri
13
+ @attributes[:options] = options if options
14
+
15
+ @attributes.freeze
16
+ end
17
+
18
+ #
19
+ # A create
20
+ #
21
+ # @return ["create"]
22
+ def kind
23
+ attributes.fetch(:kind)
24
+ end
25
+
26
+ #
27
+ # The resource to create.
28
+ #
29
+ # @return [string]
30
+ def uri
31
+ attributes.fetch(:uri)
32
+ end
33
+
34
+ #
35
+ # Additional options
36
+ #
37
+ # @return [CreateFileOptions]
38
+ def options
39
+ attributes.fetch(:options)
40
+ end
41
+
42
+ attr_reader :attributes
43
+
44
+ def to_hash
45
+ attributes
46
+ end
47
+
48
+ def to_json(*args)
49
+ to_hash.to_json(*args)
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,45 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Interface
4
+ #
5
+ # Options to create a file.
6
+ #
7
+ class CreateFileOptions
8
+ def initialize(overwrite: nil, ignore_if_exists: nil)
9
+ @attributes = {}
10
+
11
+ @attributes[:overwrite] = overwrite if overwrite
12
+ @attributes[:ignoreIfExists] = ignore_if_exists if ignore_if_exists
13
+
14
+ @attributes.freeze
15
+ end
16
+
17
+ #
18
+ # Overwrite existing file. Overwrite wins over `ignoreIfExists`
19
+ #
20
+ # @return [boolean]
21
+ def overwrite
22
+ attributes.fetch(:overwrite)
23
+ end
24
+
25
+ #
26
+ # Ignore if exists.
27
+ #
28
+ # @return [boolean]
29
+ def ignore_if_exists
30
+ attributes.fetch(:ignoreIfExists)
31
+ end
32
+
33
+ attr_reader :attributes
34
+
35
+ def to_hash
36
+ attributes
37
+ end
38
+
39
+ def to_json(*args)
40
+ to_hash.to_json(*args)
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,54 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Interface
4
+ #
5
+ # Delete file operation
6
+ #
7
+ class DeleteFile
8
+ def initialize(kind:, uri:, options: nil)
9
+ @attributes = {}
10
+
11
+ @attributes[:kind] = kind
12
+ @attributes[:uri] = uri
13
+ @attributes[:options] = options if options
14
+
15
+ @attributes.freeze
16
+ end
17
+
18
+ #
19
+ # A delete
20
+ #
21
+ # @return ["delete"]
22
+ def kind
23
+ attributes.fetch(:kind)
24
+ end
25
+
26
+ #
27
+ # The file to delete.
28
+ #
29
+ # @return [string]
30
+ def uri
31
+ attributes.fetch(:uri)
32
+ end
33
+
34
+ #
35
+ # Delete options.
36
+ #
37
+ # @return [DeleteFileOptions]
38
+ def options
39
+ attributes.fetch(:options)
40
+ end
41
+
42
+ attr_reader :attributes
43
+
44
+ def to_hash
45
+ attributes
46
+ end
47
+
48
+ def to_json(*args)
49
+ to_hash.to_json(*args)
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,45 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Interface
4
+ #
5
+ # Delete file options
6
+ #
7
+ class DeleteFileOptions
8
+ def initialize(recursive: nil, ignore_if_not_exists: nil)
9
+ @attributes = {}
10
+
11
+ @attributes[:recursive] = recursive if recursive
12
+ @attributes[:ignoreIfNotExists] = ignore_if_not_exists if ignore_if_not_exists
13
+
14
+ @attributes.freeze
15
+ end
16
+
17
+ #
18
+ # Delete the content recursively if a folder is denoted.
19
+ #
20
+ # @return [boolean]
21
+ def recursive
22
+ attributes.fetch(:recursive)
23
+ end
24
+
25
+ #
26
+ # Ignore the operation if the file doesn't exist.
27
+ #
28
+ # @return [boolean]
29
+ def ignore_if_not_exists
30
+ attributes.fetch(:ignoreIfNotExists)
31
+ end
32
+
33
+ attr_reader :attributes
34
+
35
+ def to_hash
36
+ attributes
37
+ end
38
+
39
+ def to_json(*args)
40
+ to_hash.to_json(*args)
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
@@ -24,7 +24,7 @@ module LanguageServer
24
24
  #
25
25
  # The actual content changes. The content changes describe single state changes
26
26
  # to the document. So if there are two content changes c1 and c2 for a document
27
- # in state S10 then c1 move the document to S11 and c2 to S12.
27
+ # in state S then c1 move the document to S' and c2 to S''.
28
28
  #
29
29
  # @return [TextDocumentContentChangeEvent[]]
30
30
  def content_changes
@@ -31,6 +31,14 @@ module LanguageServer
31
31
  #
32
32
  # A glob pattern, like `*.{ts,js}`.
33
33
  #
34
+ # Glob patterns can have the following syntax:
35
+ # - `*` to match one or more characters in a path segment
36
+ # - `?` to match on one character in a path segment
37
+ # - `**` to match any number of path segments, including none
38
+ # - `{}` to group conditions (e.g. `**​/*.{ts,js}` matches all TypeScript and JavaScript files)
39
+ # - `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …)
40
+ # - `[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but not `example.0`)
41
+ #
34
42
  # @return [string]
35
43
  def pattern
36
44
  attributes.fetch(:pattern)
@@ -12,7 +12,15 @@ module LanguageServer
12
12
  end
13
13
 
14
14
  #
15
- # The glob pattern to watch
15
+ # The glob pattern to watch.
16
+ #
17
+ # Glob patterns can have the following syntax:
18
+ # - `*` to match one or more characters in a path segment
19
+ # - `?` to match on one character in a path segment
20
+ # - `**` to match any number of path segments, including none
21
+ # - `{}` to group conditions (e.g. `**​/*.{ts,js}` matches all TypeScript and JavaScript files)
22
+ # - `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …)
23
+ # - `[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but not `example.0`)
16
24
  #
17
25
  # @return [string]
18
26
  def glob_pattern
@@ -1,7 +1,7 @@
1
1
  module LanguageServer
2
2
  module Protocol
3
3
  module Interface
4
- class FoldingRangeRequestParam
4
+ class FoldingRangeParams
5
5
  def initialize(text_document:)
6
6
  @attributes = {}
7
7
 
@@ -0,0 +1,63 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Interface
4
+ class LocationLink
5
+ def initialize(origin_selection_range: nil, target_uri:, target_range:, target_selection_range: nil)
6
+ @attributes = {}
7
+
8
+ @attributes[:originSelectionRange] = origin_selection_range if origin_selection_range
9
+ @attributes[:targetUri] = target_uri
10
+ @attributes[:targetRange] = target_range
11
+ @attributes[:targetSelectionRange] = target_selection_range if target_selection_range
12
+
13
+ @attributes.freeze
14
+ end
15
+
16
+ #
17
+ # Span of the origin of this link.
18
+ #
19
+ # Used as the underlined span for mouse interaction. Defaults to the word range at
20
+ # the mouse position.
21
+ #
22
+ # @return [Range]
23
+ def origin_selection_range
24
+ attributes.fetch(:originSelectionRange)
25
+ end
26
+
27
+ #
28
+ # The target resource identifier of this link.
29
+ #
30
+ # @return [string]
31
+ def target_uri
32
+ attributes.fetch(:targetUri)
33
+ end
34
+
35
+ #
36
+ # The full target range of this link.
37
+ #
38
+ # @return [Range]
39
+ def target_range
40
+ attributes.fetch(:targetRange)
41
+ end
42
+
43
+ #
44
+ # The span of this link.
45
+ #
46
+ # @return [Range]
47
+ def target_selection_range
48
+ attributes.fetch(:targetSelectionRange)
49
+ end
50
+
51
+ attr_reader :attributes
52
+
53
+ def to_hash
54
+ attributes
55
+ end
56
+
57
+ def to_json(*args)
58
+ to_hash.to_json(*args)
59
+ end
60
+ end
61
+ end
62
+ end
63
+ end
@@ -9,7 +9,7 @@ module LanguageServer
9
9
  # See https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting
10
10
  #
11
11
  # Here is an example how such a string can be constructed using JavaScript / TypeScript:
12
- # ```ts
12
+ # ```typescript
13
13
  # let markdown: MarkdownContent = {
14
14
  # kind: MarkupKind.Markdown,
15
15
  # value: [
@@ -16,10 +16,16 @@ module LanguageServer
16
16
  end
17
17
 
18
18
  #
19
- # The label of this parameter. Will be shown in
20
- # the UI.
19
+ # The label of this parameter information.
21
20
  #
22
- # @return [string]
21
+ # Either a string or an inclusive start and exclusive end offsets within its containing
22
+ # signature label. (see SignatureInformation.label). The offsets are based on a UTF-16
23
+ # string representation as `Position` and `Range` does.
24
+ #
25
+ # *Note*: a label of type string should be a substring of its containing signature label.
26
+ # Its intended use case is to highlight the parameter label part in the `SignatureInformation.label`.
27
+ #
28
+ # @return [string | [number, number]]
23
29
  def label
24
30
  attributes.fetch(:label)
25
31
  end
@@ -0,0 +1,63 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Interface
4
+ #
5
+ # Rename file operation
6
+ #
7
+ class RenameFile
8
+ def initialize(kind:, old_uri:, new_uri:, options: nil)
9
+ @attributes = {}
10
+
11
+ @attributes[:kind] = kind
12
+ @attributes[:oldUri] = old_uri
13
+ @attributes[:newUri] = new_uri
14
+ @attributes[:options] = options if options
15
+
16
+ @attributes.freeze
17
+ end
18
+
19
+ #
20
+ # A rename
21
+ #
22
+ # @return ["rename"]
23
+ def kind
24
+ attributes.fetch(:kind)
25
+ end
26
+
27
+ #
28
+ # The old (existing) location.
29
+ #
30
+ # @return [string]
31
+ def old_uri
32
+ attributes.fetch(:oldUri)
33
+ end
34
+
35
+ #
36
+ # The new location.
37
+ #
38
+ # @return [string]
39
+ def new_uri
40
+ attributes.fetch(:newUri)
41
+ end
42
+
43
+ #
44
+ # Rename options.
45
+ #
46
+ # @return [RenameFileOptions]
47
+ def options
48
+ attributes.fetch(:options)
49
+ end
50
+
51
+ attr_reader :attributes
52
+
53
+ def to_hash
54
+ attributes
55
+ end
56
+
57
+ def to_json(*args)
58
+ to_hash.to_json(*args)
59
+ end
60
+ end
61
+ end
62
+ end
63
+ end
@@ -0,0 +1,45 @@
1
+ module LanguageServer
2
+ module Protocol
3
+ module Interface
4
+ #
5
+ # Rename file options
6
+ #
7
+ class RenameFileOptions
8
+ def initialize(overwrite: nil, ignore_if_exists: nil)
9
+ @attributes = {}
10
+
11
+ @attributes[:overwrite] = overwrite if overwrite
12
+ @attributes[:ignoreIfExists] = ignore_if_exists if ignore_if_exists
13
+
14
+ @attributes.freeze
15
+ end
16
+
17
+ #
18
+ # Overwrite target if existing. Overwrite wins over `ignoreIfExists`
19
+ #
20
+ # @return [boolean]
21
+ def overwrite
22
+ attributes.fetch(:overwrite)
23
+ end
24
+
25
+ #
26
+ # Ignores if target exists.
27
+ #
28
+ # @return [boolean]
29
+ def ignore_if_exists
30
+ attributes.fetch(:ignoreIfExists)
31
+ end
32
+
33
+ attr_reader :attributes
34
+
35
+ def to_hash
36
+ attributes
37
+ end
38
+
39
+ def to_json(*args)
40
+ to_hash.to_json(*args)
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
@@ -5,7 +5,7 @@ module LanguageServer
5
5
  # Text document specific client capabilities.
6
6
  #
7
7
  class TextDocumentClientCapabilities
8
- def initialize(synchronization: nil, completion: nil, hover: nil, signature_help: nil, references: nil, document_highlight: nil, document_symbol: nil, formatting: nil, range_formatting: nil, on_type_formatting: nil, definition: nil, type_definition: nil, implementation: nil, code_action: nil, code_lens: nil, document_link: nil, color_provider: nil, rename: nil, publish_diagnostics: nil, folding_range: nil)
8
+ def initialize(synchronization: nil, completion: nil, hover: nil, signature_help: nil, references: nil, document_highlight: nil, document_symbol: nil, formatting: nil, range_formatting: nil, on_type_formatting: nil, declaration: nil, definition: nil, type_definition: nil, implementation: nil, code_action: nil, code_lens: nil, document_link: nil, color_provider: nil, rename: nil, publish_diagnostics: nil, folding_range: nil)
9
9
  @attributes = {}
10
10
 
11
11
  @attributes[:synchronization] = synchronization if synchronization
@@ -18,6 +18,7 @@ module LanguageServer
18
18
  @attributes[:formatting] = formatting if formatting
19
19
  @attributes[:rangeFormatting] = range_formatting if range_formatting
20
20
  @attributes[:onTypeFormatting] = on_type_formatting if on_type_formatting
21
+ @attributes[:declaration] = declaration if declaration
21
22
  @attributes[:definition] = definition if definition
22
23
  @attributes[:typeDefinition] = type_definition if type_definition
23
24
  @attributes[:implementation] = implementation if implementation
@@ -56,7 +57,7 @@ module LanguageServer
56
57
  #
57
58
  # Capabilities specific to the `textDocument/signatureHelp`
58
59
  #
59
- # @return [{ dynamicRegistration?: boolean; signatureInformation?: { documentationFormat?: MarkupKind[]; }; }]
60
+ # @return [{ dynamicRegistration?: boolean; signatureInformation?: { documentationFormat?: MarkupKind[]; par...]
60
61
  def signature_help
61
62
  attributes.fetch(:signatureHelp)
62
63
  end
@@ -110,9 +111,19 @@ module LanguageServer
110
111
  end
111
112
 
112
113
  #
113
- # Capabilities specific to the `textDocument/definition`
114
+ # Capabilities specific to the `textDocument/declaration`
114
115
  #
115
- # @return [{ dynamicRegistration?: boolean; }]
116
+ # @return [{ dynamicRegistration?: boolean; linkSupport?: boolean; }]
117
+ def declaration
118
+ attributes.fetch(:declaration)
119
+ end
120
+
121
+ #
122
+ # Capabilities specific to the `textDocument/definition`.
123
+ #
124
+ # Since 3.14.0
125
+ #
126
+ # @return [{ dynamicRegistration?: boolean; linkSupport?: boolean; }]
116
127
  def definition
117
128
  attributes.fetch(:definition)
118
129
  end
@@ -122,7 +133,7 @@ module LanguageServer
122
133
  #
123
134
  # Since 3.6.0
124
135
  #
125
- # @return [{ dynamicRegistration?: boolean; }]
136
+ # @return [{ dynamicRegistration?: boolean; linkSupport?: boolean; }]
126
137
  def type_definition
127
138
  attributes.fetch(:typeDefinition)
128
139
  end
@@ -132,7 +143,7 @@ module LanguageServer
132
143
  #
133
144
  # Since 3.6.0
134
145
  #
135
- # @return [{ dynamicRegistration?: boolean; }]
146
+ # @return [{ dynamicRegistration?: boolean; linkSupport?: boolean; }]
136
147
  def implementation
137
148
  attributes.fetch(:implementation)
138
149
  end
@@ -15,7 +15,10 @@ module LanguageServer
15
15
  # is sent from the server to the client and the file is not open in the editor
16
16
  # (the server has not received an open notification before) the server can send
17
17
  # `null` to indicate that the version is known and the content on disk is the
18
- # truth (as speced with document content ownership)
18
+ # truth (as speced with document content ownership).
19
+ #
20
+ # The version number of a document will increase after each change, including
21
+ # undo/redo. The number doesn't need to be consecutive.
19
22
  #
20
23
  # @return [number]
21
24
  def version
@@ -32,7 +32,7 @@ module LanguageServer
32
32
  #
33
33
  # Capabilities specific to `WorkspaceEdit`s
34
34
  #
35
- # @return [{ documentChanges?: boolean; }]
35
+ # @return [{ documentChanges?: boolean; resourceOperations?: ResourceOperationKind[]; failureHandling?: Fail...]
36
36
  def workspace_edit
37
37
  attributes.fetch(:workspaceEdit)
38
38
  end
@@ -20,12 +20,18 @@ module LanguageServer
20
20
  end
21
21
 
22
22
  #
23
- # An array of `TextDocumentEdit`s to express changes to n different text documents
24
- # where each text document edit addresses a specific version of a text document.
23
+ # Depending on the client capability `workspace.workspaceEdit.resourceOperations` document changes
24
+ # are either an array of `TextDocumentEdit`s to express changes to n different text documents
25
+ # where each text document edit addresses a specific version of a text document. Or it can contain
26
+ # above `TextDocumentEdit`s mixed with create, rename and delete file / folder operations.
27
+ #
25
28
  # Whether a client supports versioned document edits is expressed via
26
- # `WorkspaceClientCapabilities.workspaceEdit.documentChanges`.
29
+ # `workspace.workspaceEdit.documentChanges` client capability.
30
+ #
31
+ # If a client neither supports `documentChanges` nor `workspace.workspaceEdit.resourceOperations` then
32
+ # only plain `TextEdit`s using the `changes` property are supported.
27
33
  #
28
- # @return [TextDocumentEdit[]]
34
+ # @return [TextDocumentEdit[] | (TextDocumentEdit | CreateFile | RenameFile | DeleteFile)[]]
29
35
  def document_changes
30
36
  attributes.fetch(:documentChanges)
31
37
  end
@@ -28,6 +28,10 @@ module LanguageServer
28
28
  autoload :CompletionRegistrationOptions, "language_server/protocol/interface/completion_registration_options"
29
29
  autoload :ConfigurationItem, "language_server/protocol/interface/configuration_item"
30
30
  autoload :ConfigurationParams, "language_server/protocol/interface/configuration_params"
31
+ autoload :CreateFile, "language_server/protocol/interface/create_file"
32
+ autoload :CreateFileOptions, "language_server/protocol/interface/create_file_options"
33
+ autoload :DeleteFile, "language_server/protocol/interface/delete_file"
34
+ autoload :DeleteFileOptions, "language_server/protocol/interface/delete_file_options"
31
35
  autoload :Diagnostic, "language_server/protocol/interface/diagnostic"
32
36
  autoload :DiagnosticRelatedInformation, "language_server/protocol/interface/diagnostic_related_information"
33
37
  autoload :DidChangeConfigurationParams, "language_server/protocol/interface/did_change_configuration_params"
@@ -56,8 +60,8 @@ module LanguageServer
56
60
  autoload :FileEvent, "language_server/protocol/interface/file_event"
57
61
  autoload :FileSystemWatcher, "language_server/protocol/interface/file_system_watcher"
58
62
  autoload :FoldingRange, "language_server/protocol/interface/folding_range"
63
+ autoload :FoldingRangeParams, "language_server/protocol/interface/folding_range_params"
59
64
  autoload :FoldingRangeProviderOptions, "language_server/protocol/interface/folding_range_provider_options"
60
- autoload :FoldingRangeRequestParam, "language_server/protocol/interface/folding_range_request_param"
61
65
  autoload :FormattingOptions, "language_server/protocol/interface/formatting_options"
62
66
  autoload :Hover, "language_server/protocol/interface/hover"
63
67
  autoload :InitializeError, "language_server/protocol/interface/initialize_error"
@@ -65,6 +69,7 @@ module LanguageServer
65
69
  autoload :InitializeResult, "language_server/protocol/interface/initialize_result"
66
70
  autoload :InitializedParams, "language_server/protocol/interface/initialized_params"
67
71
  autoload :Location, "language_server/protocol/interface/location"
72
+ autoload :LocationLink, "language_server/protocol/interface/location_link"
68
73
  autoload :LogMessageParams, "language_server/protocol/interface/log_message_params"
69
74
  autoload :MarkupContent, "language_server/protocol/interface/markup_content"
70
75
  autoload :Message, "language_server/protocol/interface/message"
@@ -78,6 +83,8 @@ module LanguageServer
78
83
  autoload :ReferenceParams, "language_server/protocol/interface/reference_params"
79
84
  autoload :Registration, "language_server/protocol/interface/registration"
80
85
  autoload :RegistrationParams, "language_server/protocol/interface/registration_params"
86
+ autoload :RenameFile, "language_server/protocol/interface/rename_file"
87
+ autoload :RenameFileOptions, "language_server/protocol/interface/rename_file_options"
81
88
  autoload :RenameOptions, "language_server/protocol/interface/rename_options"
82
89
  autoload :RenameParams, "language_server/protocol/interface/rename_params"
83
90
  autoload :RenameRegistrationOptions, "language_server/protocol/interface/rename_registration_options"
@@ -142,6 +149,10 @@ module LanguageServer
142
149
  require "language_server/protocol/interface/completion_registration_options"
143
150
  require "language_server/protocol/interface/configuration_item"
144
151
  require "language_server/protocol/interface/configuration_params"
152
+ require "language_server/protocol/interface/create_file"
153
+ require "language_server/protocol/interface/create_file_options"
154
+ require "language_server/protocol/interface/delete_file"
155
+ require "language_server/protocol/interface/delete_file_options"
145
156
  require "language_server/protocol/interface/diagnostic"
146
157
  require "language_server/protocol/interface/diagnostic_related_information"
147
158
  require "language_server/protocol/interface/did_change_configuration_params"
@@ -170,8 +181,8 @@ module LanguageServer
170
181
  require "language_server/protocol/interface/file_event"
171
182
  require "language_server/protocol/interface/file_system_watcher"
172
183
  require "language_server/protocol/interface/folding_range"
184
+ require "language_server/protocol/interface/folding_range_params"
173
185
  require "language_server/protocol/interface/folding_range_provider_options"
174
- require "language_server/protocol/interface/folding_range_request_param"
175
186
  require "language_server/protocol/interface/formatting_options"
176
187
  require "language_server/protocol/interface/hover"
177
188
  require "language_server/protocol/interface/initialize_error"
@@ -179,6 +190,7 @@ module LanguageServer
179
190
  require "language_server/protocol/interface/initialize_result"
180
191
  require "language_server/protocol/interface/initialized_params"
181
192
  require "language_server/protocol/interface/location"
193
+ require "language_server/protocol/interface/location_link"
182
194
  require "language_server/protocol/interface/log_message_params"
183
195
  require "language_server/protocol/interface/markup_content"
184
196
  require "language_server/protocol/interface/message"
@@ -192,6 +204,8 @@ module LanguageServer
192
204
  require "language_server/protocol/interface/reference_params"
193
205
  require "language_server/protocol/interface/registration"
194
206
  require "language_server/protocol/interface/registration_params"
207
+ require "language_server/protocol/interface/rename_file"
208
+ require "language_server/protocol/interface/rename_file_options"
195
209
  require "language_server/protocol/interface/rename_options"
196
210
  require "language_server/protocol/interface/rename_params"
197
211
  require "language_server/protocol/interface/rename_registration_options"
@@ -1,5 +1,5 @@
1
1
  module LanguageServer
2
2
  module Protocol
3
- VERSION = "3.12.0.0"
3
+ VERSION = "3.14.0.0"
4
4
  end
5
5
  end
@@ -3,7 +3,7 @@ import * as fs from "fs";
3
3
  import * as path from "path";
4
4
  import * as fetch from "isomorphic-fetch";
5
5
 
6
- const lspVersion = "e0ed81b9c0de995196c4ec7a54a7c9432bb7897f";
6
+ const lspVersion = "c0c516735fb9eea08ac0151333b5380d70525961";
7
7
  const rootDir = path.normalize(path.join(__dirname, ".."));
8
8
  const tempDir = path.join(rootDir, "tmp");
9
9
  const protocolMdPath = path.join(tempDir, lspVersion, "protocol.md");
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: language_server-protocol
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.12.0.0
4
+ version: 3.14.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fumiaki MATSUSHIMA
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-08-28 00:00:00.000000000 Z
11
+ date: 2019-01-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -143,11 +143,13 @@ files:
143
143
  - lib/language_server/protocol/constant/diagnostic_severity.rb
144
144
  - lib/language_server/protocol/constant/document_highlight_kind.rb
145
145
  - lib/language_server/protocol/constant/error_codes.rb
146
+ - lib/language_server/protocol/constant/failure_handling_kind.rb
146
147
  - lib/language_server/protocol/constant/file_change_type.rb
147
148
  - lib/language_server/protocol/constant/initialize_error.rb
148
149
  - lib/language_server/protocol/constant/insert_text_format.rb
149
150
  - lib/language_server/protocol/constant/markup_kind.rb
150
151
  - lib/language_server/protocol/constant/message_type.rb
152
+ - lib/language_server/protocol/constant/resource_operation_kind.rb
151
153
  - lib/language_server/protocol/constant/symbol_kind.rb
152
154
  - lib/language_server/protocol/constant/text_document_save_reason.rb
153
155
  - lib/language_server/protocol/constant/text_document_sync_kind.rb
@@ -180,6 +182,10 @@ files:
180
182
  - lib/language_server/protocol/interface/completion_registration_options.rb
181
183
  - lib/language_server/protocol/interface/configuration_item.rb
182
184
  - lib/language_server/protocol/interface/configuration_params.rb
185
+ - lib/language_server/protocol/interface/create_file.rb
186
+ - lib/language_server/protocol/interface/create_file_options.rb
187
+ - lib/language_server/protocol/interface/delete_file.rb
188
+ - lib/language_server/protocol/interface/delete_file_options.rb
183
189
  - lib/language_server/protocol/interface/diagnostic.rb
184
190
  - lib/language_server/protocol/interface/diagnostic_related_information.rb
185
191
  - lib/language_server/protocol/interface/did_change_configuration_params.rb
@@ -208,8 +214,8 @@ files:
208
214
  - lib/language_server/protocol/interface/file_event.rb
209
215
  - lib/language_server/protocol/interface/file_system_watcher.rb
210
216
  - lib/language_server/protocol/interface/folding_range.rb
217
+ - lib/language_server/protocol/interface/folding_range_params.rb
211
218
  - lib/language_server/protocol/interface/folding_range_provider_options.rb
212
- - lib/language_server/protocol/interface/folding_range_request_param.rb
213
219
  - lib/language_server/protocol/interface/formatting_options.rb
214
220
  - lib/language_server/protocol/interface/hover.rb
215
221
  - lib/language_server/protocol/interface/initialize_error.rb
@@ -217,6 +223,7 @@ files:
217
223
  - lib/language_server/protocol/interface/initialize_result.rb
218
224
  - lib/language_server/protocol/interface/initialized_params.rb
219
225
  - lib/language_server/protocol/interface/location.rb
226
+ - lib/language_server/protocol/interface/location_link.rb
220
227
  - lib/language_server/protocol/interface/log_message_params.rb
221
228
  - lib/language_server/protocol/interface/markup_content.rb
222
229
  - lib/language_server/protocol/interface/message.rb
@@ -230,6 +237,8 @@ files:
230
237
  - lib/language_server/protocol/interface/reference_params.rb
231
238
  - lib/language_server/protocol/interface/registration.rb
232
239
  - lib/language_server/protocol/interface/registration_params.rb
240
+ - lib/language_server/protocol/interface/rename_file.rb
241
+ - lib/language_server/protocol/interface/rename_file_options.rb
233
242
  - lib/language_server/protocol/interface/rename_options.rb
234
243
  - lib/language_server/protocol/interface/rename_params.rb
235
244
  - lib/language_server/protocol/interface/rename_registration_options.rb
@@ -261,7 +270,6 @@ files:
261
270
  - lib/language_server/protocol/interface/unregistration_params.rb
262
271
  - lib/language_server/protocol/interface/versioned_text_document_identifier.rb
263
272
  - lib/language_server/protocol/interface/will_save_text_document_params.rb
264
- - lib/language_server/protocol/interface/workspace_client_capabilites.rb
265
273
  - lib/language_server/protocol/interface/workspace_client_capabilities.rb
266
274
  - lib/language_server/protocol/interface/workspace_edit.rb
267
275
  - lib/language_server/protocol/interface/workspace_folder.rb
@@ -294,8 +302,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
294
302
  - !ruby/object:Gem::Version
295
303
  version: '0'
296
304
  requirements: []
297
- rubyforge_project:
298
- rubygems_version: 2.7.7
305
+ rubygems_version: 3.0.1
299
306
  signing_key:
300
307
  specification_version: 4
301
308
  summary: A Language Server Protocol SDK
@@ -1,82 +0,0 @@
1
- module LanguageServer
2
- module Protocol
3
- module Interface
4
- #
5
- # Workspace specific client capabilities.
6
- #
7
- class WorkspaceClientCapabilites
8
- def initialize(apply_edit: nil, workspace_edit: nil, did_change_configuration: nil, did_change_watched_files: nil, symbol: nil, execute_command: nil)
9
- @attributes = {}
10
-
11
- @attributes[:applyEdit] = apply_edit if apply_edit
12
- @attributes[:workspaceEdit] = workspace_edit if workspace_edit
13
- @attributes[:didChangeConfiguration] = did_change_configuration if did_change_configuration
14
- @attributes[:didChangeWatchedFiles] = did_change_watched_files if did_change_watched_files
15
- @attributes[:symbol] = symbol if symbol
16
- @attributes[:executeCommand] = execute_command if execute_command
17
-
18
- @attributes.freeze
19
- end
20
-
21
- #
22
- # The client supports applying batch edits to the workspace by supporting
23
- # the request 'workspace/applyEdit'
24
- #
25
- # @return [boolean]
26
- def apply_edit
27
- attributes.fetch(:applyEdit)
28
- end
29
-
30
- #
31
- # Capabilities specific to `WorkspaceEdit`s
32
- #
33
- # @return [{ documentChanges?: boolean; }]
34
- def workspace_edit
35
- attributes.fetch(:workspaceEdit)
36
- end
37
-
38
- #
39
- # Capabilities specific to the `workspace/didChangeConfiguration` notification.
40
- #
41
- # @return [{ dynamicRegistration?: boolean; }]
42
- def did_change_configuration
43
- attributes.fetch(:didChangeConfiguration)
44
- end
45
-
46
- #
47
- # Capabilities specific to the `workspace/didChangeWatchedFiles` notification.
48
- #
49
- # @return [{ dynamicRegistration?: boolean; }]
50
- def did_change_watched_files
51
- attributes.fetch(:didChangeWatchedFiles)
52
- end
53
-
54
- #
55
- # Capabilities specific to the `workspace/symbol` request.
56
- #
57
- # @return [{ dynamicRegistration?: boolean; }]
58
- def symbol
59
- attributes.fetch(:symbol)
60
- end
61
-
62
- #
63
- # Capabilities specific to the `workspace/executeCommand` request.
64
- #
65
- # @return [{ dynamicRegistration?: boolean; }]
66
- def execute_command
67
- attributes.fetch(:executeCommand)
68
- end
69
-
70
- attr_reader :attributes
71
-
72
- def to_hash
73
- attributes
74
- end
75
-
76
- def to_json(*args)
77
- to_hash.to_json(*args)
78
- end
79
- end
80
- end
81
- end
82
- end