LSP: can't get eslint working
Hey,
I am trying to get the eslint server working, but to no avail. I have tried the vscode-eslint server as seen in an example config (although vscode-eslint is not on npm), and I have tried several versions of the eslint server that takes the --stdin value.
The server is started, but my code doesn’t seem to output the eslint errors that I have configured to display with running eslint manually.
- OS and language server: I’ve tried it both on OSX and Linux (WSL).
- How you installed LSP (Package Control or from git?): LSP was installed in sublime from package control
- Minimal reproduction steps: Just try to get eslint working … you can’t
an example config for eslint-server:
"eslint":
{
"enabled": true,
"command":
[
"node",
"/home/karolyi/Work/private/project/node_modules/eslint-server/lib/index.js",
"--stdio"
],
},
- Log
LSP: global configs ['reason=False', 'lsp-tsserver=False', 'rls=False', 'pyls=True', 'cquery=False', 'polymer-ide=False', 'clangd=False', 'haskell-ide-engine=False', 'jdtls=False', 'ocaml=False', 'golsp=False', 'eslint=False', 'typescript-language-server=False', 'javascript-typescript-langserver=False', 'phpls=False']
LSP: window 2 has override for pyls {'command': ['/home/karolyi/Work/private/project/venv/bin/pyls'], 'languageId': 'python', 'syntaxes': ['Packages/Python/Python.sublime-syntax', 'Packages/Djaneiro/Syntaxes/Python Django.tmLanguage'], 'enabled': True, 'scopes': ['source.python']}
LSP: window 2 has override for eslint {'command': ['node', '/home/karolyi/Work/private/project/node_modules/eslint-server/lib/index.js', '--stdio'], 'enabled': True}
LSP: window 2 starting 1 initial views
LSP: window 2 requests eslint for /home/karolyi/Work/private/project/frontend/src/js/shop/sign-up.js
LSP: starting in /home/karolyi/Work/private/project
LSP: starting ['node', '/home/karolyi/Work/private/project/node_modules/eslint-server/lib/index.js', '--stdio']
LSP: --> initialize
LSP: window 2 added session eslint
LSP: {'capabilities': {'codeActionProvider': True, 'textDocumentSync': {'change': 1, 'willSaveWaitUntil': True, 'openClose': True, 'save': {'includeText': False}}, 'executeCommandProvider': {'commands': ['eslint.applySingleFix', 'eslint.applySameFixes', 'eslint.applyAllFixes', 'eslint.applyAutoFix']}}}
LSP: --> initialized
LSP: --> textDocument/didOpen
LSP: <-- client/registerCapability
LSP: {'registrations': [{'id': 'c697f786-6386-45a0-8503-adc31f5422bc', 'registerOptions': {}, 'method': 'workspace/didChangeConfiguration'}]}
LSP: Unhandled request client/registerCapability
LSP: <-- workspace/configuration
LSP: {'items': [{'scopeUri': 'file:///home/karolyi/Work/private/project/frontend/src/js/shop/sign-up.js', 'section': ''}]}
LSP: Unhandled request workspace/configuration
LSP: --> textDocument/didSave
Would there be a way for you to integrate https://github.com/tbodt/js-langserver ? It uses tern and eslint the same time, which would be perfect.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 22 (12 by maintainers)
Topic changed from
eslint-servertojs-langserverbut I’ll go back to initial problem and question:I’ve checked that:
Here is the code that sends the response: https://github.com/Microsoft/vscode-eslint/blob/ff75d429be69ec09237ee859343739768f6c4a6d/client/src/extension.ts#L470
And here is, I think, the code that validates response: https://github.com/Microsoft/vscode-eslint/blob/ff75d429be69ec09237ee859343739768f6c4a6d/server/src/eslintServer.ts#L416
It seems that LSP would need to send pretty much the same response for server not to break but I haven’t verified if that’s all that is needed.
(It would probably be best to split this discussion into two bugs, one for each LS.)
@predragnikolic
Sure thing mate, here are my configs, I’ve included literally everything I can think of for this. Let me know how you go.
Sublime Text packages:
Directory structure:
Global NPM install
tsconfig.json
.eslintrc.js
LSP settings, user
babel.config.js
Package.json