Skip to content

Commit 60b50d1

Browse files
committed
Add workspace symbol support
1 parent 6dee330 commit 60b50d1

File tree

5 files changed

+14
-6
lines changed

5 files changed

+14
-6
lines changed

.circleci/config.yml

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ jobs:
66
- image: "python:2.7-stretch"
77
steps:
88
- checkout
9+
- run: apt-get update
10+
- run: apt-get install exuberant-ctags
911
- run: pip install -e .[all] .[test]
1012
- run: py.test test/
1113
- run: pylint pyls test
@@ -17,6 +19,8 @@ jobs:
1719
- image: "python:3.4-stretch"
1820
steps:
1921
- checkout
22+
- run: apt-get update
23+
- run: apt-get install exuberant-ctags
2024
- run: pip install -e .[all] .[test]
2125
- run: py.test test/
2226

README.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ All optional providers can be installed using:
3838

3939
``pip install 'python-language-server[all]'``
4040

41-
If you get an error similar to ``'install_requires' must be a string or list of strings`` then please upgrade setuptools before trying again.
41+
If you get an error similar to ``'install_requires' must be a string or list of strings`` then please upgrade setuptools before trying again.
4242

4343
``pip install -U setuptools``
4444

appveyor.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,11 @@ init:
1515
- "ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH%"
1616

1717
install:
18-
- "%PYTHON%/python.exe -m pip install --upgrade pip setuptools"
19-
- "%PYTHON%/python.exe -m pip install .[all] .[test]"
18+
- 'appveyor DownloadFile "https://github.com/universal-ctags/ctags-win32/releases/download/2018-03-13/5010e849/ctags-2018-03-13_5010e849-x64.zip" -FileName ctags.zip'
19+
- '7z e ctags.zip -oC:\Users\appveyor\bin ctags.exe'
20+
- 'set PATH=%PATH%;C:\Users\appveyor\bin'
21+
- '%PYTHON%/python.exe -m pip install --upgrade pip setuptools'
22+
- '%PYTHON%/python.exe -m pip install .[all] .[test]'
2023

2124
test_script:
2225
- "%PYTHON%/Scripts/pytest.exe test/"

pyls/plugins/ctags.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def pyls_document_did_open(self, config, workspace):
141141
ctags_exe = _ctags_exe(settings)
142142

143143
for tag_file in settings.get('tagFiles', []):
144-
mode = tag_file.get('onStart', CtagMode.DEFAULT_ON_START_MODE)
144+
mode = tag_file.get('onStart', DEFAULT_ON_START_MODE)
145145

146146
if mode == CtagMode.NONE:
147147
log.debug("Skipping tag file with onStart mode NONE: %s", tag_file)
@@ -158,7 +158,7 @@ def pyls_document_did_save(self, config, document):
158158
ctags_exe = _ctags_exe(settings)
159159

160160
for tag_file in settings.get('tagFiles', []):
161-
mode = tag_file.get('onSave', CtagMode.DEFAULT_ON_SAVE_MODE)
161+
mode = tag_file.get('onSave', DEFAULT_ON_SAVE_MODE)
162162

163163
if mode == CtagMode.NONE:
164164
log.debug("Skipping tag file with onSave mode NONE: %s", tag_file)
@@ -210,7 +210,7 @@ def execute(ctags_exe, tag_file, directory, append=False):
210210

211211
def parse_tags(tag_file, query):
212212
if not os.path.exists(tag_file):
213-
return []
213+
return
214214

215215
with io.open(tag_file, 'rb') as f:
216216
for line in f:

test/plugins/test_ctags.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Copyright 2017 Palantir Technologies, Inc.
2+
# pylint: disable=redefined-outer-name
23
import os
34
import tempfile
45

0 commit comments

Comments
 (0)