When using https://github.com/w0rp/ale in combination with this project, highlights (probably from this project, because they take more time to appear), are off and do not match what they should address.
@w0rp maybe you can have a look at this as well?
neovim/vim version: neovim 0.2.2
Plugin version (git SHA): 6d0e9538ea81a002d884533bb4fb1a13c2a7948e
Minimal vimrc
set nocompatible
set hidden
set runtimepath+=~/.local/share/nvim/bundle/deoplete.nvim
set runtimepath+=~/.local/share/nvim/bundle/ale
set runtimepath+=~/.local/share/nvim/bundle/LanguageClient-neovim
let g:deoplete#enable_at_startup = 1
let g:LanguageClient_serverCommands = {
\ 'python': ['pyls'],
\ }
let g:LanguageClient_autoStart = 1
let g:ale_lint_on_text_changed = 'never'
let g:ale_linters = {
\ 'python': ['flake8'],
\ }
ensure that flake8 is installed and available on path
open the following python file from disk:
class XPath(object):
@classmethod
def create(cls, name, config):
from lxml import etree
try:
xpath = config['xpath'].strip()
# validate the expression
try:
etree.fromstring('<a></a>').xpath(xpath)
except etree.XPathEvalError:
raise ConfigurationError('Invalid xpath expression: ' + xpath)
return cls(name, xpath, config['url'])
except KeyError as error:
raise ConfigurationError('No ' + str(error) +
' entry defined for the XPath check')
def __init__(self, name, xpath, url):
self._xpath = xpath
self._url = url
def check(self):
import requests
import requests.exceptions
from lxml import etree
try:
reply = requests.get(self._url).text
root = etree.fromstring(reply)
if root.xpath(self._xpath):
return "XPath matches for url " + self._url
except requests.exceptions.RequestException as error:
raise TemporaryCheckError(error)
except etree.XMLSyntaxError as error:
raise TemporaryCheckError(error)
The result will be like in this screenshot:
The blue highlights are completely off and do not correctly relate to any of the warnings, neither from flake 8 via ale, nor the ones produced by the language server.
With only ale (so g:LanguageClient_autoStart = 0), things look correct:
The other way around, with only language client, things also look ok:
If I start with ale enabled and laguage client autostart set to 0 and then after some time manually start the client, things are still broken:
Logs. Run :call LanguageClient_setLoggingLevel('DEBUG') | :LanguageClientStop | :LanguageClientStart:
When using https://github.com/w0rp/ale in combination with this project, highlights (probably from this project, because they take more time to appear), are off and do not match what they should address.
@w0rp maybe you can have a look at this as well?
Language server name/link and version: https://github.com/palantir/python-language-server, 0.12.0
Reproduction steps (from clean state)
The result will be like in this screenshot:
The blue highlights are completely off and do not correctly relate to any of the warnings, neither from flake 8 via ale, nor the ones produced by the language server.
With only ale (so
g:LanguageClient_autoStart = 0
), things look correct:The other way around, with only language client, things also look ok:
If I start with ale enabled and laguage client autostart set to 0 and then after some time manually start the client, things are still broken:
Logs. Run
:call LanguageClient_setLoggingLevel('DEBUG') | :LanguageClientStop | :LanguageClientStart
:LanguageClient.log LanguageServer.log