1025 Commits

Author SHA1 Message Date
mattn
49656401fc Add env (#1292)
* passing env to lsp#utils#job#start

* passing env to lsp#client#start

* env for only cmd

* do not need to add

* possible to specify env for the server

* update job.vim
2022-04-05 07:39:13 +09:00
vasy
bfb7541eb8 fix: mapping to escape (#1274)
Removed only <Esc> key mappings because it seems to cause problems
in vim8.
Removed only for normal mode, for insert mode <Esc> works perfectly.
Fix #1263 and  #1267
2022-03-04 08:44:16 -08:00
Prabir Shrestha
3d0fc4072b Add initial support for workspace folders (#1265)
* add g:lsp_experimental_workspace_folders

* send client capabilities for workspaceFolders if g:lsp_experimental_workspace_folders is enabled

* fix g:lsp_experimental_workspace_folders missing s

* send workspaceFolders if workspaceFolder capability is defined via client

* add local copy add opened workspace folders

* Add support for workspace folders

* document Workspace folders

* add indent

* fix doc indent
2022-02-12 12:28:43 -08:00
Eric Larson
66b56c026f highlight change: NonText -> Comment (#1266) 2022-01-14 17:56:49 -08:00
blyoa
c5e5ccc028 Fix register overwire when a preview window is cleared for lsp-hover (#1264) 2022-01-08 16:34:06 -08:00
Prabir Shrestha
b0f90a3a3a document g:lsp_log_verbose (#1262) 2022-01-07 22:37:45 -08:00
Prabir Shrestha
278f72d21c update quickpick.vim to 968f00787c1 (Fix an invalid window id error in Neovim) (#1261)
Refer to https://github.com/prabirshrestha/quickpick.vim/pull/31
2022-01-06 18:46:48 -08:00
Prabir Shrestha
92986cc050 Update quickpick.vim to 80a64e17 (#1260)
Do not use win_gettype since it's newer.
Refer to https://github.com/prabirshrestha/quickpick.vim/pull/30
2022-01-05 23:42:01 -08:00
Prabir Shrestha
db53dcffec Update quickpick to 663aeacc6bd50f4612ffdb9fd1d438eab09f02b0 (fixes filckering) (#1259)
Refer to https://github.com/prabirshrestha/quickpick.vim/pull/25 for more information
2022-01-05 17:56:14 -08:00
Eric Larson
453042d7e4 Format Hover Pop-up Window (#1257)
* Format Hover Pop-up Window

1) Applies Vim's gq command to each individual line of content returned by
   language server.

2) Fixes scrolling to last line of popup window

* minor

* Add help entry for popup formatting
2022-01-05 17:25:48 -08:00
Prabir Shrestha
40b155512b use nnoremap for scroll since it is usually in normal mode when opening popup (#1161) (#1258) 2022-01-04 00:54:16 -08:00
Prabir Shrestha
d88690844c [perf] update async.vim to f20569020d65bec3249222606c073c0943045b5e and normalize to string (#1256)
https://github.com/prabirshrestha/async.vim/pull/47

 One of the big mistakes I did in designing async.vim was to default to neovim output. Most of the time you need to get string and this can be costly for vim, since vim by default returns a string, which means we call split in async.vim then the consumer calls join which should had ideally been a noop. This allocates unnecessary memory due to string and array creation. Luckily we can have 100% backwards compatibility as I still default to 'array' if not passed and one can easily override it to 'string'. For callbag.vim's spawn function I had defaulted to 'raw' and make the user decide if they want compatibility.

There should be no impact for neovim from this PR but should have better memory allocation and perf in vim.

To get perf improvements we still need to fix this #1199
2022-01-03 18:33:12 -08:00
Linda_pp
420143420d handle error case where cursor is outside screen (#1254) 2022-01-02 21:10:04 +09:00
hrsh7th
6d642bd11e Fix hover position (#1253)
* Fix hover position

* Use screenpos
2022-01-02 20:49:29 +09:00
Linda_pp
5270685e9b Fix mapping to close float window defined on window open (#1252)
In addition to #1251, I noticed these mappings need to be fixed.
2022-01-02 16:38:42 +09:00
Linda_pp
1c287d2db8 Fix <Plug>(lsp-float-close) mapping broke <Esc> in visual mode (#1251)
* remove unnecessary parameter `force` of `s:close_floating_window()`

- it is never `v:false`
- when it is `v:false`, the function does nothing

* fix `<Plug>(lsp-float-close)` broke `<Esc>` in visual mode
2022-01-01 12:56:31 +09:00
Shinya Ohyanagi
b886be6d83 Fix conceallevel=2 to LspHover preview (#1248) 2021-12-29 01:47:42 +09:00
hrsh7th
858a5adeaa Fix hover preview height (#1246) 2021-12-25 00:45:27 +09:00
Prabir Shrestha
69e6340c48 Fix/Incorrect restored window sizes - Update quickpick.vim to e0e38f40e4fa9b32c5ff1a3f7de449e930b6513c (#1244)
* Update quickpick.vim to b1d7fd820a2e52afe8be01ceb570537e1a10256c
Fix/Incorrect restored window sizes
https://github.com/prabirshrestha/quickpick.vim/pull/28

* update quickpick.vim to e0e38f40e4fa9b32c5ff1a3f7de449e930b6513c - fix lint issues
2021-12-21 12:53:47 -08:00
Prabir Shrestha
9c9db9ce73 respect g:lsp_signature_help_enabled when cursor moved (#1242) 2021-12-17 15:16:24 -08:00
Prabir Shrestha
10bbcb1142 use new floating window api for hover (#1078)
* use new floating window api for hover

* rename type to ui

* fix lint issues

* add support for --ui=float|preview for LspHover

* add g:lsp_hover_ui

* always show below the cursor

* close on move

* fix when using empty g:lsp_hover_ui

* add hover preview support

* apply markdown for preview

* show top if available

* fix col position when far right

* silent deletebufline

* fix indent

* remove language

* set language

* fix normalize

* don't close if curpos hasn't changed

* if hover window is foused close

* add border

* add double tap support for floating LspHover window and lsp-hover-close plug

* fix indent

* fix lint issue

* fix grammar

* *ed

* remove echom register

* fix indent

* add lsp-hover-float and lsp-hover-preview plug
2021-12-17 15:04:04 -08:00
hrsh7th
a91419ea0a Use textEdit.range.start.character as a complete col (#1236) 2021-11-30 14:47:12 +09:00
Prabir Shrestha
4dba81fbc3 update quickpick.vim to d1e58d188 https://github.com/prabirshrestha/quickpick.vim/pull/27 (#1237) 2021-11-28 11:57:44 -08:00
Linda_pp
0c8a35d899 Update CI dependencies; Go to 1.17 and gopls to 0.7.3 (#1235)
* update CI dependencies; Go to 1.17 and gopls to 0.7.3

* use `go install` instaed of `go get` for installing gopls
2021-11-02 17:21:09 +09:00
hrsh7th
7b9da239da Fix completion text extraction (#1227)
Co-authored-by: Linda_pp <rhysd@users.noreply.github.com>
2021-09-28 23:35:31 +09:00
hrsh7th
468281d517 Avoid BufEnter autocmd when opening floating window (#1228)
Co-authored-by: Linda_pp <rhysd@users.noreply.github.com>
2021-09-28 23:23:57 +09:00
Linda_pp
16ccf93670 Fix Neovim CI (#1229)
* allow failure on downloading Neovim package failure

* update Neovim from v0.5.0 to v0.5.1
2021-09-28 23:10:12 +09:00
mattn
ee38eb1bc6 Support untitled buffer (#1152)
* Support untitled buffer

* Enable opt out

* Add documentation

* Add documentation

* Use correct buffer names

* Wipeout file contents
2021-09-27 18:22:58 +09:00
Linda_pp
9f7359303b Fix completion sort (#1225)
* fix sorting completion items is broken since Vim script's string is always falsy

* add test case to sort items in case insensitive
2021-09-23 09:56:45 +09:00
Shinya Ohyanagi
f88a233731 Add sortText for completion items ordering (#1223)
* Add sortText for completion items ordering

* Fix config sort by each language server

* Fix remove log

* Update autoload/lsp/omni.vim

Co-authored-by: Linda_pp <rhysd@users.noreply.github.com>

* Update doc/vim-lsp.txt

Co-authored-by: Linda_pp <rhysd@users.noreply.github.com>

* Fix use v:null instead v:none

Co-authored-by: Linda_pp <rhysd@users.noreply.github.com>
2021-09-23 09:09:39 +09:00
Linda_pp
14f9ab319f update vim-vital-vs to the latest (#1219) 2021-09-07 17:50:24 +09:00
blyoa
66fd2f078f update quickpick to d9d1884 (#1216)
The updated quickpick keeps sizes of windows that are not in contact
with quickpick when quickpick opens and closes.
2021-09-06 15:54:17 -07:00
Linda_pp
52ded667a5 Add Neovim 0.5.0 to CI and allow CI failure with Neovim nightly (#1215)
* add neovim 0.5.0 CI
* allow CI failure with neovim nightly
2021-08-27 11:01:01 -07:00
hrsh7th
2c4d33838b Update vital-vs (#1205)
* Update vital-vs

* Fix tests

* Add end_lnum/end_col if feature was detected

Co-authored-by: Linda_pp <rhysd@users.noreply.github.com>
2021-08-28 01:29:45 +09:00
hrsh7th
27e9c374d6 Fix completion item creation (#1214)
* Fix typos

* Fix test case
2021-08-28 00:20:01 +09:00
hrsh7th
4f2d66d061 Add publishDiagnostics capabilities (#1212) 2021-08-27 14:12:35 +09:00
itchyny
7ba553effb Silence initialization message of documentation buffer (#1202) 2021-07-20 22:29:41 +09:00
Prabir Shrestha
fb0a72306e Revert "perf: parse array instead of combining it to string (#1175)" (#1199)
This reverts commit f53a98754e.
2021-06-16 00:14:44 -07:00
naohiro ono
9ecbe24af9 Fix weird autocmd group names (#1195)
* Fix weird autocmd group names

Problem : augroup "0", "1", and "2" are registered.
Solution: Use proper operator for string concatenation.

* Update callbag.vim
2021-06-10 18:31:11 -07:00
Geoffrey Huntley
7e8812bbb7 docs: add opencollective integration to the readme (#1196) 2021-06-10 18:28:20 -07:00
hrsh7th
02db70be69 Avoid duplicated syn include (#1194) 2021-06-10 11:42:30 +09:00
mattn
516fd7ce95 diagnostics list can be v:null (#1190)
* diagnostics list can be v:null

Ref #1186

* ditto

* Small refactoring

* Use lsp#utils#iteratable for the list which possibly be v:null
2021-06-09 01:51:59 +09:00
mattn
61916a2ddd diagnostics list can be v:null (#1186)
* diagnostics can be v:null

* Fix indentation
2021-06-08 00:50:31 +09:00
Linda_pp
72b9a300c7 Set type of location list items for diagnostics (#1143)
* set type of location list items for diagnostics

* use s:get_diagnostic_severity_text() once while making location list from diagnostics results

Co-authored-by: mattn <mattn.jp@gmail.com>
2021-06-07 20:47:17 +09:00
vimuxx
f3bde658ab E119: Not enough arguments for function: lsp#ui#vim#call_hierarchy_incoming (#1182) 2021-06-06 23:21:27 -07:00
hrsh7th
ddd5abb5b6 Fix borderchars and debug=throw (#1178) 2021-06-02 12:56:57 +09:00
Piotr Usewicz
83c0e4fcab diagnsostics -> diagnostics (#1179) 2021-06-01 19:36:48 -07:00
Daisuke Suzuki
541ed984b1 Add LspAddTreeCallHierarchyIncoming (#1139) 2021-05-31 13:41:41 -07:00
woky
d0f6bd5ae7 More secure minimal.vimrc (#1158)
* More secure minimal.vimrc

Make minimal.vimrc not execute arbitrary code from Internet or local processes.
- Do not skip TLS checks. GitHub should have valid TLS certificate.
- Save plug.vim to home directory. /tmp is writeable by all local processes.

* miminal.vimrc: Make plug directory home local too
2021-05-31 13:34:29 -07:00
Prabir Shrestha
f53a98754e perf: parse array instead of combining it to string (#1175) 2021-05-30 13:17:54 -07:00