Commit Graph

242 Commits

Author SHA1 Message Date
Christian Clason
886dfda496 Announce support for Item and Symbol kinds (#485)
* announce support for Item and Symbol kinds

* generate list of kinds from dictionaries
2019-09-07 16:41:29 +02:00
mattn
ec3ba7457c Merge pull request #429 from smhc/signs_prio
Added g:lsp_signs_priority
2019-09-07 23:32:16 +09:00
mattn
96579bd0b3 Signature help (#479)
* Add signatureHelp

* Use <buffer>

* Check lsp_use_trigger_characters_for_signature_help

* Rename to lsp_signature_help_enabled

* Use InsertCharPre

* Add abort

* Check documentation exists
2019-08-31 13:08:56 -07:00
smhc
7e3625ed7a Merge branch 'master' into signs_prio 2019-08-30 19:11:50 +10:00
mattn
63b9bd6d7b Merge pull request #475 from tomwei7/master
Fix unable to jump unloaded buffer
2019-08-30 16:15:53 +09:00
mattn
a00e902361 Merge pull request #467 from machakann/fix_highlight_misplacement
Convert character-index to byte-index for textprop and location-list
2019-08-30 16:11:26 +09:00
Christian Clason
01321d1705 change camel case to separate words 2019-08-30 09:05:02 +02:00
Christian Clason
e3772d98d5 Update SymbolKind to latest specification
closes #477
2019-08-27 22:33:37 +02:00
wei cheng
6d2f3adbf6 Avoid call getbufline twice 2019-08-23 23:38:23 +08:00
Timur Celik
2cb386d294 Add g:lsp_signs_priority option (#470)
* Add g:lsp_signs_priority option

When used with other plugins (e.g. gitgutter), the signs will often get
replaced. This patch makes priority configurable for the user and
defaults to a value of 15, which should be a reasonable value for most
use cases.

* Adapt vim's default value of 10 as sign priority
2019-08-22 20:48:12 +02:00
wei cheng
ad958ee352 Fix unable to jump unloaded buffer 2019-08-22 23:10:39 +08:00
machakann
73d98fc328 Rename lsp#utils#byteindex to lsp#utils#to_col 2019-08-20 19:42:21 +08: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
738e91f0af Check currently loaded buffers for location list (#466) 2019-08-13 15:14:42 +02:00
Unknown
9906e085f1 Convert character-index to byte-index for textprop and location-list 2019-08-12 22:14:34 +08: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
hiroebe
668405756b Clear all vim_lsp signs when disabling (#436) 2019-07-21 09:35:18 -07:00
hiroebe
9507824842 Fix namespace for clearing highlights (#432) 2019-07-17 21:13:31 -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
Thomas Faingnaert
533aef14d2 Fix clear textprops for unloaded buffers (#430) 2019-07-11 13:37:43 -07:00
smhc
5fd87f413d Added g:lsp_signs_priority map 2019-07-10 16:57:39 +10:00
smhc
9cbc9f49cc Added g:lsp_signs_priority 2019-07-10 16:03:49 +10: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
tsufeki
f02bf20330 Expose diagnostics count for current buffer. (#376)
* Expose diagnostics count for current buffer.

* Add lsp#get_buffer_first_error_line()
2019-06-25 11:19:26 -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
mattn
e0f832443b Merge pull request #387 from dhakimian/fix-ref-jump
Fix cursor positioning when jumping to next/prev reference
2019-06-18 02:55:30 +09:00
Ruslan Kiyanchuk
8891d93dc3 Fix check for signs support in Neovim (#402)
Fixes #322
2019-06-11 13:46:53 -07:00
Daniel Hakimian
19090fecae Update the jumplist when jumping between references
The previous jump method (using G) set a jump, but cursor() doesn't, so
we manually update the jumplist before moving the cursor so as to not
take away previously existing functionality (the ability to use <C-O> to
undo a jump)
2019-05-22 10:30:06 -07:00
Daniel Hakimian
0d1af5afc2 Use cursor() instead of exec 2019-05-22 09:00:38 -07:00
Daniel Hakimian
f75914d991 Fix cursor positioning when jumping to next/prev reference
On tab-indented lines, (or any line where column number and virtual
column number are different) `|` puts the cursor on the nth virtual
column, not the nth character of the line. This caused the
Lsp{Next,Previous}Reference commands to place the cursor on the wrong
column on tab-indented lines.
2019-05-21 09:15:20 -07:00
tsufeki
c1be742774 Add diagnostics highlighting via +textprop. (#375)
* Add diagnostics highlighting via +textprop.

* Use textprop 'combine' option, added in 8.1.1276

* Add textprop docs.

* Enable textprop highlights by default.
2019-05-17 03:02:38 -07:00
Martino Pilia
fe5057641c Highlight references to the symbol under cursor (#363)
* Highlight references to the symbol under cursor

Use the `textDocument/documentHighlight` method to retrieve references
to the symbol under the cursor, and highlight them with matchaddpos().
Add the commands `LscPreviusReference` and `LscNextReference` to
navigate between references within the buffer.

Adaption from the implementation of "Highlight references" in vim-lsc:
https://github.com/natebosch/vim-lsc/blob/5b587b0c/autoload/lsc/cursor.vim

* Fixups

+ Lapsus: `while` statement where it should be `if`.
+ Fix alignment in docs.

* Update LICENSE-THIRD-PARTY
2019-04-21 13:39:26 -07:00
Jason Cheatham
6608aad006 Clear message when leaving diagnostic line (#351) 2019-04-05 10:31:26 -07:00
Jason Cheatham
b20f79c8e0 Add support for nvim highlights (#352) 2019-03-23 10:01:17 -07:00
grainrigi
3e28b8fb1e Use correct highlight group name (fix #340) (#343) 2019-03-16 11:14:21 -07:00
Prabir Shrestha
e3f69339ef Merge pull request #336 from hauleth/support-nvim-virtual_text
Support NeoVim virtual text
2019-03-07 12:25:48 -08:00
Łukasz Niemier
51d7746515 nvim_buf_set_virtual_text line number is 0 indexed 2019-03-07 20:46:53 +01:00
Łukasz Niemier
cedacac6fc Support NeoVim virtual text
Currently it uses similar interface to one provided by the signs
feature.

Close #214
2019-03-07 20:05:28 +01:00
Prabir Shrestha
eadfab3d68 Merge pull request #313 from nickspoons/next-error-column
Navigate directly to error column
2019-03-07 09:23:36 -08:00
mattn
3ee778a0c6 Check buffer loaded (#334)
* Check buffer loaded

* Cosmetic change
2019-03-06 18:16:13 -08:00
nickspoon
2c7c747933 Fix lint (vint) error 2019-03-04 09:18:35 +13:00
nickspoon
2986ccbe74 Refactor error_next/previous out of signs.vim
Moving the error navigation code out of signs.vim to diagnostics.vim
means that errors can be navigated when signs are disabled.

This commit re-introduces error-column navigation, after the signs
refactoring.
2019-03-03 22:43:32 +13:00
nickspoon
e16822d617 Remove column-handling
The signs API doesn't currently have support for storing "arbitrary"
data in the sign {dict}, so we can't store the column that way.
2019-02-24 00:03:09 +13:00
nickspoon
09afaa0f48 Add explicit variable declarations and whitespace 2019-02-24 00:02:16 +13:00