Commit Graph

47 Commits

Author SHA1 Message Date
yoshi1123 e490e87a60
Add eclipselsp jdt:// support for textDocument/definition (#4030)
This patch adds support for opening jdt:// links on "go to definition" requests returned by Java language servers.

Co-authored-by: w0rp <devw0rp@gmail.com>
2022-03-04 19:03:27 +00:00
Horacio Sanson 9a01836015
Fix check for did_save and includeText capabilities (#4008) 2021-12-09 23:22:07 +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
Jon Parise 8fd23f4b71
Introduce an ALELSPStarted autocommand (#3878)
This User autocommand is trigged immediately after an LSP process is
successfully initialized. This provides a way to perform any additional
initialization work, such as setting up buffer-level mappings.
2021-09-05 10:07:53 +09:00
w0rp b45ee8ec6c
Close #2102 - Add support for the Angular language server 2021-03-14 21:10:20 +00:00
w0rp 680ba68d81
#3599 - Use ale_root instead of ale_lsp_root
The `ale_lsp_root` setting is now deprecated, and `ale_root` should be
used instead. The setting will be used for both setting the root easily
for LSP linters, and for running other linters over whole projects.
2021-03-01 20:51:29 +00:00
w0rp 9fe7b1fe6a
Close #2281 - Separate cwd commands from commands
Working directories are now set seperately from the commands so they
can later be swapped out when running linters over projects is
supported, and also better support filename mapping for running linters
on other machines in future.
2021-03-01 20:11:10 +00:00
Dalius Dobravolskas 81d16823a7
Settings to control suggestions. 2020-11-21 15:49:42 +02:00
Dalius Dobravolskas 2ab46d4b8e
Show tsserver hints/suggestions in Ale. 2020-11-21 15:49:41 +02:00
w0rp 5bc49d2047
Fix #3183 - Escape filename characters from LSP/tsserver 2020-09-05 21:46:39 +01:00
w0rp ba3dd0d027
Close #2556 - Support filename mapping
ALE now supports mapping files between different systems for running
linters and fixers with Docker, in virtual machines, in servers, etc.
2020-08-23 19:55:42 +01:00
w0rp 5eda1df0a9
Remove features deprecated in previous versions 2020-08-18 23:03:43 +01:00
Andre Souto 5e69aaf4c2 Adding support for LSP `window/showMessage` method (#2652)
* Added base handling for window/showMessage
* Ignoring severity log
* Code formatting
* Added user configurable severity
* Preferring ale#util#ShowMessage over echo'ing directly
* Using format similar to ale_echo_msg_format for consistency
* Updating docs
* Added LSP log config string; improved tests
* Use warning as fallback for incorrect user config
2019-10-18 16:17:54 +01: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
Horacio Sanson 2f13c2d263 Add fix to HandleTSServerDiagnostics function. 2019-05-22 20:19:45 +09:00
Horacio Sanson b41836130c Fix HandleLSPDiagnostics buffer match logic.
To find the buffer corresponding to URIs reported by LSP the
HandleLSPDiagnostics() method uses the built-in bufnr() function. From
the documentation we learn that the first parameter of bufnr() is
an expression, not a path.

EclipseLSP will report project wide errors (e.g. gradle errors) that are
not related to any actual source file with an URI that corresponds to the
project root folder, e.g:

   file:///home/username/Projects/gradle-simple

This URI will match any open buffer of files within the project root
hiearchy, thus project-wide errors appear as part of every file within
the project, e.g:

   file:///home/username/Projects/gradle-simple/src/main/java/Hello.java

To fix this, this MR adds '^' to the beginning and '$' at the end of the
URI path to force an exact match. This is how is recommended in vim
help (see :h bufname).
2019-05-22 10:30:24 +09:00
w0rp 79e42fed14
#2403 - Make ale_disable_lsp apply consistently, and document it better 2019-05-10 13:42:41 +01:00
w0rp eae124e8ce
Fix #2460 - Do not track when LSP linters are busy 2019-05-01 20:49:03 +01:00
w0rp fcc2c3ba71
Fix #2415 - Mark tsserver and LSP linters inactive again 2019-04-17 18:12:50 +01:00
w0rp c4328f2a31
#2132 - Support deferred execution for LSP executables, commands, and addresses 2019-02-27 23:26:32 +00:00
w0rp f53b25d256
#2132 - Implement project_root as a replacement for project_root_callback 2019-02-22 15:24:34 +00:00
w0rp f8aeb5c5a4
#2132 - Make most foo_callback options work as foo 2019-02-22 00:35:53 +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 7487ecb957
Simplify code for marking linters as active 2019-02-14 10:10:46 +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
w0rp 452460b8cd
Merge pull request #2241 from bk2204/lsp-detect-hook
Add a hook to detect LSP project root
2019-01-26 19:40:45 +00:00
w0rp cf14d0aa53
#2132 Unify temporary file management in command.vim 2019-01-26 19:33:52 +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
w0rp c0b2090fbb
#2132 Move CreateTemporaryFileForJob calls into FormatCommand 2019-01-12 18:34:26 +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
Jon Parise b5a7593577 Add a `lsp_config_callback` linter option
This is the callback-based variant of the existing `lsp_config` linter
option. It serves the same purpose but can be used when more complicated
processing is needed.

`lsp_config` and `lsp_config_callback` are mutually exclusive options;
if both an given, a linter preprocessing error will be raised.

The runtime logic has been wrapped in `ale#lsp_linter#GetConfig` for
convenience, similar to `ale#lsp_linter#GetOptions`.

This also adds documentation and an `AssertLSPConfig` test function for
completeness.
2018-10-31 08:42:42 -07:00
w0rp caac5c93d6
#2017 Add support for display results from other sources 2018-10-29 18:28:28 +00:00
Daniel Welch 2000436dfd LSP configuration via didChangeConfiguration (#1852)
* adding LSP configuration via workspace/didChangeConfiguration
2018-10-22 13:24:46 +01:00
w0rp 213a901ccd
Stop tsserver from causing errors to be rendered redundantly 2018-09-18 17:43:17 +01:00
w0rp c4eca7c417
Use one LSP connection per project 2018-08-24 13:16:58 +01:00
w0rp 6dc737cda1
Check LSP capabilities before using them 2018-07-22 19:04:55 +01:00
w0rp a42999a639
Massively reduce the amount of code needed for linter tests 2018-07-15 18:28:28 +01:00
w0rp d5b4f6f7e7
Fix command formatting for LSP linters 2018-07-05 21:48:47 +01:00
w0rp da692b2e2d
Support formatting escaped executable names into commands with %e 2018-07-05 20:56:31 +01:00
w0rp e46474ac0a
Close #830 - Implement LSP connections via TCP sockets 2018-07-03 01:41:46 +01:00
w0rp 620951b6d3
Close #1453 #1172 - Add ale_linters_ignore for ignoring linter results 2018-06-24 21:16:45 +01:00
w0rp bda89506ba
Lazy-load LSP linters, and check b:changedtick before notifying about changes 2018-06-15 10:01:28 +01:00