Commit Graph

76 Commits

Author SHA1 Message Date
Nils Kuhnhenn 79d1b99067 Use JSON output for eslint and fix tsserver column 2019-06-02 14:39:03 +02:00
Martino Pilia 5542db1507 Support custom LSP notifications
Allow to send custom notification mesages, that expect no response from
the server.
2019-06-01 16:27:44 +02:00
Martino Pilia 3321685940 Refactor LSP custom request handling 2019-05-31 21:56:38 +02:00
Martino Pilia 7053d468cc Add API for custom LSP requests
Implement a function `ale#lsp_linter#SendRequest` that allows to send
custom LSP requests to an enabled LSP linter.

Resolves #2474
2019-05-31 17:58:27 +02:00
w0rp 36c35d840b Fix LSP tests 2019-05-24 01:13:52 +01:00
w0rp 937138dad4 Try to fix the tests 2019-05-20 20:06:44 +01:00
w0rp 4ee28d3129 Fix #2515 - Send client capabilities to LSP servers 2019-05-20 09:40:06 +01:00
w0rp 381fe1badf Close #829 - Close LSP documents when buffers are deleted 2019-05-14 00:21:58 +01:00
w0rp 79e42fed14 #2403 - Make ale_disable_lsp apply consistently, and document it better 2019-05-10 13:42:41 +01:00
Jethro Shuwen Sun 7f31065fce improve the lsp diagnostic message format (#2425) 2019-04-15 14:36:18 +01:00
w0rp ce64e349cd Close #2132 - Add deprecation warnings for old features 2019-04-07 16:24:08 +01:00
w0rp 3bebcb5d48 #2132 - Replace command_chain and chain_with with ale#command#Run 2019-04-07 14:58:06 +01:00
w0rp 435a072181 #2397 - didChangeConfiguration should be a notification 2019-04-02 22:00:03 +01:00
w0rp c4328f2a31 #2132 - Support deferred execution for LSP executables, commands, and addresses 2019-02-27 23:26:32 +00:00
w0rp 883978ece9 #2132 - Replace all uses of foo_callback with foo 2019-02-22 18:05:04 +00:00
w0rp 1a69c9c88c #2295 Send an empty object for the initialized notification, per the spec 2019-02-15 10:44:45 +00:00
w0rp 0d10653a7c Fix #2295 - Respond to initialize with an initialized message 2019-02-15 08:54:53 +00:00
w0rp 1ee56713b8 #2132 Use an on-init callback for all LSP logic 2019-02-13 17:26:37 +00:00
w0rp 81c73da3b9 #2132 - lint and fix with ale#command#Run
A new function is added here which will later be modified for public use
in linter and fixer callbacks. All linting and fixing now goes through
this new function, to prove that it works in all cases.
2019-02-06 22:00:11 +00:00
brian m. carlson 6fc016ad05 Add additional ways to detect LSP project root
Currently, we detect the linter root based on a variety of techniques.
However, these techniques are not foolproof. For example, clangd works
fine for many things without a compile_commands.json file, and Go
projects may be built outside of the GOPATH to take advantage of Go
1.11's automatic module support.

Add global and buffer-specific variables to allow the user to specify
the root, either as a string or a funcref. Make the funcrefs accept the
buffer number as an argument to make sure that they can function easily
in an asynchronous environment.

We define the global variable in the main plugin, since the LSP linter
code is not loaded unless required, and we want the variable to be able
to be read correctly by :ALEInfo regardless.
2019-01-26 04:46:41 +00:00
brian m. carlson 766636e0c4 test/lsp: ensure linter name is set
All linters should have a name variable set in their dictionary, and
code should be able to rely on that. Fix this test such that its example
linter contains a name entry.
2019-01-26 04:46:41 +00:00
Andrey Popp d0284f22ea Add textDocument/typeDefinition for LSP (#2226)
* Add textDocument/typeDefinition for LSP

Doc to spec https://microsoft.github.io/language-server-protocol/specification#textDocument_typeDefinition

This works like textDocument/definition but resolves a location of a
type of an expression under the cursor.

I'm not sure what to do with tsserver though.

* Fix passing column to LSP
* test_go_to_definition: wording
* Add tests for textDocument/typeDefinition
* Add docs for textDocument/typeDefinition
2019-01-21 23:06:28 +00:00
w0rp a4932679b5 Merge pull request #2224 from andreypopp/andreypopp/lsp-hover-fix-column
Adjust column to be 0-based for LSP messages
2019-01-21 21:11:02 +00:00
Andrey Popp c2e4b553d0 Update tests 2019-01-21 18:36:52 +03:00
Andrey Popp e960e54eca Update tests 2019-01-21 17:40:33 +03:00
Bjorn Neergaard d2b0ae8108 Merge branch 'master' into sridhars 2018-11-29 14:57:35 -07:00
Bjorn Neergaard ef641dda80 Add test for detail in lsp ReadDiagnostics 2018-11-29 14:51:01 -07:00
w0rp 5f206d900e Merge pull request #2035 from jparise/lsp_config_callback
Add a `lsp_config_callback` linter option
2018-10-31 16:24:11 +00:00
w0rp 4ef2c81e95 Implement LSP symbol search 2018-10-31 16:13:31 +00:00
Jon Parise 2ac9e2a29e Only send LSP config updates when the dict changes
Each LSP connection now stores its configuration dictionary. It is
initially empty (`{}`) and is updated each time the LSP connection is
started. When a change is detected, the workspace/didChangeConfiguration
message is sent to the LSP servers with the updated configuration.
2018-10-31 08:42:42 -07:00
Daniel Welch 2000436dfd LSP configuration via didChangeConfiguration (#1852)
* adding LSP configuration via workspace/didChangeConfiguration
2018-10-22 13:24:46 +01:00
w0rp c4eca7c417 Use one LSP connection per project 2018-08-24 13:16:58 +01:00
w0rp a366d325a7 Merge pull request #1815 from fredemmott/lsp-related-information
If present, use new-ish LSP 'relatedInformation' field for :ALEDetail
2018-08-20 16:59:21 +01:00
w0rp ad8b260519 Fix #1816 - Fix a type error in the initialize message handler 2018-08-16 14:19:12 +01:00
Fred Emmott 4923d48d53 Correct related information line numbers from 0-based to 1-based 2018-08-15 14:46:57 -07:00
Fred Emmott 764da48c57 Test file was the wrong way around 2018-08-15 14:40:51 -07:00
Fred Emmott c467db3ed9 Better formatting 2018-08-15 14:31:30 -07:00
Fred Emmott 484a70f0c0 Use new-ish LSP 'relatedInformation' field for :ALEDetail 2018-08-15 14:19:32 -07:00
Fred Emmott 04362c746d Add test for LSP code of -1 2018-08-02 09:30:22 -07:00
Fred Emmott 2768bf15ba Handle LSP codes for %code% in message formats
fixes #1767
2018-08-02 09:06:48 -07:00
w0rp 6dc737cda1 Check LSP capabilities before using them 2018-07-22 19:04:55 +01:00
w0rp 61a5880747 Capture server capabilities from LSP servers 2018-07-19 21:15:05 +01:00
MTDL9 021f59b3f4 Support strings in data field of error responses 2018-07-13 06:42:28 +02:00
w0rp 344e0fec97 Fix tests on Windows 2018-07-06 20:52:47 +01:00
w0rp 1e9b36cdbf Fix tests on Windows 2018-07-06 08:15:54 +01:00
w0rp 0dd356aa52 Fix the broken tests 2018-07-06 01:00:30 +01:00
w0rp d5b4f6f7e7 Fix command formatting for LSP linters 2018-07-05 21:48:47 +01:00
w0rp bda89506ba Lazy-load LSP linters, and check b:changedtick before notifying about changes 2018-06-15 10:01:28 +01:00
Ben Falconer 641c0c797b Pass rootUri to LSPs in addition to rootPath 2018-06-06 17:53:36 +01:00
Ben Falconer 1a4b08539b Allow initialization options to be passed to language servers 2018-06-06 17:53:36 +01:00