Commit Graph

460 Commits

Author SHA1 Message Date
Timur Celik
2a346106de Don't allow hover window to close preview window (#705)
If g:lsp_preview_float is enabled there is no reason to close the
preview window on LspHover and LspSignatureHelp. Moreover the preview
window may be in use by other plugins or by the user.

Co-authored-by: mattn <mattn.jp@gmail.com>
2020-02-08 23:16:33 +09:00
itchyny
2526438c44 Register CursorMoved event only when required (#699) 2020-02-08 22:17:57 +09:00
mattn
701c734c91 Check text_edits is null (#697)
* Check text_edits is null

Some Language Server return null

* Add test for textEdit is null

* Check additionalTextEdits is null
2020-02-01 14:17:01 +09:00
mattn
bf8d206eca Cache signature_help_trigger_chars (#696)
* Cache signature_help_trigger_chars

* Move code to the part which updating init_results.

* Tweaking delay for signature help

* Disable warning of unused-variables
2020-01-31 00:31:53 +09:00
mattn
08f702bfcd Remove \r in description in completion popup (#694) 2020-01-30 02:08:43 +09:00
mattn
2c9a2c6bdf Fix insert text (#688)
* Fix insert text

When insertTextFormat==2, it should prefer insertText. But it may include placeholder.
When insertTextFormat!=2, use insertText since it is plain-text.
When it have textEdit, the inserted text will be modified in later, so insert only word.
Otherwize, insert label since it should be what the server want to insert.

* Check with valid word pattern

* ":" should be invalid character

* Add lsp#utils#make_valid_word

* Add l: prefix

* Add test

* Add test

* \t should be ignored

Co-authored-by: hrsh7th <hrsh7th@gmail.com>
2020-01-28 14:41:30 +09:00
mattn
bfca7a974d silent call feedkeys (#691)
* clear message of calling feedkeys

* Fix comment

* Fix comment
2020-01-28 14:33:57 +09:00
mattn
47ad01195c Treat severity=1 when not specified (#686) 2020-01-23 23:46:23 +09:00
hrsh7th
b9e6816193 Use prefix filter when does not specified (#678) 2020-01-20 21:27:24 +09:00
mattn
6cbb4238e9 Check capability is dict (#675) 2020-01-19 00:39:17 +09:00
Yasuhiro Matsumoto
7b793a1d79 Check textEdit is not null 2020-01-17 21:46:46 +09:00
hrsh7th
56835a9f3d Add comment 2020-01-14 12:27:06 +09:00
hrsh7th
6262baebcd Avoid clearing managed user_data unexpectedly 2020-01-14 12:22:12 +09:00
hrsh7th
64d514d14f Fix completion for clangd (#665)
* Fix completion for clangd

* Fix for old vim
2020-01-11 20:10:33 -08:00
mattn
2f1ce88a83 Add missing function (#667)
Fixes #666
2020-01-11 11:53:22 -08:00
hrsh7th
70234feca4 Improve code action (#663)
* Improve code action

* Add LspCodeActionSync

* Fix miss argument

* Fix for the review

* Add utils and tests

* Remove unused function
2020-01-09 08:35:39 -08:00
mattn
896abb2d69 Ignore cmdwin (#664)
* Ignore cmdwin

* Ignore / cmdwin
2020-01-09 08:07:29 -08:00
Thomas Faingnaert
eadb20a0c8 Cache semantic tokens (#635)
* Move token calculation

* Cache tokens

* Avoid overflow in hash function
2020-01-06 21:07:16 +01:00
Christian Clason
8f48b74e55 Fixup lsp_location_item_to_vim (#657)
Refactoring introduced an additional +1 to line numbers; correct it for `PeekDefinition`.

see discussion on https://github.com/prabirshrestha/vim-lsp/pull/647
2020-01-05 11:13:33 -08:00
hrsh7th
fef60795ec Improve signature help with lexima.vim (#638)
* Improve signature help with lexima.vim

* Fix buffer change problem

* Display signature help after cursor jumped

* Fix event

* Add _ prefix for inner functions
2020-01-04 09:17:03 -08:00
prabirshrestha
6bb1252a9c show long of starting server 2020-01-04 09:12:12 -08:00
Yuta Sakurai
3c42f25540 Fix #651 (#652) 2020-01-02 23:06:56 -08:00
prabirshrestha
13c439051c do not echo Retrieving signature help 2020-01-02 20:13:58 -08:00
hrsh7th
c39127d85c Improve user_data format (#649) 2020-01-02 02:34:32 -08:00
hrsh7th
f769a450b2 Fix CompleteDone (#637)
* Move some codes to completion.vim that related to handling CompleteDone.

* Add abort

* Fix test

* Add l: prefix to self vars

* Disable unused vars

* Restore position

* Support snippet simple case and vim-lsp-snippets

* Support g:lsp_text_edit_enabled

* Fix for v:null results

* Fix multi-byte chars

* Add document

* Fix for vim-lsp-snippets for now

* Prepare to future improvements

* More clalify line comment

* User get_user_data instead of extract_user_data

* Always use [''] pattern for accessing dictionary property

* Fix misspelling

* More strict check for completionProvider.resolveProvider

* Fix obj.key to obj['key']

* Store completed_item id to the user_data

* Fix omni tests

* Apply for the review
- Rename expand_text_simply -> simple_expand_text
- to_col -> _lsp_to_vim
- Rename user_data key

* Add example tests

* Add timeout to completionItem/resolve in completion.vim

* Fix timeout feature

* Add timeout log

* Fix documents
2020-01-02 01:08:34 -08:00
Prabir Shrestha
4468bbc2bd add lsp#_new_command() and lsp#_last_command() (#648)
* add lsp#_new_command() and lsp#_last_command()

* remove log

* fix rename
2020-01-01 18:18:55 -08:00
prabirshrestha
44e0823d55 fix :LspDocumentDiagnostics 2020-01-01 18:12:26 -08:00
Prabir Shrestha
b02345d223 added lsp#utils#location#_lsp_to_vim_list (#647)
* added lsp#utils#location#_lsp_to_vim_list
* check of response.result
* remove lsp#ui#vim#utils#locations_to_loc_list
* refactor to use s:open_location
* use lsp#utils#is_file_uri
2020-01-01 16:10:33 -08:00
Prabir Shrestha
3aba91cf71 remove lsp#utils#to_col in favor of lsp#utils#position#_lsp_to_vim (#645)
* refactor to use lsp#utils#position#_lsp_to_vim
* remove lsp#utils#to_col in favor of lsp#utils#position#_lsp_to_vim
* fix doc
2020-01-01 13:33:36 -08:00
Prabir Shrestha
c347a80dfa fix _open_lsp_location (#646) 2020-01-01 11:58:31 -08:00
Prabir Shrestha
c35a328774 refactor LspTypeHierarchy (#643)
* add lsp#utils#buffer#_open_lsp_location(location)
add lsp#utils#position#lsp_to_vim(expr, position)
add visual selection when using _open_lsp_location
update tagstack when opening hierarchy item
* move to location.vim
* use normal!
* rename to lsp#utils#position#_lsp_to_vim
* update bufnr to the latest buffer
2019-12-31 22:37:14 -08:00
Prabir Shrestha
8c5ee44eee lsp#utils#tagstack#_update (#642) 2019-12-31 19:25:37 -08:00
Prabir Shrestha
67caa411c8 add initial support for type hierarchy (#641) 2019-12-31 17:12:55 -08:00
Thomas Faingnaert
094a49dccd Cache base64 alphabet (#634) 2019-12-27 11:47:33 +01:00
Prabir Shrestha
ae1aa1459f support hierarchical document symbol even if we don't explicilty set it to true (#631) 2019-12-26 13:52:46 -08:00
Prabir Shrestha
7ccab31b79 default hierarchicalDocumentSymbolSupport to false for documentSymbol (#630) 2019-12-26 12:52:42 -08:00
Thomas Faingnaert
2f725fb4c3 Implement semantic highlighting (#464) 2019-12-26 10:08:30 -08:00
Vu Le
d3ce720d43 no text document did save delay by default (#629) 2019-12-26 10:03:32 -08:00
Prabir Shrestha
9becd620b7 escape \r in preview (#626) 2019-12-25 22:45:29 -08:00
nhaliday
fa10d415d5 Fix an issue in highlighting of references. (#506)
The client tracks whether it has received a response using a global
'pending' variable. This commit ensures the client clears the 'pending'
variable in the case where it has received a response from the server
but that response was an error response, so that future requests actually
go through.
2019-12-25 13:15:35 -08:00
Łukasz Jan Niemier
f931d0d29f Use location list instead of quickfix for diagnostics (#335)
Diagnostics are enabled only for current document which makes it
pointless to feed them to the QuickFix which is global. This PR changes
that behaviour to use location list, which is window-local, instead.

Close #75
2019-12-25 13:00:02 -08:00
hrsh7th
5d6de67839 Fix completion when enable g:lsp_async_completion (#615) 2019-12-24 23:02:17 -08:00
mattn
abc1d83dd5 Fix textEdit completion (#572) 2019-12-23 13:59:41 -08:00
hrsh7th
a79e1614a8 Add only parameter for code action request (#607) 2019-12-23 10:05:11 -08:00
Yasuhiro Matsumoto
afaba6a1f2 Revert accidentially commits pushed to master branch. 2019-12-23 01:05:56 +09:00
Yasuhiro Matsumoto
5200a71411 Fix last position 2019-12-22 20:02:12 +09:00
Yasuhiro Matsumoto
6d44e0c200 Merge branch 'master' into fix-snippet-complete 2019-12-22 19:50:35 +09:00
Yasuhiro Matsumoto
7949fb410f Fix 2019-12-22 19:50:27 +09:00
mattn
a38c46d591 Unlet exited in server (#605)
* Unlet exited in server

* LspStopServer can be specified with name
2019-12-18 16:34:44 +09:00
FUJIWARA Takuya
380f92fcce Add :LspStopServer (#604)
* add :LspStopServer

* add :LspStatus to vim-lsp-contents
2019-12-17 21:41:51 -08:00