Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workspace/symbol support using ctags #507

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

gatesn
Copy link
Contributor

@gatesn gatesn commented Feb 16, 2019

No description provided.

@balta2ar
Copy link

@gatesn Hi! I've tried this pull request and I get this error in neovim:

[LC] invalid type: null, expected a sequence

I'm using LanguageClient-neovim with the following configuration:

let g:LanguageClient_serverCommands = {
    \ 'rust': ['rustup', 'run', 'stable', 'rls'],
    \ 'javascript': ['typescript-language-server', '--stdio'],
    \ 'typescript': ['typescript-language-server', '--stdio'],
    \ 'javascript.jsx': ['tcp://127.0.0.1:2089'],
    \ 'python': ['pyls', '-v', '--log-file', '/tmp/pyls.log'],
    \ 'json': ['vscode-json-languageserver', '--stdio'],
    \ 'go': ['go-langserver'],
    \ 'cpp': ['ccls', '--log-file=/tmp/cq.log'],
    \ 'bash': ['bash-language-server', 'start'],
    \ 'sh': ['bash-language-server', 'start'],
    \ }

Unfortunately, nothing is logged in pyls.log when I execute "workspace symbols" in LanguageClient-neovim menu.
After that I enabled logging in LanguageClient as follows:

let g:LanguageClient_loggingFile = expand('/tmp/LanguageClient.log')
let g:LanguageClient_loggingLevel = 'DEBUG'

And here is the log: http://sprunge.us/hK0o1C
I executed workspaceSymbol command at 13:48:48 (see the log).
Is there anything else I can do to help you?

@gatesn gatesn mentioned this pull request Jun 4, 2019
r'(?P<file>.*)\t'
r'/\^(?P<code>.*)\$/;"\t'
r'kind:(?P<type>\w+)\t'
r'line:(?P<line>\d+)$'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does not consider Windows line endings (\r\n). The regex will fail on Windows files. Suggest changing line to:

r'line:(?P<line>\d+)\s*$'

tags_dir = self._format_path(tag_file['directory'])

if not os.path.normpath(document.path).startswith(os.path.normpath(tags_dir)):
log.debug("Skipping onSave tag generation since %s is not in %s", tag_file_path, tags_dir)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debug message should use document.path instead of tag_file_path

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants