Commit Graph

655 Commits

Author SHA1 Message Date
Prabir Shrestha
1724318f4f get_kind_text perf improvements 2020-05-24 16:09:20 -07:00
Prabir Shrestha
ed85fbcb36 improve perf by not calling get_position() (#822) 2020-05-24 15:04:23 -07:00
Prabir Shrestha
3d0153bcf9 improve diff by using lua if available (#821)
* use lua if available for diff

* add docs

* sync with latest vim-lsc changes

* lazily init lua

* update vim to 8.2.0817

* update vim to 8.2.0817 for windows

* use vim 8.2.0814

* check for path 8.2.0775 before enabling lua

* use vim 8.2.0813 since it exists for both linux and windows

* update lua patch check

* optimize vimscript diff by using range

* fix lint issues
2020-05-24 13:03:32 -07:00
Cody Buell
a943fe558d Add ability to set unique hi for virtual text (#811)
Have virtual text default to vim-lsp defaults for each severity sign,
follow any set or link for a user defined Lsp*Text highlight group, but
allow for unique hi for Lsp*Virtual.

Updated documentation to reflect changes.  Fixed typo in README.md.
2020-05-08 21:37:30 -07:00
Eivy
c029ce1330 Jumping to diagnostics with command args '-nowrap' (#770)
* Add func 'lsp#utils#parse_command_options'

* Add wrap option to jumping to diagnostic

* Update doc

* Fix lint error

* Remove debug code
2020-05-02 18:41:55 -07:00
Timur Celik
e475e0a407 Add example for g:lsp_get_vim_completion_item (#797)
I added an example because there are some pitfalls if one is not fluent
in vimscript:
- using call() instead of :call
- passing a:item and varargs correctly
- variable name for FuncRef must be uppercase
- g:lsp_get_vim_completion_item must be a List

Co-authored-by: Prabir Shrestha <mail@prabir.me>
2020-05-02 18:32:23 -07:00
mattn
7ce02b0781 Fix lsp#utils#path_to_uri (#809)
This should accept URI
2020-04-30 21:55:22 +09:00
Tsuyoshi CHO
f1bc0a109e fix helptag : confilict vim-lsp-settings plugin's help (#807) 2020-04-29 17:16:15 -07:00
Sam McCall
386ee33c3c Fix capability parsing when textDocumentSync.save is a boolean (#804)
clangd recently started sending `true`; vim-lsp emits E715: Dictionary required
when preparing to save. A boolean is valid here:

https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_didSave

> Server Capability:
>
> property name (optional): textDocumentSync.save
> property type: boolean | SaveOptions
2020-04-26 12:48:53 -07:00
buztard
e37f5e31f4 Fix open_location without mods (#806)
Co-authored-by: Bastian Winkler <buz@serious.im>
2020-04-26 12:35:24 -07:00
C. Wu
5c5649bdda Avoid autocmd-once for compatibility of VIM8.0 (#802) 2020-04-25 15:42:58 -07:00
hrsh7th
73bc4f1ceb Support any completion-engine (#672)
Co-authored-by: Prabir Shrestha <mail@prabir.me>
v0.1.1
2020-04-25 08:34:12 -07:00
d86leader
cf43b59127 Fix unneccesary window splits (#774)
* fixed jump function splitting windows when file is modified
* fix open_location not working in most cases
* Fix lint warnings
* Fixed bad behavior with modified buffer
2020-04-25 08:27:44 -07:00
hrsh7th
92a56292bb Support text edit with folding (#788) 2020-04-19 10:22:48 -07:00
hrsh7th
cbddb059b5 Add snippet indicator (#759) 2020-04-19 10:14:38 -07:00
Agrin
adfdbe1483 Fix error on diagnostics from files not in buffer (#793) 2020-04-19 10:07:19 -07:00
thinca
9a4f8de6be Add <mods> support for opening new window (#776)
* Commonalize some similar functions

* Add <mods> support for some commands

Supported commands:
- :LspDeclaration
- :LspDefinition
- :LspTypeDefinition
- :LspImplementation
2020-04-19 09:59:16 -07:00
Phu Nguyen Anh
5f8f3fbeb7 Small typo (#794) 2020-04-19 09:56:44 -07:00
Mitin Arseny
5dd94c66f7 lsp_diagnostics_updated autocommand (#783)
* feat: lsp_diagnostics_updated autocommand

* docs: remove lightline.vim

* docs: generalize not only for status line
2020-04-10 20:38:28 -07:00
C. Wu
174e4bf82e Replace builtin trim() by lsp#utils#_trim() (#782)
Builtin trim() does not exist in e.g. vim 8.0, which is the default version of Ubuntu 18.04 LTS.
2020-04-07 18:36:43 +09:00
Tsuyoshi CHO
43be528071 on_xx handle callback / excepton log expand throwpoint (#778) 2020-04-04 14:12:30 +09:00
hrsh7th
4d8cd302bb Follow vscode textEdit behavior (#764)
* Follo vscode textEdit behavior

* Remove unnecessary cursor position fixing
2020-03-25 00:56:27 +09:00
mattn
f79bf39922 Count errors if severity is 1 or not have severity (#758)
* Count errors if severity is 1 or not have severity

Fixes #757

* Add test
2020-03-17 19:24:41 +09:00
Tsuyoshi CHO
a5b027193d help: fix blacklist description (#756) 2020-03-15 21:05:58 -07:00
Prabir Shrestha
24d9f18bca update vim-yggdrasil to 043d0ab53dcdd0d91b7c7cd205791d64d4ed9624 (#755) 2020-03-15 15:10:02 -07:00
hrsh7th
2de8f4d479 Compute overflow information in completion (#739)
* Fix completion for overflowinfo

* Use complete start position to compute offset

* Fix test
2020-03-05 23:22:53 +09:00
Hyeon Kim
9fa593aed4 Fix preview feature for vim without patch-8.1.1517 (#728)
Even if `g:lsp_preview_float` is true, vim-lsp should call `:pclose` if
`s:use_preview` is true.
2020-03-03 23:38:26 +09:00
mattn
85a03f2b01 Merge codeAction(s) (#736)
* Merge codeAction(s)

* Print server name

* Fix indentation

* Use empty()
2020-03-03 14:29:42 +09:00
hrsh7th
39e127ff5d Fix duplicate helptag (#738) 2020-03-03 13:25:17 +09:00
hrsh7th
46308234a2 Implement register command (#735)
* Implemente register command

* Add server_name to command context

* Expose lsp_to_vim, vim_to_lsp API's as public
2020-03-03 13:09:41 +09:00
mattn
5537feca35 Call command after edit (#734)
codeAction may contains edit and command both

Co-authored-by: hrsh7th <hrsh7th@gmail.com>
2020-03-01 00:42:48 +09:00
mattn
3d4daa4d34 Show only first line while popup visible (#731) 2020-02-28 16:10:21 +09:00
mattn
55e88054ce executeCommand do not handle response (#732) 2020-02-28 15:44:34 +09:00
mattn
b2b3199f05 Handle empty buffer-name (#730) 2020-02-28 15:12:17 +09:00
mattn
80ec75e1da Export root_uri resolved (#729)
* Export root_uri resolved

* Avoid uninitialized
2020-02-25 17:39:16 +09:00
hrsh7th
6f3d2d4e79 Update diagnostics when document open (#727) 2020-02-25 11:08:49 +09:00
hrsh7th
651bccfab8 Fix cursor pos on appling additionalTextEdit (#726) 2020-02-21 23:35:35 +09:00
mattn
77f3536c8b Add lsp#activate() (#713)
Co-authored-by: hrsh7th <hrsh7th@gmail.com>
2020-02-20 01:47:15 +09:00
itchyny
b399cde35f Stop toggling lightline on setting contents of popup (#677)
Co-authored-by: mattn <mattn.jp@gmail.com>
2020-02-19 18:52:33 +09:00
mattn
aca92ddad4 Remove suffix (#723)
* Remove suffix

* Get default value in placeholder

* Fix make_valid_word

* Fix test
2020-02-19 15:21:47 +09:00
hrsh7th
415f6e685f Fix cursor pos after text edit (#724) 2020-02-17 21:39:46 +09:00
mattn
6e78f35aad ESC to cancel workspace/symbol (#717) 2020-02-15 01:03:42 +09:00
mattn
d9e471e142 Remove typed_pattern (#704)
* Remove typed_pattern

* Rename asyncomplete_refresh_pattern to vim_lsp_refresh_pattern

* Fix textEdit to clear inserted text

* Fix when startcol can not be found

* Find first item for refresh_pattenr

* Fix

* Update doc

* Trim empty spaces right

* Use space
2020-02-15 01:00:19 +09:00
hrsh7th
3e207c0ee4 Change text edit implementation to support \r (#718)
* Change text edit implementation to support \r

* Fix edit on unloaded buffer

* Add \r\n tests

* Fix for perf

Co-authored-by: mattn <mattn.jp@gmail.com>
2020-02-15 00:39:40 +09:00
mattn
a79931dcc5 Ignore error of prop_add/prop_remove (#721)
Some language server send diagnostics which send wrong locations.

Co-authored-by: hrsh7th <hrsh7th@gmail.com>
2020-02-14 20:45:23 +09:00
Maxim Kim
f36410202e Resolve LspHover Conceal Issue (#720)
1. Do not clear Conceal highlight group
2. Do not highlight concealed chars by using syntax region.
   This fixes different background of concealed cchar and popup window
   original solution had.

See #719 for details.
2020-02-14 11:31:56 +01:00
mattn
9962ef9ac8 Show only first line while popup visible (#714) 2020-02-13 07:51:53 -08:00
hrsh7th
20d1cf3968 Expand snippets after some textEdit related modifications (#682)
* Expand snippets after some textEdit related modifications

* Remove `vim-lsp-snippets` specific codes

Co-authored-by: mattn <mattn.jp@gmail.com>
2020-02-10 12:53:21 +09:00
Fujiwara Takuya
682a20caf5 g:lsp_diagnostics_{echo,float}_cursor are NOT exclusive (#711) 2020-02-09 19:01:12 -08:00
Prabir Shrestha
fabb572f7e document vim-vsnip for snippets (#710) 2020-02-09 09:20:39 -08:00