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
w0rp
d9717147bf
Close #1559 - Report errors from LSP servers in :ALEInfo
2018-05-28 16:24:15 +01:00
w0rp
d8d09c2048
Close #1428 Implement LSP hover-like functionality for tsserver too
2018-04-26 21:54:11 +01:00
w0rp
ef130c4428
#1428 Start implementing LSP hover support
2018-04-22 22:00:25 +01:00
w0rp
286abd12d3
Add support for finding references using LSP servers or tsserver
2018-04-22 19:49:30 +01:00
w0rp
0a0535546f
Add a command for stopping all LSP clients
2018-03-06 10:23:55 +00:00
w0rp
2c2c7ceb1d
Fix #1384 - Handle warnings and suggestions for tsserver
2018-03-02 20:33:45 +00:00
w0rp
a5ec4143d2
Fix the didSave tests so they work in NeoVim 0.1.7, and do not send the message for tsserver
2018-01-19 16:50:04 +00:00
Rafael Lerm
042dec059a
Send didSave message to LSP-based linters ( #1295 )
...
* Also send didSave to LSP linters.
* Add tests for messages sent to LSP linters.
2018-01-19 16:40:55 +00:00
w0rp
1568bf8128
Fix the mscs tests on Windows, and use the improved Simplify for all tests instead.
2017-12-19 18:23:09 +00:00
w0rp
21b460bb1d
Implement go to defintion for LSP linters
2017-11-26 22:27:08 +00:00
w0rp
8254e507d6
#1162 Get LSP completions working reasonably well
2017-11-26 13:01:01 +00:00
w0rp
b1a6abdda6
#1162 Add unfinished experimental code for supporting LSP completion, clean up the tests, and make the completion cancelling better
2017-11-26 12:24:18 +00:00
w0rp
7ea3aba5e5
Quietly add go to definition support for tsserver
2017-11-21 00:21:45 +00:00
Michael Jungo
fb00acf734
Remove id from LSP notifications
2017-11-11 19:28:24 +01:00
w0rp
fa7d041c26
Fix #1085 - Add a final newline character to tsserver and LSP messages
2017-11-05 21:41:53 +00:00
w0rp
b3a9a0e3e8
Fix some path issues, and get lsp dir tests passing on Windows
2017-09-09 18:39:56 +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
79d4935ccf
Cover special LSP initialize response handling with Vader tests
2017-07-30 23:53:46 +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