Commit Graph

172 Commits

Author SHA1 Message Date
Satoru Kitaguchi
7233bb2ec0 Add LspAddTreeReferences (#1484) 2023-09-08 22:25:51 -07:00
Illia Bobyr
aa93b2a570 LspStopServer: Stop all and stop specific (#1491)
It is convenient to be able to stop all LSP servers, regardless of the
currently active buffer.

Also, it seems confusing that when a server name is specified, it is
only stopped if it is also one handling the current buffer type.  I
would imagine it is quite rare to have more than one server handing a
specific buffer type.  And if one explicitly specified a name, it seems
reasonable to stop this particular server, regardless of the currently
active buffer.
2023-09-08 21:17:24 -07:00
Illia Bobyr
7dd6b72d0c doc: Document actual LspStopServer behavior (#1490)
Actual behavior was slightly different from the documented one.

Co-authored-by: mattn <mattn.jp@gmail.com>
2023-08-15 15:18:48 +09:00
Satoru Kitaguchi
2be2b07b53 Support lsp_document_symbol_detail option (#1482)
* Support `lsp_document_symbol_detail` option

to show details

* fixup! Support `lsp_document_symbol_detail` option
2023-08-04 18:58:33 -07:00
mityu
39bad0b67e Fix :LspNextWarning is not correctly tagged (#1476) 2023-06-25 11:33:03 -07:00
Colin Cheng
06bf1b35ef Fix typo (#1458) 2023-04-10 10:58:00 -07:00
Illia Bobyr
7d59166b18 g:lsp_diagnostics_virtual_text_align: List allowed values (#1445)
It is not immediately clear what are the possible values for this
configuration parameter.  And it is nice to be a bit more explicit about
the meaning of each option.

Co-authored-by: Prabir Shrestha <mail@prabir.me>
2023-04-03 17:36:11 -07:00
Illia Bobyr
44608334f9 Allow workspace_config to be a function (#1400)
It is sometimes useful to generate `workspace_config` using a callback.
For example, if the produced config needs to include some information
from the actual workspace.
2023-04-03 17:16:42 -07:00
Piotr Usewicz
ad6d61b13c Update name of the function (#1419) 2023-01-27 22:32:55 -08:00
Ryuichiroh
3244bed522 Add option to disable float of diagnostic error when insert mode (#1417) 2023-01-15 18:57:42 +09:00
Ryuichiroh
c4bae1f79b Allow adjustable options of prop_add() for virtual text (#1412)
Co-authored-by: ryicoh <ryicoh@gmail.com>
2023-01-05 00:36:44 +09:00
figsoda
2cb7ef587c fix duplicate help tag (#1408) 2022-12-21 09:18:32 -08:00
Gabriel Linder
93db4a4bd3 Fix option name. (#1404)
Signed-off-by: Gabriel Linder <gabriel@numberly.com>

Signed-off-by: Gabriel Linder <gabriel@numberly.com>
2022-12-20 09:48:28 -08:00
yuilib
9a00d5aba4 Allow specifying max width for floating windows (#1336) 2022-12-20 09:32:37 -08:00
Prabir Shrestha
5c1df0cf12 Prefer native lsp api when in vim. (#1362)
* add g:lsp_experimental_native_lsp flag to enable native vim lsp client

* send request and correctly call on_notification

* add support for native client in lsp#client#send_notification

* Add native lsp client support for lsp#client#send_response

* add native notification support

* add support for native stop job

* handle error response for document_formatting.vim and code_action.vim

* add missing return for code action

* fix indent

* undo code action error

* check for a:response to be of type dict as stderr will send string

* use out_cb and err_cb instead of channel callback

* bump has_native_client version check to 8.2.4780 which fixes LSP parsing messages when partial data is received

* rename g:lsp_experimental_native_lsp to g:lsp_use_native_client

* fix s:native_err_cb

* pass env

* disable lsp_use_native_client

* add lsp#utils#has_native_lsp_client()

* clean up log

* handle requests from server

* fix lint issues

* update docs
2022-12-19 19:44:45 -08:00
Björn Steinbrink
ed2c818b1e Add support for virtual text diagnostics in Vim9 (#1358)
* Fix virtual-text link in lsp_inlay_hints_enabled docs
* Add support for virtual text diagnostics in Vim9
2022-12-19 19:23:29 -08:00
hrsh7th
9baef1f1cc Add an option to fixup vim popup with conceal problems (#1376)
* Fix vim's popup and conceals

* Add lsp_preview_fixup_conceal

* Fix CI
2022-12-03 11:42:53 +09: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
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
gx
8fdaf4f78c Fix inconsistent document (#1363) 2022-09-26 21:00:41 -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
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
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
Prabir Shrestha
b0f90a3a3a document g:lsp_log_verbose (#1262) 2022-01-07 22:37:45 -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
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
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
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
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
Luis David Licea Torres
324ae1e1eb Fixed typo in docs (#1162)
The word "running" appeared twice, so it was removed. The updated line is 79 characters long.
2021-05-29 13:02:42 -07:00
rhysd
6f8f49c96e include maintainers information in document
so that users can easily contact to maintainers without making issues on
repository.
2021-04-03 01:26:07 +09:00
Linda_pp
ce3add957a Fix document layout and misspellings (#1127)
* fix document layout

* fix misspellings
2021-03-31 23:09:06 +09:00
Linda_pp
800c878209 Support show message notification by handling window/showMessage response (#1120)
* support window/showMessage

* describe g:lsp_show_message_log_level in documentation

* add tests for window/showMessage support

Co-authored-by: mattn <mattn.jp@gmail.com>
2021-03-28 21:58:20 +09:00
Prabir Shrestha
24533c28ae add lsp_signature_help_delay to allow users to configure and default to 200 (#1106) 2021-03-15 22:47:30 -07:00
Prabir Shrestha
58f18ee40d document diagnostics and code action signs hint (#1099)
* document code action signs hint
* document diagnostics signs default hint
2021-03-14 20:48:28 -07:00
Prabir Shrestha
eb237a2ced [WIP] add codeaction sign support (#1085)
* add codeaction sign support

* add hl LspCodeActionText

* add docs

* add support for multiple servers

* only set signs if buffer exists
2021-03-06 10:56:44 -08:00
hrsh7th
6a2b97cd59 Add scroll keymapping (#1058)
* Add lsp#scroll function

* Update README.md

* Add example setting to docs
2021-02-22 20:51:48 +09:00
Prabir Shrestha
cacfc79eb4 completion/resolve support for documentation and use the new floating window (#1052)
* doc

* floating window with completion/resolve

* add comments

* use _split_by_eol

* copy event

* fix dupe

* Fix size/markdown/detail

* - Improve for exceptional case
- Fix code style
- Support detail only case

* Add lsp_float_opened/lsp_float_closed

* remove old documentation code

* update documenation and change flags to use g:lsp_completion_documentation

Co-authored-by: hrsh7th <hrsh7th@gmail.com>
2021-01-23 09:11:27 -08:00
Daisuke Suzuki
17180038a8 add support for call hierarchy (#1046)
* add support for call hierarchy

* no need to use a timer

https://github.com/prabirshrestha/vim-lsp/pull/1046#discussion_r559003701

* add commands to README.md
2021-01-17 18:44:25 -08:00
Prabir Shrestha
3ed0e7aa31 Workspace symbol search using quickpick (#1035) 2021-01-09 22:14:07 -08:00
Prabir Shrestha
e699b0fcb6 add LspDocumentSymbolSearch using quickpick (#1029) 2021-01-09 12:14:26 -08:00
Linda_pp
513fef901e Fix typos in documents (#1012) 2021-01-03 01:34:32 -08:00