Class: Kanayago::LSP::Server
- Inherits:
-
Object
- Object
- Kanayago::LSP::Server
- Defined in:
- lib/kanayago/lsp/server.rb
Overview
Language Server Protocol server for Kanayago
Instance Method Summary collapse
-
#initialize(input: $stdin, output: $stdout) ⇒ Server
constructor
A new instance of Server.
- #start ⇒ Object
Constructor Details
#initialize(input: $stdin, output: $stdout) ⇒ Server
Returns a new instance of Server.
10 11 12 13 14 15 16 17 |
# File 'lib/kanayago/lsp/server.rb', line 10 def initialize(input: $stdin, output: $stdout) @input = input @output = output @writer = LanguageServer::Protocol::Transport::Io::Writer.new(@output) @reader = LanguageServer::Protocol::Transport::Io::Reader.new(@input) @diagnostics = DiagnosticsProvider.new @documents = {} # URI => content mapping end |
Instance Method Details
#start ⇒ Object
19 20 21 22 23 |
# File 'lib/kanayago/lsp/server.rb', line 19 def start @reader.read do |request| handle_request(request) end end |