Commit Graph

24 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
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
Prabir Shrestha
9becd620b7 escape \r in preview (#626) 2019-12-25 22:45:29 -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
hrsh7th
5a207a7876 Avoid double tap feature in insert-mode (#558) 2019-11-15 04:16:18 -08:00
Damien Radtke
19e5b08361 Open Neovim floating windows with "minimal" style (#549) 2019-11-02 10:52:02 +01: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
Thomas Faingnaert
1ab8e838ef Fix float sizing in Neovim (#468)
* Fix float sizing in Neovim

* Add g:lsp_preview_max_height
2019-08-17 18:20:16 +02:00
Thomas Faingnaert
ce1488039a Fix hover on same identifier not working in Vim (#463) 2019-08-08 08:43:31 +02:00
Thomas Faingnaert
67e27494f5 Cleanup hover fix on missing filetype (#446)
Also see #442 and #443.
2019-07-25 09:10:07 +02:00
Thomas Faingnaert
79d47fea15 Fix g:lsp_preview_max_width for Neovim (#440)
* Fix g:lsp_preview_max_width for Neovim

* Fix max_width also specifying minimum width
2019-07-24 09:40:02 +02:00
Thomas Faingnaert
c2b7c23fdc Fix hover breaking on missing filetype (#443) 2019-07-24 09:12:35 +02:00
Thomas Faingnaert
55e6cd1749 Simplify conditionals in output.vim (#439) 2019-07-22 18:29:28 -07:00
Thomas Faingnaert
813ea77b91 Add LspPeekDefinition (#412)
* Add LspPeekDefinition

* Add documentation

* Add lsp-peek-definition mapping to documentation

* Add link to Vim preview-window help

* Rewrite LspPeekDefinition using preview window

* Implement peek for Vim popup window

* Make LspPeekDefinition work in Neovim

* Support align in Neovim

* Fix linter errors

* Extract duplicate code to s:align_preview function

* Merge setlocal settings in one line

* Remove suppress_close

* Clean up cursor movement for preview window

* Move Neovim cursor code to separate function

* Allow customising peek alignment

* Move Vim alignment code to separate function

* Implement Vim alignment of popup window

* Cleanup

* Remove extraneous lines

* Move set_cursor logic

* Move scrolloff setting

* Make function calls a bit more consistent

* Vim popup window fixes

* Remove extraneous call

* Fix Vim alignment

* Remove hardcoded width

* Add abort to closure function

* Fix artifacts

* Fix wrong height if popup above cursor

* Add remaining Peek commands

Add LspPeekImplementation, LspPeekTypeDefinition and LspPeekDeclaration.

* Fix wrong positioning of Vim popup
2019-07-21 09:40:19 -07:00
Thomas Faingnaert
91751670ed Allow setting popup max width (#416)
* Allow setting max width of popup window in Vim

* Allow setting max width of popup window in Neovim

* Add documentation

* Uses spaces instead of tabs for indent in help

* Move Neovim logic to s:setcontent

* Rename setting to g:lsp_preview_max_width

* Replace 'popup' with 'preview'
2019-07-17 21:01:07 -07:00
Andrej Zieger
ba9e9b5a20 Fix float position with g:lsp_preview_keep_focus=0 (#419) 2019-06-26 16:11:42 -07:00
Thomas Faingnaert
d848083ca1 Fix newlines in popup window (#414) 2019-06-25 19:30:57 -07:00
Andrej Zieger
1790680598 preview information shown in hover at the cursor (#395)
* preview information shown in hover at the cursor

* lint

* Fix hover float positioning

* Integrate vim8.1 popup for hover/preview

* lint

* Fix hover float positioning above cursor line

* Closing and focusing floating preview (nvim)

* Renamed variable of preview window id

* autocmd events for open/close floats

* Closing of floating preview & lightlinefix (vim8.1)

* Added doubletap functionality to preview
2019-06-25 11:04:52 -07:00
Yasuhiro Matsumoto
aacf4b47c4 Do not update register 2019-02-08 12:15:15 +09:00
Prabir Shrestha
74ad1e1c0d fix lint issues and enable linting for autoload folder (#224) 2018-12-27 23:03:49 -08: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
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
d3af2b8e1a return empty string so the output#preview will not add 0 in cmdline (#83) 2018-01-01 14:36:25 -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