Commit Graph

225 Commits

Author SHA1 Message Date
Yasuhiro Matsumoto
058f69defc s:update_file_content must be called after checking already-opened 2019-01-16 00:30:18 +09:00
Yasuhiro Matsumoto
e40d8bf5ca Use event queue just for didChange 2019-01-16 00:06:50 +09:00
Yasuhiro Matsumoto
b9fab03285 Merge branch 'master' into fix-235 2019-01-15 23:48:48 +09:00
Yasuhiro Matsumoto
1a13828750 When no diffs, send empty changes 2019-01-15 23:43:30 +09:00
Yasuhiro Matsumoto
39b5f4418f update content 2019-01-15 23:06:11 +09:00
Yasuhiro Matsumoto
978c50a391 Update file content when didOpen 2019-01-15 15:11:32 +09:00
Yasuhiro Matsumoto
984488f021 Merge branch 'init-cb' into fix-235 2019-01-15 12:33:40 +09:00
Yasuhiro Matsumoto
679653ee52 Update content on didOpen/didSave 2019-01-15 12:32:44 +09:00
Yasuhiro Matsumoto
e817c76309 Merge branch 'master' into fix-235 2019-01-15 11:18:17 +09:00
Yasuhiro Matsumoto
df104173d3 Comment for file_content 2019-01-14 11:53:46 -08:00
Yasuhiro Matsumoto
0659ef1fd7 Remove debug code 2019-01-14 11:53:46 -08:00
Yasuhiro Matsumoto
84c8dd95d7 Hold file content per servers 2019-01-14 11:53:46 -08:00
Yasuhiro Matsumoto
27756be618 Use BufWipeout 2019-01-14 11:53:46 -08:00
Yasuhiro Matsumoto
6eee2bf988 Check textDocumentSync 2019-01-14 11:53:46 -08:00
Yasuhiro Matsumoto
ec38d8f493 Fix typo 2019-01-14 11:53:46 -08:00
Yasuhiro Matsumoto
da9920684e Check buffer exists 2019-01-14 11:53:46 -08:00
Yasuhiro Matsumoto
337cd8da9a Remove content when buffer is closed 2019-01-14 11:53:46 -08:00
Yasuhiro Matsumoto
e7fb8a2d15 should not be list 2019-01-14 11:53:46 -08:00
Yasuhiro Matsumoto
1e0c19d6bc cosmetic change 2019-01-14 11:53:46 -08:00
Yasuhiro Matsumoto
34c2a1e851 cosmetic changes 2019-01-14 11:53:46 -08:00
Yasuhiro Matsumoto
19cd6ee332 small diffs 2019-01-14 11:53:46 -08:00
Yasuhiro Matsumoto
fb44468d75 Move s:add_event_queue to lsp#utils#_event_queue#add 2019-01-11 10:51:42 +09:00
Yasuhiro Matsumoto
b1e84495b9 Fix callback 2019-01-10 18:46:18 +09:00
Yasuhiro Matsumoto
0b63cfc633 Handle TextChanged 2019-01-10 18:18:16 +09:00
Yasuhiro Matsumoto
a11bf27801 Use &updatetime 2019-01-10 18:14:54 +09:00
Yasuhiro Matsumoto
80ec1e2106 Add event queue 2019-01-10 18:13:49 +09:00
Matteo Landi
ac22efb91e Add flag to disable diagnostics (#197)
* Add switch, g:lsp_diagnostics_enabled, to disable support for diagnostics

* Reduce PR changeset
2019-01-01 20:43:46 -08:00
Prabir Shrestha
74ad1e1c0d fix lint issues and enable linting for autoload folder (#224) 2018-12-27 23:03:49 -08:00
Linda_pp
f67ef09f15 Allow 'cmd' configuration without lambda expression (#219) 2018-12-21 19:21:31 -08:00
Augusto Melo
40825e380c [RFC|RDY] code actions (#162)
* WIP code actions

It was addded the code actions funcionality
https://microsoft.github.io/language-server-protocol/specification#textDocument_codeAction

Processing the result is not quite right, because it is always applying
the c (change) command, and it does not insert the new line (\n)
character

* WIP code actions

It was addded the code actions funcionality
https://microsoft.github.io/language-server-protocol/specification#textDocument_codeAction

Processing the result is not quite right, because it is always applying
the c (change) command, and it does not insert the new line (\n)
character

* Improved apply_text_edit

Now the function apply_text_edit insert texts as well, instead of only
replacing it.

Fixed some typos and broken links

* Added documentation and fixed code_action

Now lsp#ui#vim#code_action uses the diagnostic range instead of the
get_position

* Fixed code action

The code action had a problem when it needed to delete/replace some
text, and when the code was folded it did not work since to execute do
not seem to unfold the code

* Changed copy to deepcopy

Since we modifying nested objects we need to use deepcopy

* Fixed preprocessing and added sort to textedits

To perform an unfold it is necessary to check first if the line has
fold level, if the line has foldlevel = 0 and you try to unfold it will
cause and error.

Since LSP specification does not guarantee that text edits are ordered,
we needed to sort it so it will work on any valid LSP

* Fixed text edits sort

Removed stable_sort since it is not necessary

Now it sorts the text edits in a reverse order and merge text edits
that are inserts on the same place

* Fixed codeAction deleting lines

* Passing capability on initialization

* Added buffer validation before setting the sign

This validation is necessary since the documentation states that the
file {fname} must be already be loaded in a buffer.

* Changed msgpack_type to v:true

Msgpack_type does not work on vim
2018-10-11 20:13:59 -07:00
Adam Labbe
9806023f3c Inspect buffer options to determine need for eol. (#158)
The eol option will be set if the vim found an eol at the eof. This,
combined with the binary and fixeol options can be used to determine if
the file will have eol characters at the end-of-file after vim saves the
file.
2018-08-12 14:23:54 -07:00
Adam Labbe
3cee8591aa Use fileformat to determine appropriate newline characters for didChange messages. (#160) 2018-07-26 12:21:18 -07:00
Adam Labbe
96b81a5880 Add an initialization hook to send workspace/didChangeNotification (#146)
* Add an initialization hook to send workspace/didChangeNotification

* Rename workspace_conf to workspace_config to better match existing names.
2018-06-19 22:31:23 -07:00
Tristan Konolige
8d30af911b Add command LspStatus to display the status of each language server (#134)
* add command LspStatus to display the status of each language server
* Singular function for getting server status. Added docs.
2018-06-16 15:42:30 -07:00
Daniel Hahler
859bc288ec s:on_text_document_did_open: save bufnr in local var (#128)
Only calls `bufnr()` once.
2018-04-06 20:51:42 -07:00
Tristan Konolige
a070ef4ac8 Print error message when server fails to initialize (#113)
* Print error message when server fails to initialize
* move error_msg to utils.vim
* rename error_msg to lsp#utils#error
2018-03-14 23:08:24 -07:00
Prabir Shrestha
77e548469d add lsp#stop_server('server_name') (#103) 2018-01-27 22:44:55 -08:00
Prabir Shrestha
cbf0fd26df support for showing diagnostics under cursor (#90)
* support for showing diagnostics under cursor
* added README.md
2018-01-06 18:58:35 -08:00
Prabir Shrestha
148bc9a9a1 initial support for diagnostics signs (#89) 2018-01-06 13:25:32 -08:00
Daniel Trstenjak
ed17cc85af Add initialize method params 'capabilities' and 'initializationOptions' (#62) 2017-12-23 11:02:55 -08:00
Jacob Wahlgren
c4b3b2f605 Fix errors and warnings produced by vint (#51)
* Wrap silent aucmds in augroup
Prevents stacking up multiple.
* Fix function signatures
Add ! and/or abort.
* Fix syntax and variable name typo
* Use robust equality comparison
* The == operator behaves differently depending on 'ignorecase'.
2017-10-17 10:57:08 -07:00
Prabir Shrestha
358e1eec44 added support for basic textDocument/publishDiagnostics via :LspDocumententDiagnostics 2017-09-17 23:44:50 -07:00
Prabir Shrestha
bae35d03d3 notify server instantiated notifications to client 2017-09-17 22:45:54 -07:00
Prabir Shrestha
182daba8da don't use uri for rootPath 2017-09-17 18:28:17 -07:00
Prabir Shrestha
bf7ff408ec add more logs for s:on_text_document_did_open() 2017-08-27 12:15:33 -07:00
keremc
41da621544 Cleanup & symbol kinds (#31)
* move completion code to autoload/lsp/omni.vim
* merge s:complete_counter and s:completion
* display completion item types
* comment headers
* new helper functions
2017-08-27 10:52:22 -07:00
Prabir Shrestha
7d32511a02 respect TextDocumentSaveRegistrationOptions - fixes #29 2017-08-26 15:47:21 -07:00
keremc
161ffdc054 Make lsp#complete() synchronous (by default) (#28)
* use whitelisted servers for completion
* fix lsp#complete()
* make lsp#complete() synchronous (by default)
* s:find_complete_servers_and_start_pos() is always called
* update README.md
2017-08-26 13:43:23 -07:00
Prabir Shrestha
e1de4b5022 send textDocument/didSave as notification instead of request 2017-08-26 10:06:13 -07:00
Prabir Shrestha
cf47780ebc add support for omnifunc - #25
autocmd FileType typescript setlocal omnifunc=lsp#complete
2017-08-25 21:02:38 -07:00