Commit 7b5fc04b authored by Daniel Espinosa Ortiz's avatar Daniel Espinosa Ortiz

added missing files

parent 6d4fda00
Pipeline #42132 canceled with stages
in 4 minutes and 22 seconds
......@@ -30,6 +30,7 @@ build:
- cd gtktester
- ./autogen.sh --prefix=/usr
- make && make install
- cd ..
- broadwayd &
- GDK_BACKEND=broadway make check
- meson _build -Dui-test-interactive=false --prefix=/usr
......
/* gvls-client-lsp.vala
*
* Copyright 2018 Daniel Espinosa <esodan@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using Jsonrpc;
public interface GVls.ClientLsp : Jsonrpc.Client
{
public abstract Workspace workspace { get; internal set; }
public abstract IOStream stream { get; internal set; }
public abstract bool initialized { get; internal set; }
public abstract bool connected { get; internal set; }
public virtual void connect (IOStream stream)
requires (workspace != null)
{
this.stream = stream;
//call ("initialize", )
}
}
/* gvls-gworkspace.vala
*
* Copyright 2018 Daniel Espinosa <esodan@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using Jsonrpc;
public class GVls.GWorkspace : Object, Workspace
{
Container folders = new GContainer ();
Container whatched_files = new GContainer ();
public Container folders { get; }
public Container whatched_files { get; }
}
/* gvls-server-lsp-stream.vala
*
* Copyright 2018 Daniel Espinosa <esodan@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using Jsonrpc;
public class GVls.ServerLspStream : Jsonrpc.Server, ServerLsp
{
public Workspace workspace { get; internal set; }
public IOStream stream { get; internal set; }
public bool initialized { get; internal set; }
public ServerLspStream (IOStream stm) {
stream = stm;
workspace = new GWorkspace ();
}
}
/* gvls-server-rpc.vala
*
* Copyright 2018 Daniel Espinosa <esodan@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using Jsonrpc;
public interface GVls.ServerLsp : Jsonrpc.Server
{
public abstract Workspace workspace { get; internal set; }
public abstract IOStream stream { get; internal set; }
public abstract bool initialized { get; internal set; }
public virtual void run (IOStream stream)
requires (workspace != null)
{
this.stream = stream;
add_handler ("initialize", initialize);
accept_io_stream (stream);
}
static void initialize (Jsonrpc.Server server, Jsonrpc.Client client,
string method, Variant id, Variant @params)
{
if (method != "initialize") return;
var srv = server as ServerLsp;
srv.initialized = true;
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment