654 Commits

Author SHA1 Message Date
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
mattn
1090950a59 Merge pull request #449 from daisuzu/fix/tagstack
Fix tagstack
2019-08-17 22:30:58 +09:00
Daisuke Suzuki
0534c79053 fix local variables 2019-08-17 21:50:51 +09:00
Daisuke Suzuki
6ee6e16aa5 refactor 2019-08-17 21:45:56 +09:00
Daisuke Suzuki
301d39bfd4 carve out
https://github.com/prabirshrestha/vim-lsp/pull/449#issuecomment-522219226
2019-08-17 21:45:26 +09:00
machakann
ccb2460fa6 Add tests for lsp#utils#byteindex() 2019-08-17 14:38:56 +08:00
Unknown
83a3a2b004 Fix an lsp#utils#byteindex() error when the target buffer is not yet loaded 2019-08-14 22:08:12 +08:00
machakann
1a22e19ee0 Add a comment 2019-08-14 19:00:35 +08: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
mattn
e829ca02c2 Merge pull request #447 from hrsh7th/porting-vim-lsc-diff
Re-porting vim-lsc's diff logic (for multibyte character)
2019-07-26 16:44:16 +09:00
Daisuke Suzuki
8ab9f6f055 set bufnr 2019-07-26 09:45:18 +09:00
Daisuke Suzuki
d6e88604c9 clear unnecessary items 2019-07-26 09:45:08 +09:00
hrsh7th
8fccf7a408 Add prefix 'l:' for local variables 2019-07-25 19:56:37 +09:00
hrsh7th
a2e4e040d2 Re-porting vim-lsc's diff logic 2019-07-25 17:23:41 +09: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
6de0ccd6fb Fix lsp#disable() to disable all ui features (#437) 2019-07-18 13:53:02 -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
kailin4u
4006768fb4 call settagstack so that user can jump back to recent file positions by C-t (#435) 2019-07-17 20:50:32 -07:00
Colin Cheng
c91d0d52e5 Fix echo diagnostics message with showcmd (#433) 2019-07-14 11:28:31 -07:00
Thomas Faingnaert
ed304dbb8a Fix LspDocumentFormat not working as expected (#410)
* Add test

* Fix LspDocumentFormat adding newlines

* Fix manually pressing enter when formatting
2019-07-11 13:41:15 -07:00
Thomas Faingnaert
1d48fc83e2 Implement workspace/configuration (#427) 2019-07-11 13:39:05 -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
Thomas Faingnaert
d542bbc5a3 Document customization of popup window color (#415)
* Allow customizing popup window highlight group

* Add documentation

* Revert "Add documentation"

This reverts commit 41954eb959.

* Revert "Allow customizing popup window highlight group"

This reverts commit 625439bb1e.

* Add customization instructions to documentation
2019-06-29 12:28:37 -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
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
Colin Cheng
2b583fefa2 Use g:ignorecase to indicates whether or not ignorecase to matchs completion word (#392)
* Adds `g:lsp_omni_completion_ignorecase` option to indicates whether or not ignorecase to matchs completion word

In most cases, ignorecase is not necessary, so we may add an option to control whether to turn it on.
Defaults, `g:lsp_omni_completion_ignorecase` is `0`, meaning case sensitive, if `g:lsp_omni_completion_ignorecase`
is set to `1`, or set `ignorecase` options(eg. `:set ignorecase`), it will turn case insensitive on.

* Fix CI failed

* Remove `g:lsp_omni_completion_ignorecase` options, only use `g:ignorecase` to indicates whether or not ignorecase to matchs completion word

* Refactor: cache prefix word
2019-06-25 11:15:51 -07:00
Thomas Faingnaert
2176417264 Fix documentHighlight always being sent (#413) 2019-06-25 11:08:24 -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
mattn
e781beb076 Merge pull request #408 from itchyny/fix-no-matching-autocmds-msg
fix `No matching autocommands` message on `doautocmd User lsp_complete_done`
2019-06-17 18:50:47 +09:00
itchyny
ab1a95c7ad fix No matching autocommands message on doautocmd User lsp_complete_done 2019-06-17 18:29:09 +09:00
Thomas Faingnaert
20f5b7541a UltiSnips integration (#306)
* Implement basic UltiSnips integration

* Fix already inserted text not being removed

* Fix incorrect whitespace when nesting snippets

* Fix tabstops not working in nested snippets

* Make functions abort on error

* Check if Vim has the user_data patch

* Add basic documentation

* Add explanation UltiSnips integration to README

* Use single quoted string in plugin/lsp.vim

* Allow plugins to override get_completion_item

* Remove UltiSnips specific code to set user_data

* Remove CompleteDone autocmd from omni.vim

* Revert "Add explanation UltiSnips integration to README"

This reverts commit ee12343cbf.

* Revert "Add basic documentation"

This reverts commit 979275bb4f.

* Allow changing supported capabilities

* Remove g:lsp_ultisnips_integration

* Mention snippets in READE and documentation

* Add documentation for new configuration options

* Pass server_info to get_capabilities

* Change configuration variables to be a List

This way, we don't need to start them with a capital letter.

* Add lsp_complete_done autocmd

* Add documentation of lsp_complete_done
2019-06-15 12:06:16 -07:00
mikoto2000
75516719d5 Fix lsp#utils#text_edit#apply_text_edits when end position was newline character. (#388) 2019-06-15 11:08:48 -07:00
mattn
69f31d5bf2 Use fnameescape() (#404)
Close #167
2019-06-12 07:18:03 -07:00