Commit Graph

56 Commits

Author SHA1 Message Date
godbless d484347fb5
Add ALEGoToImplementation (#4160)
* Add go to implementation

* Add test cases for GoToImplementation

* Add documentation for GoToImplementation
2022-04-30 12:28:26 +09:00
godbless 3348222abc
Add CodeAction codeActionLiteralSupport Feature (#4163)
* Advertise codeActionLiteralSupport to LSP server

Without this, rust-analyzer doesn't return any code actions.  With it,
everything works properly.

* linter fixes

* test cases fixes

* Fix underflow of column in position.

Special values like for example -1 to denote the end of a line are not supported.
[reference](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#position)

Co-authored-by: Brian Gernhardt <brian@gernhardtsoftware.com>
2022-04-29 22:17:29 +09:00
w0rp b42153eb17
Fix #4098 - Clear LSP data when servers crash 2022-03-02 16:51:50 +00:00
Dalius Dobravolskas 5b792c7641
ALEFileRename command added. (#4012)
* ALEFileRename command added.

This command renames file and uses tsserver `getEditsForFileRename` to
fix import paths in Typescript files.

* ale#util#Input fix

* Even more fixes.

* Linting error fix.
2021-12-17 08:09:26 +09:00
Horacio Sanson c7e3f1a0dd
Fix 3207 - do not send didSave notification if not supported (#3930) 2021-10-15 08:42:07 +09:00
Wilson E. Alvarez 42a6e039cb
Implement textDocument/didSave includeText optional argument (#3925) 2021-10-07 20:48:54 +09:00
Alex LaFroscia d340710fcf
Support going to type definition with tsserver (#3545) 2021-02-20 16:09:28 +00:00
Dalius Dobravolskas 01800a23ad
Support for LSP/tsserver Code Actions (#3437)
* Added tsserver and LSP code action support.
* tsserver refactors support added.
* Handling special case when new text is added after new line symbol.
* ale#code_action#ApplyChanges simplified.
* Initial attempt on LSP Code Actions.
* workspace/executeCommand added.
* Some null checks added.
* Add last column to LSP Code Action message.
* Pass diagnostics to LSP code action.

Previously ApplyChanges code was applied from top-to-bottom that required 
extra parameters to track progress and there was bug. I have changed code
to bottom-to-top approach as that does not require those extra parameters
and solved the bug.

Tested with typescript-language-server and it is working.
2020-11-14 10:15:17 +00:00
w0rp 4df352eee5
Fix #3294 - Fix hover off by 1, handle LSP server crashes 2020-08-18 01:48:07 +01:00
w0rp 9bdabce8df
Fix #2907 - Handle dictionaries for capabilities 2020-08-07 10:54:38 +01:00
Jerko Steiner 3e8c8d3ccb Add ALERename (tsserver & LSP), ALEOrganizeImports (tsserver) and auto import support (tsserver) (#2709)
This commit adds support for renaming symbols in tsserver and with LSP tools, and for organising imports with tsserver. Completion results for symbols that can be imported are now suggested if enabled for tsserver completion done via ALE.
2019-09-12 21:53:23 +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 c4328f2a31
#2132 - Support deferred execution for LSP executables, commands, and addresses 2019-02-27 23:26:32 +00:00
w0rp 5b6df0a85f
Fix #2299 - Make tsserver run again 2019-02-15 15:34:31 +00:00
w0rp 0d10653a7c
Fix #2295 - Respond to initialize with an initialized message 2019-02-15 08:54:53 +00:00
w0rp 89039187da
Fix #2294 - Fix some syntax that broke LSP 2019-02-15 08:32:01 +00:00
w0rp 1ee56713b8
#2132 Use an on-init callback for all LSP logic 2019-02-13 17:26:37 +00:00
w0rp 422908a572
#2009 - Force Windows jobs to run in a CMD shell 2019-02-08 21:33:16 +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 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
w0rp d476578a40
Improve ALE project style checking
* The project style linter now runs while you type.
* Now the scripts for checking the project require blank lines.
* Many style issues have been found and fixed.
2018-09-04 16:51:18 +01:00
w0rp 339930ad68
Fix #1859 - Make the connection ID available on the connection object 2018-08-28 10:18:37 +01:00
w0rp c4eca7c417
Use one LSP connection per project 2018-08-24 13:16:58 +01:00
w0rp ad8b260519
Fix #1816 - Fix a type error in the initialize message handler 2018-08-16 14:19:12 +01:00
w0rp fc94fd4deb
Use lambdas for LSP message callbacks, which are easier to manage 2018-08-08 20:08:51 +01:00
w0rp 06132954b1
Switch to v:t_ variables for type checks 2018-07-25 01:27:28 +01: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
w0rp e46474ac0a
Close #830 - Implement LSP connections via TCP sockets 2018-07-03 01:41:46 +01:00
w0rp 5aba55bb86
#830 Make the LSP socket code so far use the new socket API 2018-07-03 00:30:26 +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 1a4b08539b Allow initialization options to be passed to language servers 2018-06-06 17:53:36 +01:00
w0rp fae9167083
Fix LSP message handling when the handler doesn't get strings, somehow 2018-06-01 14:49:13 +01:00
w0rp 0a0535546f Add a command for stopping all LSP clients 2018-03-06 10:23:55 +00:00
Michael Jungo fb00acf734 Remove id from LSP notifications 2017-11-11 19:28:24 +01:00
w0rp e53debe000 Fix #907 - Stop LSP integration breaking with empty string keys in NeoVim 2017-09-04 00:15:13 +01:00
w0rp d5ae3201a4 Ban !=# and !=? from the codebase 2017-08-11 00:31:42 +01:00
w0rp a535d07f28 Ban use of ==# or ==? in the codebase, and prefer is# or is? instead 2017-08-08 08:39:13 +01:00
w0rp 09d50ebe31 Cover the Rust LSP with tests, allow LSP linters to be named anything, and rename the Rust LSP linter to `rls` 2017-08-02 23:21:30 +01:00
w0rp 2c252c0f12 #517 - Get the Rust language server working in a basic way 2017-07-30 23:34:58 +01:00
w0rp 6000d956f0 When servers never send an initialize response, but instead just publish diagnostics straight away, handle that as an initialize response 2017-07-30 22:18:19 +01:00
w0rp 84af543907 Fix some bugs so the PHP language server will show errors at least once 2017-07-30 14:42:00 +01:00
w0rp cd860e3e8d #517 Add more code LSP support which makes the tssserver linter behave more like the LSP linters 2017-07-26 10:37:37 +01:00
w0rp 5b731f761f Refactor LSP jobs to use a uniform ID value 2017-07-02 10:58:18 +01:00
w0rp 9f21e45156 Add some experimental completion code for tsserver 2017-07-02 10:58:18 +01:00
w0rp 25e4d1a353 #649 Output the tsserver command in ALEInfo 2017-06-14 16:53:21 +01:00
w0rp aef58f598c Handle LSP responses for different files more consistently 2017-06-13 17:53:47 +01:00