Commit Graph

131 Commits

Author SHA1 Message Date
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
2db2c45de6 add basic .travis.yml CI support for linting (#223) 2018-12-27 22:12:51 -08:00
Yasuhiro Matsumoto
d4c8e001e6 Add option to request synchronized .
Also add LspDocumentFormatSync. This can be used for autocmd before
saving the file.
2018-12-17 16:40:44 +09:00
mattn
018ea3203a Add <plug> mappings (#210)
* Add <plug> mappings
* Update doc
2018-12-14 09:29:27 -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
Prabir Shrestha
1366e07795 added :LspTypeDefinition (#165) 2018-08-06 00:29:41 -07:00
Prabir Shrestha
ba1cf3ba47 rename next_err to next_error() and prev_err() to previous_error() 2018-07-26 12:08:04 -07:00
Cosson2017
f19213d30b add jump to next/pre error (#129)
* add jump to next/pre error

* upd

* optimization

* fix named
2018-07-26 12:02:34 -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
Cosson2017
7d64e8aa11 add support for textDocument/implementation (#127) 2018-03-29 23:44:43 -07:00
Prabir Shrestha
29c986c729 move hover to separate file (#77) 2018-03-18 22:17:37 -07:00
Prabir Shrestha
2cc06e6bf5 bring back custom sign and fix sign when icon is not defined (#122)
* Revert "Revert "Custom signs (#115)" (#119)"

This reverts commit ce1ad6f01a.

* handle cases where sign icon is not set for gui vim
2018-03-18 12:13:44 -07:00
Prabir Shrestha
ce1ad6f01a Revert "Custom signs (#115)" (#119)
This reverts commit 8210694b25.
2018-03-17 19:47:09 -07:00
Pavel Davydov
8210694b25 Custom signs (#115)
* add variables to define custom signs

* set signs via exec

* use dict for custom signs

* support all sign params

* update readme with a note about custom signs

* add lsp highlighting groups, remove options to set texthl and linehl via dict.
2018-03-17 10:32:53 -07:00
Prabir Shrestha
2e4954cc9e don't move focus to preview window by default 2018-02-20 12:53:13 -08:00
Hayato Kawai
08fdbf51d0 Add support for keeping focus to the current window (#109)
This commit allows to stay in the current window with `:LspHover`.
This behavior enables if `g:lsp_preview_keep_focus` is `1`. (default is `0`)
2018-02-20 12:51:03 -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
Łukasz Jan Niemier
203d682e30 Create preview window instead of using quickfix list (#78)
* Create preview window instead of using quickfix list

This removes from us burden of providing formatting for content as this
is now simple as setting proper filetype.

* Create custom filetype for preview window

This will allow users to provide their own mappings and features in
hover window easily.

* Add proper statusline for LSP Hover

* Guard and undo_ftplugin

* Support all LSP hover syntaxes
2018-01-01 13:29:50 -08:00
Prabir Shrestha
358e1eec44 added support for basic textDocument/publishDiagnostics via :LspDocumententDiagnostics 2017-09-17 23:44:50 -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
8e3304d6af added :LspDocumentRangeFormat 2017-08-06 20:52:48 -07:00
Prabir Shrestha
ae9d05b4ee added :LspDocumentFormat 2017-08-06 19:00:47 -07:00
Prabir Shrestha
07534da631 check for server capabilities before making requests to the server 2017-08-06 18:13:59 -07:00
Prabir Shrestha
78f87ead78 added basic :LspRename 2017-08-06 17:03:39 -07:00
Prabir Shrestha
388f511721 added textDocument/hover support via :LspHover 2017-08-05 19:10:34 -07:00
Prabir Shrestha
57aac76a12 added support for textDocument/references via :LspReferences 2017-08-05 16:20:54 -07:00
Prabir Shrestha
0b102b5c1c added LspDefinition 2017-08-05 15:55:54 -07:00
Prabir Shrestha
650ef0f445 added commands Lsp* 2017-07-09 18:52:03 -07:00
Prabir Shrestha
007d13c69a add initial events 2017-07-08 00:43:04 -07:00
Prabir Shrestha
f2f67c2965 initial events 2017-07-08 00:41:24 -07:00