language_server-protocol 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +31 -4
- data/circle.yml +23 -0
- data/docker-compose.yml +35 -0
- data/docker-sync.yml +9 -0
- data/language_server-protocol.gemspec +3 -0
- data/lib/language_server-protocol.rb +1 -0
- data/lib/language_server/protocol.rb +3 -6
- data/lib/language_server/protocol/constant.rb +11 -0
- data/lib/language_server/protocol/{constants → constant}/completion_item_kind.rb +1 -1
- data/lib/language_server/protocol/{constants → constant}/diagnostic_severity.rb +1 -1
- data/lib/language_server/protocol/{constants → constant}/document_highlight_kind.rb +1 -1
- data/lib/language_server/protocol/{constants → constant}/error_codes.rb +1 -1
- data/lib/language_server/protocol/{constants → constant}/file_change_type.rb +1 -1
- data/lib/language_server/protocol/{constants → constant}/initialize_error.rb +1 -1
- data/lib/language_server/protocol/{constants → constant}/insert_text_format.rb +1 -1
- data/lib/language_server/protocol/{constants → constant}/message_type.rb +1 -1
- data/lib/language_server/protocol/{constants → constant}/symbol_kind.rb +1 -1
- data/lib/language_server/protocol/{constants → constant}/text_document_save_reason.rb +1 -1
- data/lib/language_server/protocol/{constants → constant}/text_document_sync_kind.rb +1 -1
- data/lib/language_server/protocol/interface.rb +87 -0
- data/lib/language_server/protocol/{interfaces → interface}/apply_workspace_edit_params.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/apply_workspace_edit_response.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/cancel_params.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/client_capabilities.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/code_action_context.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/code_action_params.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/code_lens.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/code_lens_options.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/code_lens_params.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/code_lens_registration_options.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/command.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/completion_item.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/completion_list.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/completion_options.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/completion_registration_options.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/diagnostic.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/did_change_configuration_params.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/did_change_text_document_params.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/did_change_watched_files_params.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/did_close_text_document_params.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/did_open_text_document_params.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/did_save_text_document_params.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/document_filter.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/document_formatting_params.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/document_highlight.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/document_link.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/document_link_options.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/document_link_params.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/document_link_registration_options.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/document_on_type_formatting_options.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/document_on_type_formatting_params.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/document_on_type_formatting_registration_options.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/document_range_formatting_params.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/document_symbol_params.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/execute_command_options.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/execute_command_params.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/execute_command_registration_options.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/file_event.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/formatting_options.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/hover.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/initialize_error.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/initialize_params.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/initialize_result.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/location.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/log_message_params.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/message.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/message_action_item.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/notification_message.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/parameter_information.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/position.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/publish_diagnostics_params.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/range.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/reference_context.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/reference_params.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/registration.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/registration_params.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/rename_params.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/request_message.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/response_error.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/response_message.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/save_options.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/server_capabilities.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/show_message_params.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/show_message_request_params.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/signature_help.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/signature_help_options.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/signature_help_registration_options.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/signature_information.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/symbol_information.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/text_document_change_registration_options.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/text_document_client_capabilities.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/text_document_content_change_event.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/text_document_edit.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/text_document_identifier.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/text_document_item.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/text_document_position_params.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/text_document_registration_options.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/text_document_save_registration_options.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/text_document_sync_options.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/text_edit.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/unregistration.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/unregistration_params.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/versioned_text_document_identifier.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/will_save_text_document_params.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/workspace_client_capabilites.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/workspace_edit.rb +1 -1
- data/lib/language_server/protocol/{interfaces → interface}/workspace_symbol_params.rb +1 -1
- data/lib/language_server/protocol/transport.rb +1 -0
- data/lib/language_server/protocol/version.rb +1 -1
- data/scripts/generateFiles.ts +8 -8
- metadata +149 -102
- data/lib/language_server/protocol/constants.rb +0 -11
- data/lib/language_server/protocol/interfaces.rb +0 -87
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d04ba4a69373f5e654e6996087176f6734262ec5
|
4
|
+
data.tar.gz: d12f9d73ee0583e775d4d01560a80ff4dd39b784
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11125692f139b8cd725551580317a3e6c9b44d9f3c5b675a37fd79da2a5ab171ae5af86c9349ff1635f5a992d2c5971e5c80fca05343d08dac8cdecb547c510b
|
7
|
+
data.tar.gz: ed93a8cee5ef4d7d5f8079177783b3b08ceb28ac31e81e08cc400b8127fc01e679bc2886a35f91c0b58a120112e211279983c6f7a106ab0f3a0da6de016b2b30
|
data/README.md
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
# LanguageServer::Protocol
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
3
|
+
A Language Server Protocol SDK for Ruby.
|
6
4
|
|
7
5
|
## Installation
|
8
6
|
|
@@ -22,7 +20,36 @@ Or install it yourself as:
|
|
22
20
|
|
23
21
|
## Usage
|
24
22
|
|
25
|
-
|
23
|
+
```ruby
|
24
|
+
require "language_server-protocol"
|
25
|
+
|
26
|
+
LSP = LanguageServer::Protocol
|
27
|
+
writer = LSP::Transport::Stdio::Writer.new
|
28
|
+
reader = LSP::Transport::Stdio::Reader.new
|
29
|
+
|
30
|
+
subscribers = {
|
31
|
+
initialize: -> {
|
32
|
+
LSP::Interface::InitializeResult.new(
|
33
|
+
capabilities: LSP::Interface::ServerCapabilities.new(
|
34
|
+
text_document_sync: LSP::Interface::TextDocumentSyncOptions.new(
|
35
|
+
change: LSP::Constant::TextDocumentSyncKind::FULL
|
36
|
+
),
|
37
|
+
completion_provider: LSP::Interface::CompletionOptions.new(
|
38
|
+
resolve_provider: true,
|
39
|
+
trigger_characters: %w(.)
|
40
|
+
),
|
41
|
+
definition_provider: true
|
42
|
+
)
|
43
|
+
)
|
44
|
+
}
|
45
|
+
}
|
46
|
+
|
47
|
+
reader.read do |request|
|
48
|
+
result = subscribers[request[:method].to_sym].call
|
49
|
+
writer.write(id: request[:id], result: result)
|
50
|
+
exit
|
51
|
+
end
|
52
|
+
```
|
26
53
|
|
27
54
|
## Development
|
28
55
|
|
data/circle.yml
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
version: 2
|
2
|
+
jobs:
|
3
|
+
build:
|
4
|
+
docker:
|
5
|
+
- image: tmaier/docker-compose
|
6
|
+
working_directory: /project
|
7
|
+
steps:
|
8
|
+
- checkout
|
9
|
+
- setup_remote_docker:
|
10
|
+
version: 17.05.0-ce
|
11
|
+
- run:
|
12
|
+
name: setup
|
13
|
+
command: |
|
14
|
+
set -x
|
15
|
+
docker info
|
16
|
+
docker volume create mtsmfm-language-server-protocol-sync
|
17
|
+
docker create -v mtsmfm-language-server-protocol-sync:/app --name mtsmfm-language-server-protocol-sync busybox chown -R 1000:1000 /app
|
18
|
+
docker cp . mtsmfm-language-server-protocol-sync:/app
|
19
|
+
docker start mtsmfm-language-server-protocol-sync
|
20
|
+
docker-compose build
|
21
|
+
docker-compose run app bin/setup
|
22
|
+
docker-compose run ruby-2-3 bin/setup
|
23
|
+
docker-compose run ruby-2-2 bin/setup
|
data/docker-compose.yml
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
version: '3.0'
|
2
|
+
services:
|
3
|
+
app: &app
|
4
|
+
build: &app-build
|
5
|
+
context: .
|
6
|
+
dockerfile: Dockerfile.development
|
7
|
+
volumes:
|
8
|
+
- mtsmfm-language-server-protocol-sync:/app:nocopy
|
9
|
+
- home:/home/ruby
|
10
|
+
- $HOME/.gitconfig:/home/ruby/.gitconfig:ro
|
11
|
+
- $HOME/.ssh:/home/ruby/.ssh:ro
|
12
|
+
- $HOME/.gem:/home/ruby/.gem
|
13
|
+
ruby-2-3:
|
14
|
+
<<: *app
|
15
|
+
build:
|
16
|
+
<<: *app-build
|
17
|
+
args:
|
18
|
+
RUBY_VERSION: 2.3
|
19
|
+
ruby-2-2:
|
20
|
+
<<: *app
|
21
|
+
build:
|
22
|
+
<<: *app-build
|
23
|
+
args:
|
24
|
+
RUBY_VERSION: 2.2
|
25
|
+
node:
|
26
|
+
build:
|
27
|
+
context: .
|
28
|
+
dockerfile: Dockerfile-node.development
|
29
|
+
volumes:
|
30
|
+
- mtsmfm-language-server-protocol-sync:/app:nocopy
|
31
|
+
- home:/home/node
|
32
|
+
volumes:
|
33
|
+
mtsmfm-language-server-protocol-sync:
|
34
|
+
external: true
|
35
|
+
home:
|
data/docker-sync.yml
ADDED
@@ -24,4 +24,7 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.add_development_dependency "bundler", "~> 1.15"
|
25
25
|
spec.add_development_dependency "rake", "~> 10.0"
|
26
26
|
spec.add_development_dependency "minitest", "~> 5.0"
|
27
|
+
spec.add_development_dependency "pry-byebug"
|
28
|
+
spec.add_development_dependency "minitest-power_assert"
|
29
|
+
spec.add_development_dependency "m"
|
27
30
|
end
|
@@ -0,0 +1 @@
|
|
1
|
+
require "language_server/protocol"
|
@@ -1,7 +1,4 @@
|
|
1
1
|
require "language_server/protocol/version"
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
# Your code goes here...
|
6
|
-
end
|
7
|
-
end
|
2
|
+
require "language_server/protocol/constant"
|
3
|
+
require "language_server/protocol/interface"
|
4
|
+
require "language_server/protocol/transport"
|
@@ -0,0 +1,11 @@
|
|
1
|
+
require "language_server/protocol/constant/error_codes"
|
2
|
+
require "language_server/protocol/constant/diagnostic_severity"
|
3
|
+
require "language_server/protocol/constant/initialize_error"
|
4
|
+
require "language_server/protocol/constant/text_document_sync_kind"
|
5
|
+
require "language_server/protocol/constant/message_type"
|
6
|
+
require "language_server/protocol/constant/text_document_save_reason"
|
7
|
+
require "language_server/protocol/constant/file_change_type"
|
8
|
+
require "language_server/protocol/constant/insert_text_format"
|
9
|
+
require "language_server/protocol/constant/completion_item_kind"
|
10
|
+
require "language_server/protocol/constant/document_highlight_kind"
|
11
|
+
require "language_server/protocol/constant/symbol_kind"
|
@@ -0,0 +1,87 @@
|
|
1
|
+
require "language_server/protocol/interface/message"
|
2
|
+
require "language_server/protocol/interface/request_message"
|
3
|
+
require "language_server/protocol/interface/response_message"
|
4
|
+
require "language_server/protocol/interface/response_error"
|
5
|
+
require "language_server/protocol/interface/notification_message"
|
6
|
+
require "language_server/protocol/interface/cancel_params"
|
7
|
+
require "language_server/protocol/interface/position"
|
8
|
+
require "language_server/protocol/interface/range"
|
9
|
+
require "language_server/protocol/interface/location"
|
10
|
+
require "language_server/protocol/interface/diagnostic"
|
11
|
+
require "language_server/protocol/interface/command"
|
12
|
+
require "language_server/protocol/interface/text_edit"
|
13
|
+
require "language_server/protocol/interface/text_document_edit"
|
14
|
+
require "language_server/protocol/interface/workspace_edit"
|
15
|
+
require "language_server/protocol/interface/text_document_identifier"
|
16
|
+
require "language_server/protocol/interface/text_document_item"
|
17
|
+
require "language_server/protocol/interface/versioned_text_document_identifier"
|
18
|
+
require "language_server/protocol/interface/text_document_position_params"
|
19
|
+
require "language_server/protocol/interface/document_filter"
|
20
|
+
require "language_server/protocol/interface/initialize_params"
|
21
|
+
require "language_server/protocol/interface/workspace_client_capabilites"
|
22
|
+
require "language_server/protocol/interface/text_document_client_capabilities"
|
23
|
+
require "language_server/protocol/interface/client_capabilities"
|
24
|
+
require "language_server/protocol/interface/initialize_result"
|
25
|
+
require "language_server/protocol/interface/initialize_error"
|
26
|
+
require "language_server/protocol/interface/completion_options"
|
27
|
+
require "language_server/protocol/interface/signature_help_options"
|
28
|
+
require "language_server/protocol/interface/code_lens_options"
|
29
|
+
require "language_server/protocol/interface/document_on_type_formatting_options"
|
30
|
+
require "language_server/protocol/interface/document_link_options"
|
31
|
+
require "language_server/protocol/interface/execute_command_options"
|
32
|
+
require "language_server/protocol/interface/save_options"
|
33
|
+
require "language_server/protocol/interface/text_document_sync_options"
|
34
|
+
require "language_server/protocol/interface/server_capabilities"
|
35
|
+
require "language_server/protocol/interface/show_message_params"
|
36
|
+
require "language_server/protocol/interface/show_message_request_params"
|
37
|
+
require "language_server/protocol/interface/message_action_item"
|
38
|
+
require "language_server/protocol/interface/log_message_params"
|
39
|
+
require "language_server/protocol/interface/registration"
|
40
|
+
require "language_server/protocol/interface/registration_params"
|
41
|
+
require "language_server/protocol/interface/text_document_registration_options"
|
42
|
+
require "language_server/protocol/interface/unregistration"
|
43
|
+
require "language_server/protocol/interface/unregistration_params"
|
44
|
+
require "language_server/protocol/interface/did_change_configuration_params"
|
45
|
+
require "language_server/protocol/interface/did_open_text_document_params"
|
46
|
+
require "language_server/protocol/interface/did_change_text_document_params"
|
47
|
+
require "language_server/protocol/interface/text_document_content_change_event"
|
48
|
+
require "language_server/protocol/interface/text_document_change_registration_options"
|
49
|
+
require "language_server/protocol/interface/will_save_text_document_params"
|
50
|
+
require "language_server/protocol/interface/did_save_text_document_params"
|
51
|
+
require "language_server/protocol/interface/text_document_save_registration_options"
|
52
|
+
require "language_server/protocol/interface/did_close_text_document_params"
|
53
|
+
require "language_server/protocol/interface/did_change_watched_files_params"
|
54
|
+
require "language_server/protocol/interface/file_event"
|
55
|
+
require "language_server/protocol/interface/publish_diagnostics_params"
|
56
|
+
require "language_server/protocol/interface/completion_list"
|
57
|
+
require "language_server/protocol/interface/completion_item"
|
58
|
+
require "language_server/protocol/interface/completion_registration_options"
|
59
|
+
require "language_server/protocol/interface/hover"
|
60
|
+
require "language_server/protocol/interface/signature_help"
|
61
|
+
require "language_server/protocol/interface/signature_information"
|
62
|
+
require "language_server/protocol/interface/parameter_information"
|
63
|
+
require "language_server/protocol/interface/signature_help_registration_options"
|
64
|
+
require "language_server/protocol/interface/reference_params"
|
65
|
+
require "language_server/protocol/interface/reference_context"
|
66
|
+
require "language_server/protocol/interface/document_highlight"
|
67
|
+
require "language_server/protocol/interface/document_symbol_params"
|
68
|
+
require "language_server/protocol/interface/symbol_information"
|
69
|
+
require "language_server/protocol/interface/workspace_symbol_params"
|
70
|
+
require "language_server/protocol/interface/code_action_params"
|
71
|
+
require "language_server/protocol/interface/code_action_context"
|
72
|
+
require "language_server/protocol/interface/code_lens_params"
|
73
|
+
require "language_server/protocol/interface/code_lens"
|
74
|
+
require "language_server/protocol/interface/code_lens_registration_options"
|
75
|
+
require "language_server/protocol/interface/document_link_params"
|
76
|
+
require "language_server/protocol/interface/document_link"
|
77
|
+
require "language_server/protocol/interface/document_link_registration_options"
|
78
|
+
require "language_server/protocol/interface/document_formatting_params"
|
79
|
+
require "language_server/protocol/interface/formatting_options"
|
80
|
+
require "language_server/protocol/interface/document_range_formatting_params"
|
81
|
+
require "language_server/protocol/interface/document_on_type_formatting_params"
|
82
|
+
require "language_server/protocol/interface/document_on_type_formatting_registration_options"
|
83
|
+
require "language_server/protocol/interface/rename_params"
|
84
|
+
require "language_server/protocol/interface/execute_command_params"
|
85
|
+
require "language_server/protocol/interface/execute_command_registration_options"
|
86
|
+
require "language_server/protocol/interface/apply_workspace_edit_params"
|
87
|
+
require "language_server/protocol/interface/apply_workspace_edit_response"
|