Skip to content

Commit 052bf44

Browse files
committed
Rename lsp_client_py and pylspc to lsp
1 parent 9707a6d commit 052bf44

15 files changed

+16
-16
lines changed

plugin/tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ setenv = PYTHONDONTWRITEBYTECODE=1
1515
basepython = python
1616
commands =
1717
flake8 vimliq/ \
18-
vendor/lsp_client_py/pylspc/ \
18+
vendor/lsp_client_py/lsp/ \
1919
vim_liq.py \
2020
install_lsp_servers.py
2121
deps =

plugin/vendor/lsp_client_py/Makefile renamed to plugin/vendor/lsp/Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ test:
22
py.test tests/
33

44
lint:
5-
pycodestyle --max-line-length=100 pylspc/
5+
pycodestyle --max-line-length=100 lsp/
66
pycodestyle --ignore=E402 --max-line-length=100 tests/
7-
# pydocstyle pylspc/
7+
# pydocstyle lsp/
File renamed without changes.
File renamed without changes.
File renamed without changes.

plugin/vendor/lsp_client_py/tests/context.py renamed to plugin/vendor/lsp/tests/context.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
import os
1818
import sys
1919
sys.path.insert(0, os.path.abspath('..'))
20-
import pylspc
20+
import lsp

plugin/vendor/lsp_client_py/tests/test_e2e.py renamed to plugin/vendor/lsp/tests/test_e2e.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,21 @@
2222

2323
import pytest
2424

25-
from .context import pylspc
25+
from .context import lsp
2626

2727
logging.basicConfig(level=logging.DEBUG)
2828

2929

3030
@pytest.fixture(scope="module")
3131
def lsp_pipe():
32-
thing = pylspc.jsonrpc.JsonRpcStdInOut(["pyls"])
32+
thing = lsp.jsonrpc.JsonRpcStdInOut(["pyls"])
3333
return thing
3434

3535

3636
@pytest.fixture(scope="module")
3737
def lsp_client():
38-
pipe = pylspc.jsonrpc.JsonRpcStdInOut(["pyls"])
39-
thing = pylspc.client.LspClient(pipe)
38+
pipe = lsp.jsonrpc.JsonRpcStdInOut(["pyls"])
39+
thing = lsp.client.LspClient(pipe)
4040
return thing
4141

4242

plugin/vim_liq.vim

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ python import os
3939
python import sys
4040
python import vim
4141
python sys.path.append(vim.eval('expand("<sfile>:h")'))
42-
python sys.path.append(os.path.join(vim.eval('expand("<sfile>:h")'), "vendor/lsp_client_py"))
42+
python sys.path.append(os.path.join(vim.eval('expand("<sfile>:h")'), "vendor/lsp"))
4343
python from vim_liq import LSP
4444
python from vim_liq import LSP_LOG
4545

plugin/vimliq/client.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
import os
2222
import re
2323

24-
import pylspc.client
25-
import pylspc.jsonrpc
24+
import lsp.client
25+
import lsp.jsonrpc
2626

2727
from . import vimutils as V
2828

@@ -121,11 +121,11 @@ def shutdown(self):
121121
def start_server(self):
122122
"""Start the LSP client and the server."""
123123
if self._transport == "STDIO":
124-
rpc_class = pylspc.jsonrpc.JsonRpcStdInOut
124+
rpc_class = lsp.jsonrpc.JsonRpcStdInOut
125125
else:
126126
raise VimLspError("Unknown transport protocol: {}".format(self._transport))
127127

128-
self._client = pylspc.client.LspClient(self._start_cmd, rpc_class=rpc_class)
128+
self._client = lsp.client.LspClient(self._start_cmd, rpc_class=rpc_class)
129129
path = os.getcwd()
130130
# TODO: What happens if init fails?
131131
self._client.initialize(root_path=path, root_uri=path)

plugin/vimliq/clientmanager.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
import logging
2222
import os
2323

24-
import pylspc.client
25-
import pylspc.jsonrpc
24+
import lsp.client
25+
import lsp.jsonrpc
2626

2727
from . import client
2828
from . import vimutils as V
@@ -38,7 +38,7 @@ def handle_error(func):
3838
def wrapper(*args, **kwargs):
3939
try:
4040
func(*args, **kwargs)
41-
except pylspc.client.LspError as exc:
41+
except lsp.client.LspError as exc:
4242
log.debug("Got error from LSP server. message=%s, code=%s, data=%s",
4343
exc, exc.code, exc.data)
4444
except Exception:

0 commit comments

Comments
 (0)