654 Commits

Author SHA1 Message Date
Prabir Shrestha
d6891ade6f add windows support in .travis.yml (#225) 2018-12-28 00:41:49 -08:00
Prabir Shrestha
74ad1e1c0d fix lint issues and enable linting for autoload folder (#224) 2018-12-27 23:03:49 -08:00
Prabir Shrestha
2db2c45de6 add basic .travis.yml CI support for linting (#223) 2018-12-27 22:12:51 -08:00
mattn
de6ae74b86 Check result is null (#222)
Completion possibly return null
2018-12-27 11:50:35 -08:00
Linda_pp
f67ef09f15 Allow 'cmd' configuration without lambda expression (#219) 2018-12-21 19:21:31 -08:00
mattn
b58841b0a1 Merge pull request #215 from prabirshrestha/sync-request
Add option to request synchronized .
2018-12-21 12:25:04 +09:00
Yasuhiro Matsumoto
7cc8a70ae7 Update doc 2018-12-21 11:24:57 +09:00
Yasuhiro Matsumoto
cf9a214e9d Update doc 2018-12-21 11:24:08 +09:00
Yasuhiro Matsumoto
c686037942 Update doc 2018-12-21 11:08:05 +09:00
mattn
b1083bfc2b Merge pull request #218 from prabirshrestha/fix-216
Correct end position for editing
2018-12-21 10:50:24 +09:00
Yasuhiro Matsumoto
eba9ca25c0 Show error description 2018-12-21 10:49:17 +09:00
Yuri Skripachov
3f6b3cfcb2 fix-216 2018-12-21 09:08:00 +09:00
Yasuhiro Matsumoto
395c63eee9 Correct end position for editing
When end column is 0, This mean 'whole-line'.

Fixes #216
2018-12-20 15:31:49 +09:00
hokorobi
8a8734a76f Fix help markup (#213) 2018-12-18 13:25:58 -08:00
Ryan Badour
832be4e92e Update README.md (#217)
Added :LspStatus to list of commands and sorted the list alphabetically.
2018-12-18 13:16:22 -08:00
prabirshrestha
8024ac55cd add retrieved definition message 2018-12-17 21:05:15 -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
43770c3416 Format (#209)
* Save/restore cursor position
* Cosmetic change
* selection should be inclusive
Because exclusive doesn't select fisrt character with 1GvG0
* Remove last extra \n
* Be graceful
* Use winsaveview/winrestoreview
2018-12-14 13:00:32 -08:00
mattn
018ea3203a Add <plug> mappings (#210)
* Add <plug> mappings
* Update doc
2018-12-14 09:29:27 -08:00
mattn
fac0429cd8 Handle lower-case drive-letter (#208) 2018-12-11 15:35:56 -08:00
Augusto Melo
778630e682 Fix apply text edits (#193)
The correct way to deal with edge cases (column = 0 or column = line
length) is to use selection=excluise (does not delete the last
character) and virutaledit=onemore (enable select last line
character) instead of transforming the text edits
2018-10-21 17:56:25 -07:00
Prabir Shrestha
82375012d0 Truncate diagnostics cursor message when message is too long (#191)
* truncate diagnostics message

* fix echo with truncation
2018-10-13 11:15:13 -07: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
Christian Kjær
45f9d7528e Add not_supported in scope for get_hover_under_cursor (#190)
Currently calling hover on a filetype without support throws an error, stating
that 'Unknown function: <SNR>274_not_supported'. This adds the `not_supported` 
function into the scripts' scope.
2018-10-11 20:09:32 -07:00
smhc
2e593701ad Fix erasing ALE (and other) diagnostic errors (#184)
ALE (and other plugins) echo diagnostic error messages. vim-lsp erases these by echoing a blank line unnecessarily.
2018-09-27 18:59:05 -07:00
daquexian
5a9be40bec Use word instead of WORD for renaming hint (#177) 2018-09-15 14:51:46 -07:00
Liang-Ting Chen
1886d68b9a Display detail of a completion item as info for omnifunc (#136)
* Display `detail` of a completion item as `info` for omnifunc

* Avoid unnecessary string allocations

* Fix "info not always exists in l:completion"
2018-08-26 11:37:37 -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
Prabir Shrestha
1366e07795 added :LspTypeDefinition (#165) 2018-08-06 00:29:41 -07:00
Prabir Shrestha
f9c32e36cd add additional kind mappings (#164) 2018-08-06 00:14:42 -07:00
Jiwan
a510bc66e0 Use character index instead of column index for renaming feature. (#153) 2018-08-01 20:33:39 -07:00
Adam Labbe
3cee8591aa Use fileformat to determine appropriate newline characters for didChange messages. (#160) 2018-07-26 12:21:18 -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
Augusto Melo
6e69ebd199 Fix lsp#utils#path_to_uri for windows (#156)
* Fix lsp#utils#path_to_uri for windows

When encoding the buffer path on Windows the path_to_uri transformed the
C: to C%3A causing problems to LSP functions.

To solve this it as necessary to change the function encode_uri to
receive the start position to encode, so the functions that call it can
specify were to start the encoding.

* Fixed range intervals

When you specify the max on the function range that it will become
inclusive so you need to decrease one of the length since the arrays
starts at 0
2018-07-26 11:53:38 -07:00
Alisue
3441fa8c2d Use <cWORD> as a default value of rename (#149)
In general, <cWORD> should be an initial value of rename.
2018-06-25 14:51:36 -07:00
Henry Hu
cf948126ec Fix an error when the response does not correspond to a request (#137)
* fix error when the response does not correspond to a request

* log error when the corresponding request cannot be found
2018-06-19 22:32:24 -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
James Owen
265d36fc68 Escape single quotes in text commands applied to the document (#147) 2018-06-16 15:15:25 -07:00
Pascal Loth
462bb029f1 Update README.md (#145) 2018-05-28 14:09:17 -07:00
duganchen
2f72235f1f Fix typo in documentation (#138) 2018-05-01 19:29:20 -07:00
mmktomato
1104541445 fix #130 Command Option about 'typescript-language-server' (#131) 2018-04-09 08:32:49 -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
Prabir Shrestha
7098de9c7c fixed spacing 2018-03-29 23:45:48 -07:00
Cosson2017
7d64e8aa11 add support for textDocument/implementation (#127) 2018-03-29 23:44:43 -07:00
Maxim Kot
c547986d3b Naive implementation of location preview instead of just path (#123)
* Naive implementation of location preview instead of just path

* Make cache usage actual

* Fix wrong cached line index computation. Fix copy paste.
2018-03-29 22:01:08 -07:00
prabirshrestha
1b1ae097a9 fixed doc example 2018-03-18 22:56:54 -07:00
Prabir Shrestha
18edb04073 add doc for g:lsp_preview_keep_focus and more doc for :LspHover 2018-03-18 22:44:24 -07:00
Prabir Shrestha
2db284e61e remove old handle_hover 2018-03-18 22:20:13 -07:00