Commit Graph

959 Commits

Author SHA1 Message Date
Yasuhiro Matsumoto
1a84ed5f68 ditto 2022-11-20 02:23:47 +09:00
Yasuhiro Matsumoto
83ad2b78b6 workaround for float position 2022-11-20 01:09:45 +09:00
hrsh7th
e42203b4f0 Support all of rename response formats (#1387) 2022-11-10 09:23:37 +09:00
Prabir Shrestha
c0325a8b44 add performance for check health (#1383) 2022-11-04 20:37:10 -07:00
David Briscoe
0c8fda7921 Print workspace_config with :verbose LspStatus (#1279)
* Make verbose LspStatus show workspace config

Need the trailing echo to ensure the next lsp server is on a new line.

* Use pretty printing if available

* checkhealth: Print server status and config

Add initial checkhealth support.
See https://github.com/rhysd/vim-healthcheck

Lists server status, advice for failure, and lists workspace config to
help debug issues or understand server state. Doesn't do much error
detecting.

* checkhealth: Print each server config as a section

checkhealth doesn't allow a lot of formatting (no indentation), so it's
hard to make the config output readable. Output each server as a
separate section instead of one giant config block to make the start of
each server easier to see.
2022-10-29 10:43:57 -07:00
Takayuki Tsukitani
9d4dbf7e68 move symbol into workspace (#1382) 2022-10-24 18:47:35 -07:00
Takayuki Tsukitani
a85b71bfc8 Fix default supported capabilities (#1379)
* add missing supported capabilities

* sort alphabetically

* set `dynamicRegistration` to `v:false` for adding capabilities

* add `prepareSupportDefaultBehavior` to `rename` capability
2022-10-19 18:26:32 +09:00
Lie Ryan
2bb97d2938 Replace references to pylsp with pyls (#1378)
The palantir pyls repository is no longer maintained, the documentation
should not lead user down the path of configuring this dead end project.
pylps is the actively maintained sucessor project forked from pyls.
2022-10-16 20:30:19 -07:00
Prabir Shrestha
1dced335b0 document missing code action plugs (#1377) 2022-10-15 12:39:21 -07:00
Björn Steinbrink
06f2c12604 Add an option to use a popup menu for code actions (#1361)
For code actions, some people might find it more convenient to use a
popup menu that shows up at the cursor position, instead of using the
quickpick window at the bottom of the screen.
2022-10-15 12:33:37 -07:00
frankplow
08f0583c0c Semantic tokens performance improvements (#1342)
* improve clear_highlights performance and robustness

* improve semantic tokens performance by removing regexes

* cache semantic tokens legend

* reduce copying of batched highlights

* add defaults for 3.17 semantic token types

Co-authored-by: Prabir Shrestha <mail@prabir.me>
2022-10-10 23:05:43 -07:00
Stephan T
23728ad8c5 Fix loss of reference highlights on buffer change (#1355)
Co-authored-by: Prabir Shrestha <mail@prabir.me>
2022-10-09 12:34:49 -07:00
miyuki
d45273a95c Fix Checks for the presence of a dict's key 'linecount' (#1365) 2022-10-09 12:30:03 -07:00
gx
8fdaf4f78c Fix inconsistent document (#1363) 2022-09-26 21:00:41 -07:00
Björn Steinbrink
218fc2a8a2 Fix signs for diagnostics that are reported one line past the end (#1360)
Some language servers report unexpected EOF errors on the line that's
actually one past the last line of the file. Be a bit more accomodating
and just show them on the last line of the buffer instead.
2022-09-25 09:12:29 -07:00
mattn
4d8a27513d Inlay hint (#1347)
* inlay hint

* implement inlayHints

* implement inlayHints

* update doc

* fix

* fix

* separate highlights

* update/clear

* use callbag

* remove from doc

* disable default

* update doc

* check version

* check label array

* call prop_remove()

* use lsp#utils#range#get_range()

* add comma

* add lsp_inlay_hints_mode

* own highlight

* update doc

* fix style check

* rename

lsp#utils#_has_virtual_text to lsp#utils#_has_nvim_virtual_text
lsp#utils#_has_vim9textprops to lsp#utils#_has_vim_virtual_text

* update doc

* fix version

* remove all
2022-08-25 02:02:42 +09:00
Radek Simko
e5d2d3f744 fix reporting of typeHierarchy capability (#1350) 2022-08-20 11:32:46 -07:00
yuilib
309e9e5c81 Fix floating window on neovim (#1346) 2022-08-02 22:48:23 -07:00
hrsh7th
eb542a379f Correct overlapped text even if using filterText (#1341) 2022-07-22 11:51:32 +09:00
hrsh7th
771755300a Implemented word correction in cases where startcol was corrected by … (#1340)
* Implemented word correction in cases where startcol was corrected by TextEdit.range.start.character

* Don't touch abbr

* Don't use `..`

* relax get_server_info

* Improve for deno lsp item

* Fix start character

* minimal `insertReplaceTextEdit` suppoort.

* Change to filter logic similar to asyncomplete-lsp.vim

* Improve word creation

* relax lsp#utils#text_edit#get_range

* Add start_character for test case
2022-07-22 11:19:16 +09:00
yuilib
9a510cd419 Fix completion documentation floating window to show even when there is not enough space (#1334) 2022-07-17 02:40:21 +09:00
frankplow
68c018eb1a Semantic Tokens Support (#1275)
* initial naive implementation of semanticTokens

* fix race condition when starting new lsp server

* fix error when closing and re-opening a buffer

* support nvim highlighting

* provide tokenTypes and tokenModifiers client capabilities

* move semantic.vim to autoload/lsp/internal

* refactor semantic tokens to use a callbag

* remove scope tree functions

* refactor decoding of semanticTokens responses

* improve semantic tokens nvim support

* add support for multi-byte characters

* update semantic tokens on TextChangedP

* don't apply semantic highlighting to large files

* replace semantic_highlight server key with custom highlight groups

* rename g:lsp_large_buffer_threshold to g:lsp_max_buffer_size

* fix typo: correct LpEvents to LspEvents

* update semantic highlighting documentation

* change has('popupwin') to exists('autoload/lsp/internal/semantic.vimTextChangedP')

* correct lsp_max_buffer_size usage

* add LspSemanticHighlightGroups helper command

* use explicit scope and reorganise decode_tokens

* use robust comparison + single quoted strings in s:init_highlight

* update semantic highlighting on VimEnter

* support semanticTokens/full/delta requests

* request semanticTokens/full on BufNewFile or BufReadPost

* perform full semantic updates on lsp_buffer_enabled

* support SemanticTokensDelta response to textDocument/semanticTokens/full/delta request

* decide between full or delta semanticTokens request based on state

* use prop_add_list to add semantic tokens

* sort semanticTokens edits before applying

* update semantic.vim to conform to google style guide

* update default semantic highlight groups to better match usage

* fix parsing of SemanticTokensOptions

* mention g:lsp_semantic_enabled in vim-lsp-semantic docs

* document g:lsp_semantic_delay

* add support for semantic token modifiers

* sort semantic tokens modifiers alphabetically

* correctly report semantic tokens capabilities
2022-06-30 20:11:47 -07:00
a5ob7r
da80b01831 Fix an incorrect indentation in doc (#1326) 2022-06-25 02:40:50 +09:00
fungus
74e458bc9c add new preview window id api (#1323)
* add new preview window id api
resolves #1281

* add alias for getpreviewwinid()

* add documentation
2022-06-17 22:32:24 -07:00
Kento Okamoto
bf2d083ace Correct spelling on lsp_hover_ui section of documentation (#1322) 2022-06-13 12:00:21 +09:00
hrsh7th
9458f6e2d4 Fix invalid mode when to expand completion item (#1319)
Co-authored-by: hrsh7th <>
2022-05-27 12:18:39 +09:00
mattn
013625b3b1 fix queue (#1316) 2022-05-23 10:17:33 +09:00
mattn
1e1a0981a7 check server_name (#1315) 2022-05-23 02:01:33 +09:00
hrsh7th
c075e157fc Improve diagnostics float implementation (#1296)
Co-authored-by: hrsh7th <>
Co-authored-by: mattn <mattn.jp@gmail.com>
2022-04-21 10:55:53 +09:00
mattn
8df4aa4019 Send response for workspace/workspaceFolders (#1302)
https://microsoft.github.io/language-server-protocol/specifications/specification-current/#workspace_workspaceFolders
2022-04-18 02:44:37 +09:00
Prabir Shrestha
3aa4b349cc handle response errors (#1299)
* handle code action signs error
* handle error for document formatting
* use lsp#client#is_error
2022-04-16 11:07:05 -07:00
mattn
79698651c8 Highlight priority (#1298)
* Fix priority for document diagnostics

* Add priorities table
2022-04-16 13:55:29 +09:00
mattn
78e07f9684 The result in document/formatting possibly be ommited (#1294) 2022-04-11 12:51:57 +09:00
mattn
edd6629f09 Fix env (#1293) 2022-04-05 11:43:33 +09:00
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