Commit Graph

145 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
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
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
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
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
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
13c439051c do not echo Retrieving signature help 2020-01-02 20:13:58 -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
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
ae1aa1459f support hierarchical document symbol even if we don't explicilty set it to true (#631) 2019-12-26 13:52:46 -08:00
Thomas Faingnaert
2f725fb4c3 Implement semantic highlighting (#464) 2019-12-26 10:08:30 -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
thinca
fcf5439b90 Fix error on s:set_textprops() (#600)
`bufwinid()` works on current tab page only, so when user changes the
current tab page, bufwinid() returns -1.
2019-12-15 14:20:10 +09:00
Shumpei Shiina
feefc53ea6 Jump to next/previous diagnostics other than error diagnostics (#587)
- add LspNextWarning, LspPreviousWarning commands to jump to warnings
- add LspNextDiagnostic, LspPreviousDiagnostic commands to jump to
  all kinds of diagnostics
2019-12-14 09:07:05 -08:00
Hirokazu Hata
7ebf07135e If the hover response has only empty string content, we don't display anything. (#553) 2019-12-08 14:08:57 -08:00
Thomas Faingnaert
864e7df1d2 Add explicit line numbers to prop_remove calls (#574) 2019-11-22 01:42:39 -08:00
mattn
1eef992603 Merge pull request #569 from itchyny/fix-async-error-buf-changed
fix error on switching the buffer with longer lines
2019-11-21 16:34:31 +09:00
hrsh7th
4d0ec0d698 Avoid wrong buffer open (#502) 2019-11-20 01:43:22 -08:00
itchyny
fd40b2f4d6 fix error on switching the buffer with longer lines 2019-11-20 06:30:32 +09:00
hrsh7th
5a207a7876 Avoid double tap feature in insert-mode (#558) 2019-11-15 04:16:18 -08:00
hrsh7th
28efdd0003 Fix canceling visual-mode when folding enabled. 2019-11-13 15:20:16 +09:00
Damien Radtke
19e5b08361 Open Neovim floating windows with "minimal" style (#549) 2019-11-02 10:52:02 +01:00
Yasuhiro Matsumoto
b82958c1db Use bufloaded instead 2019-11-02 12:27:29 +09:00
Yasuhiro Matsumoto
73968daf60 Ignore setting properties on unloaded buffer 2019-11-02 12:20:12 +09:00
Utkarsh Maheshwari
dd584dfcbf Add g:lsp_virtual_text_prefix option (#521)
This option allows prepending characters or text to the diagnostics
which are display as virtual text. It allows virtual text to be
differentiated from the code
2019-11-02 01:07:51 +01:00
glenvt18
47a883d7b2 Fix empty locations handling (#538)
This fixes out-of-range error for l:locations[0].
2019-10-28 16:23:41 -07:00
Thomas Faingnaert
46af4cd601 Fix cancelling insert mode (#546)
* Fix cancelling insert mode

* Revert "get proper window number (#541)"

This reverts commit 59daf85d39.
2019-10-22 01:10:29 +02:00
Thomas Faingnaert
89fd2818fb Revert "Add buffer expression to bufwinnr call (#545)" (#547)
This reverts commit 86bb8b3492.
2019-10-22 01:08:55 +02:00
Thomas Faingnaert
86bb8b3492 Add buffer expression to bufwinnr call (#545) 2019-10-21 23:46:19 +02:00
Kazuhiro Miyahara
8e849e1f55 add line num args to prop_remove (#540) 2019-10-21 11:53:22 -07:00
Kazuhiro Miyahara
59daf85d39 get proper window number (#541)
Getting proper windows number when windows is splitted
2019-10-19 13:44:46 -07:00
Christian Clason
d5ab74c91e Fixup custom-kind (#529) 2019-10-03 14:58:57 +02:00
Christian Clason
550c7eb95a Allow custom server-specific symbol and completion item kind (#524)
* allow customization of symbol_kinds

* allow customization of completion_item_kinds

* make server name optional

* add docs

* slightly rearrange documentation

* Remove trailing whitespace
2019-10-03 14:29:50 +02:00
hrsh7th
60a1d58b77 Fix #512 (#514) 2019-09-19 16:37:48 -07:00
Vu Le
da078b1096 Fix diagnostic highlighting on incorrect texts (#504) 2019-09-11 18:00:55 +02:00
Christian Clason
906bd2eafe Use locationLink for definition preview (#498)
* use locationLink for definition preview

* remove cursor setting for location link

* make vint happy

* also advertise support for declaration, typeDefinition, implementation

* small refactor

* refactor to avoid code duplication

* restore lost check for file
2019-09-10 16:20:56 +02:00
hrsh7th
b68bc8ba35 Highlight active parameter in signatureHelp (#497)
* Highlight active parameter in signatureHelp

* Support `[number, number]` form of parameter label.

* Support parameter's documentation.

* Fix extracting parameter label
2019-09-10 15:54:45 +02:00
Thomas Faingnaert
e7480252ec Check if buffer exists in folding textprops (#495) 2019-09-08 13:02:08 -07:00
Thomas Faingnaert
d7e644c2a7 Nicer syntax highlighting for hover (#441)
* Implement syntax highlighting for hover

* Fix signatureHelp
2019-09-08 11:26:22 -07:00