]> Sergey Matveev's repositories - vim-lsp.git/log
vim-lsp.git
14 months agoUse the steps from rust analyze document for installation
Yegappan Lakshmanan [Fri, 9 Feb 2024 17:01:04 +0000 (09:01 -0800)]
Use the steps from rust analyze document for installation

14 months agoTry installing the rust language server
Yegappan Lakshmanan [Fri, 9 Feb 2024 16:52:25 +0000 (08:52 -0800)]
Try installing the rust language server

14 months agoWhen applying a text edit, add the buffer (it might not be loaded)
Yegappan Lakshmanan [Thu, 8 Feb 2024 16:21:50 +0000 (08:21 -0800)]
When applying a text edit, add the buffer (it might not be loaded)

14 months agoHandle label in a signature help when it is a list
Yegappan Lakshmanan [Thu, 8 Feb 2024 16:10:04 +0000 (08:10 -0800)]
Handle label in a signature help when it is a list

14 months agoMerge pull request #449 from TheDreadedAndy/main
Yegappan Lakshmanan [Thu, 8 Feb 2024 06:09:21 +0000 (22:09 -0800)]
Merge pull request #449 from TheDreadedAndy/main

Add: diagnostic virtual text wrapping mode option

14 months agoAdded README and help information for diagVirtualTextWrap
Andrew Spaulding [Thu, 8 Feb 2024 02:56:07 +0000 (18:56 -0800)]
Added README and help information for diagVirtualTextWrap

14 months agoProcess the padding value in inlay hints
Yegappan Lakshmanan [Tue, 6 Feb 2024 16:01:28 +0000 (08:01 -0800)]
Process the padding value in inlay hints

14 months agoMerge pull request #450 from girishji/main
Yegappan Lakshmanan [Tue, 6 Feb 2024 15:45:21 +0000 (07:45 -0800)]
Merge pull request #450 from girishji/main

BUG: LspOmniFunc() throws E716

14 months agoremove empty line
Girish Palya [Tue, 6 Feb 2024 12:15:24 +0000 (13:15 +0100)]
remove empty line

M  autoload/lsp/completion.vim

14 months agoBUG: omnifuc throws E716
Girish Palya [Tue, 6 Feb 2024 12:12:28 +0000 (13:12 +0100)]
BUG: omnifuc throws E716

In LspOmniFunc() when cItems is empty (when findstart=1) it does not
set the key 'completeItemsIsIncomplete' in the lspserver dictionary.
When LspOmniFunc is called again with findstart=0, it fails.
line   46:
E716: Key not present in Dictionary: "completeItemsIsIncomplete"

This affects rust, nix, and other lsp servers:
https://github.com/girishji/vimcomplete/issues/14

M  autoload/lsp/completion.vim

14 months agoAdded an option for configuring the wrapping mode of diagnostic virtual text
Andrew Spaulding [Tue, 6 Feb 2024 04:32:31 +0000 (20:32 -0800)]
Added an option for configuring the wrapping mode of diagnostic virtual text

14 months agoIgnore unsupported notification messages from ccls language server
Yegappan Lakshmanan [Mon, 5 Feb 2024 16:23:39 +0000 (08:23 -0800)]
Ignore unsupported notification messages from ccls language server

14 months agoMerge pull request #448 from girishji/main
Yegappan Lakshmanan [Mon, 5 Feb 2024 15:46:30 +0000 (07:46 -0800)]
Merge pull request #448 from girishji/main

Improve signature popup window

14 months agoChanges as requested
Girish Palya [Sun, 4 Feb 2024 17:27:37 +0000 (18:27 +0100)]
Changes as requested

M  autoload/lsp/symbol.vim
M  doc/lsp.txt

14 months agoCorrectly handle keys inside symbol popup window
Girish Palya [Thu, 1 Feb 2024 18:36:19 +0000 (19:36 +0100)]
Correctly handle keys inside symbol popup window

Symbol popup window handles following keys:
- <tab> and <s-tab> to advance selection
- selection wraps around at end
- <pageup> and <pagedn> scroll popup instead of main window

M  autoload/lsp/symbol.vim

14 months agoImprove signature popup window
Girish Palya [Tue, 30 Jan 2024 19:57:51 +0000 (20:57 +0100)]
Improve signature popup window
Add 1 character padding to the sides of signature popup window.
Otherise, the leftmost character of popup looks like continuation of
line from underneath text in some colorschemes. A subtle improvemnt.

M  autoload/lsp/signature.vim

15 months agoMerge pull request #446 from darkseid-is/main
Yegappan Lakshmanan [Thu, 25 Jan 2024 06:02:50 +0000 (22:02 -0800)]
Merge pull request #446 from darkseid-is/main

Add an extra space to LspInlayHintsParam to make it legible

15 months agoAdd support for renaming and deleting files
Yegappan Lakshmanan [Thu, 25 Jan 2024 04:03:06 +0000 (20:03 -0800)]
Add support for renaming and deleting files

15 months agoCreating a file using workspaceedit is not supported
Yegappan Lakshmanan [Wed, 24 Jan 2024 15:51:32 +0000 (07:51 -0800)]
Creating a file using workspaceedit is not supported

15 months agoAdd an extra space to LspInlayHintsParam to make it legible
darkseid [Wed, 24 Jan 2024 07:02:32 +0000 (12:32 +0530)]
Add an extra space to LspInlayHintsParam to make it legible

15 months agoMerge pull request #444 from darkseid-is/patch-2
Yegappan Lakshmanan [Sat, 20 Jan 2024 03:15:30 +0000 (19:15 -0800)]
Merge pull request #444 from darkseid-is/patch-2

Fix typo in lsp.txt

15 months agoFix typo in lsp.txt
darkseid-is [Fri, 19 Jan 2024 22:46:27 +0000 (04:16 +0530)]
Fix typo in lsp.txt

15 months agoUpdate instructions for using vim-plug to install the plugin
Yegappan Lakshmanan [Thu, 18 Jan 2024 05:40:45 +0000 (21:40 -0800)]
Update instructions for using vim-plug to install the plugin

15 months agoRevert "Update instructions for using vim-plug to install the plugin"
Yegappan Lakshmanan [Thu, 18 Jan 2024 05:38:43 +0000 (21:38 -0800)]
Revert "Update instructions for using vim-plug to install the plugin"

This reverts commit 9cff5462634e04fee13edbdb661a02ca0c71d53d.

15 months agoUpdate instructions for using vim-plug to install the plugin
Yegappan Lakshmanan [Thu, 18 Jan 2024 05:26:08 +0000 (21:26 -0800)]
Update instructions for using vim-plug to install the plugin

15 months agoMerge pull request #441 from Song-Tianxiang/patch-1
Yegappan Lakshmanan [Wed, 17 Jan 2024 05:41:06 +0000 (21:41 -0800)]
Merge pull request #441 from Song-Tianxiang/patch-1

fix: hover popup-filter, remove redundant code

15 months agopress <Esc> to close popup window
Song-Tianxiang [Wed, 17 Jan 2024 02:09:53 +0000 (10:09 +0800)]
press <Esc> to close popup window

The default way uses <C-c> to close the popup window, the escape key is added to also close the popup window.

15 months agoMerge pull request #442 from Konfekt/patch-2
Yegappan Lakshmanan [Tue, 16 Jan 2024 16:05:44 +0000 (08:05 -0800)]
Merge pull request #442 from Konfekt/patch-2

change order of vim-plug initialization commands

15 months agochange order of vim-plug initialization commands
Enno [Tue, 16 Jan 2024 13:00:35 +0000 (14:00 +0100)]
change order of vim-plug initialization commands

I could not get omnicomplete to work when setting the options after adding the servers

15 months agofix hover popup-filter, remove redundant code
Song-Tianxiang [Tue, 16 Jan 2024 05:59:47 +0000 (13:59 +0800)]
fix hover popup-filter, remove redundant code

The original few lines of code are redundant.
Just return false and let vim handle the other keys.
The redundant code disabled mouse scrolling, and the popup will be closed automatically after some seconds (I don't know why it is closed automatically)

15 months agoAdd support for scrolling the hover popup window. Fixes #423
Yegappan Lakshmanan [Mon, 15 Jan 2024 15:48:35 +0000 (07:48 -0800)]
Add support for scrolling the hover popup window.  Fixes #423

15 months agoMerge pull request #439 from darkseid-is/patch-1
Yegappan Lakshmanan [Tue, 9 Jan 2024 14:31:36 +0000 (06:31 -0800)]
Merge pull request #439 from darkseid-is/patch-1

fix: typo in README.md

15 months agoFix typo in README.md
darkseid-is [Tue, 9 Jan 2024 06:36:40 +0000 (12:06 +0530)]
Fix typo in README.md

15 months agoMerge pull request #429 from Shane-XB-Qian/none_chk_comp_item_sel
Yegappan Lakshmanan [Thu, 4 Jan 2024 06:10:43 +0000 (22:10 -0800)]
Merge pull request #429 from Shane-XB-Qian/none_chk_comp_item_sel

none: compl item sel

15 months agoMerge pull request #434 from DanielViberg/main
Yegappan Lakshmanan [Thu, 4 Jan 2024 06:02:50 +0000 (22:02 -0800)]
Merge pull request #434 from DanielViberg/main

Added option for removing duplicate completion items

15 months agoAdded filterCompletionDuplicates to readme
Daniel Viberg [Wed, 3 Jan 2024 08:34:50 +0000 (09:34 +0100)]
Added filterCompletionDuplicates to readme

15 months agoAdded doc for new option filterCompletionDuplicates
Daniel Viberg [Wed, 3 Jan 2024 07:55:09 +0000 (08:55 +0100)]
Added doc for new option filterCompletionDuplicates

15 months agoMerge pull request #431 from Shane-XB-Qian/refine_action_regex_a_bit
Yegappan Lakshmanan [Wed, 3 Jan 2024 05:55:00 +0000 (21:55 -0800)]
Merge pull request #431 from Shane-XB-Qian/refine_action_regex_a_bit

none: refine code action regex a bit

15 months agoAdded option for removing duplicate completion items
Daniel Viberg [Tue, 2 Jan 2024 20:24:15 +0000 (21:24 +0100)]
Added option for removing duplicate completion items

15 months agonone: refine code action regex a bit
shane.xb.qian [Sun, 31 Dec 2023 06:18:58 +0000 (14:18 +0800)]
none: refine code action regex a bit

Signed-off-by: shane.xb.qian <shane.qian@foxmail.com>
16 months agoUpgrade checkout github actions to v4. Run unit-tests on Vim 9.0 and the latest...
Yegappan Lakshmanan [Tue, 26 Dec 2023 15:16:10 +0000 (07:16 -0800)]
Upgrade checkout github actions to v4.  Run unit-tests on Vim 9.0 and the latest nightly

16 months agonone: compl item sel
shane.xb.qian [Tue, 26 Dec 2023 06:02:56 +0000 (14:02 +0800)]
none: compl item sel

Signed-off-by: shane.xb.qian <shane.qian@foxmail.com>
16 months agoWhen displaying completion documentation, check the index is valid
Yegappan Lakshmanan [Mon, 25 Dec 2023 15:38:39 +0000 (07:38 -0800)]
When displaying completion documentation, check the index is valid

16 months agoMerge pull request #426 from girishji/main
Yegappan Lakshmanan [Wed, 20 Dec 2023 17:48:31 +0000 (09:48 -0800)]
Merge pull request #426 from girishji/main

Remove E1013 error when lsp sends kind=null

16 months agorequested change
Girish Palya [Wed, 20 Dec 2023 16:43:20 +0000 (17:43 +0100)]
requested change

M  autoload/lsp/completion.vim

16 months agoMerge pull request #427 from Shane-XB-Qian/fix_cfg_get_len_chk
Yegappan Lakshmanan [Wed, 20 Dec 2023 15:46:45 +0000 (07:46 -0800)]
Merge pull request #427 from Shane-XB-Qian/fix_cfg_get_len_chk

fix: check cfg get len

16 months agofix: check cfg get len
shane.xb.qian [Wed, 20 Dec 2023 15:40:35 +0000 (23:40 +0800)]
fix: check cfg get len

Signed-off-by: shane.xb.qian <shane.qian@foxmail.com>
16 months agoMerge pull request #425 from DanielViberg/main
Yegappan Lakshmanan [Wed, 20 Dec 2023 14:45:55 +0000 (06:45 -0800)]
Merge pull request #425 from DanielViberg/main

Changed default value of missing workspaceConfig from [{}] to [null]

16 months agoRemove E1013 error when lsp sends kind=null
Girish Palya [Wed, 20 Dec 2023 13:08:01 +0000 (14:08 +0100)]
Remove E1013 error when lsp sends kind=null
This is what pyslp sent:
{'label': '''H''', 'data': {'doc_uri': 'file:///...py'},
 'sortText': 'a''H''', 'kind': null, 'insertText': '''H'''}
'kind' property need to be checked for null before
attempting completion.

M  autoload/lsp/completion.vim

16 months agoChanged default value of missing workspaceConfig from [{}] to [null]
Daniel Viberg [Tue, 19 Dec 2023 13:58:43 +0000 (14:58 +0100)]
Changed default value of missing workspaceConfig from [{}] to [null]

16 months agoMerge pull request #422 from Angluca/main
Yegappan Lakshmanan [Tue, 12 Dec 2023 15:03:22 +0000 (07:03 -0800)]
Merge pull request #422 from Angluca/main

Copy to my vimrc Error!!

16 months agoCopy to my vimrc Error!!
Pixeller [Tue, 12 Dec 2023 11:17:10 +0000 (19:17 +0800)]
Copy to my vimrc Error!!

Newbies only copy and paste settings
T. T

16 months agoMerge pull request #421 from Shane-XB-Qian/fix_semantic_flag_typo
Yegappan Lakshmanan [Mon, 4 Dec 2023 15:06:16 +0000 (07:06 -0800)]
Merge pull request #421 from Shane-XB-Qian/fix_semantic_flag_typo

fix: fix semantic flag typo

16 months agofix: fix semantic flag typo
shane.xb.qian [Mon, 4 Dec 2023 09:24:12 +0000 (17:24 +0800)]
fix: fix semantic flag typo

Signed-off-by: shane.xb.qian <shane.qian@foxmail.com>
16 months agoAdd the initial support for semantic highlighting
Yegappan Lakshmanan [Sun, 3 Dec 2023 05:50:59 +0000 (21:50 -0800)]
Add the initial support for semantic highlighting

16 months agoMerge pull request #420 from Shane-XB-Qian/refine_compl_kind_trig_char
Yegappan Lakshmanan [Sat, 2 Dec 2023 15:35:01 +0000 (07:35 -0800)]
Merge pull request #420 from Shane-XB-Qian/refine_compl_kind_trig_char

none: get trig chars always

16 months agonone: get trig chars always
shane.xb.qian [Sat, 2 Dec 2023 04:08:02 +0000 (12:08 +0800)]
none: get trig chars always

Signed-off-by: shane.xb.qian <shane.qian@foxmail.com>
16 months agoMerge pull request #418 from girishji/main
Yegappan Lakshmanan [Fri, 1 Dec 2023 17:26:51 +0000 (09:26 -0800)]
Merge pull request #418 from girishji/main

Make omnifunc() complete keywords based on LSP triggerCharacters

16 months agoImprove doc
Girish Palya [Fri, 1 Dec 2023 16:38:52 +0000 (17:38 +0100)]
Improve doc

M  autoload/lsp/completion.vim

16 months agoMerge branch 'yegappan:main' into main
giri [Fri, 1 Dec 2023 16:26:09 +0000 (17:26 +0100)]
Merge branch 'yegappan:main' into main

16 months agoChanges as requested by reviwers
Girish Palya [Fri, 1 Dec 2023 16:25:50 +0000 (17:25 +0100)]
Changes as requested by reviwers

M  autoload/lsp/completion.vim
M  test/clangd_tests.vim

16 months agoMerge pull request #419 from CoelacanthusHex/fix/list
Yegappan Lakshmanan [Fri, 1 Dec 2023 15:41:31 +0000 (07:41 -0800)]
Merge pull request #419 from CoelacanthusHex/fix/list

fix(inlayhint): fix format when label is a list in Rust Analyzer

16 months agoIn recent Vim versions, prop_list() doesn't return the length item for virtual text
Yegappan Lakshmanan [Fri, 1 Dec 2023 15:39:16 +0000 (07:39 -0800)]
In recent Vim versions, prop_list() doesn't return the length item for virtual text

16 months agofix(inlayhint): fix format when label is a list in Rust Analyzer
Coelacanthus [Fri, 1 Dec 2023 13:51:21 +0000 (21:51 +0800)]
fix(inlayhint): fix format when label is a list in Rust Analyzer

resolve #416

16 months agoFix some of the test failures
Girish Palya [Thu, 30 Nov 2023 21:54:14 +0000 (22:54 +0100)]
Fix some of the test failures
- fixed omnifunc related tests
- diag related tests are still failing

M  autoload/lsp/completion.vim
M  test/clangd_tests.vim

17 months agoPropagate triggerCharacters to omni-completion
Girish Palya [Wed, 29 Nov 2023 12:17:55 +0000 (13:17 +0100)]
Propagate triggerCharacters to omni-completion
Fixed 2 bugs:
- add triggerCharacters to lsp list for omniComplete option
- process triggerCharacters based keywords in omnifunc()

M  autoload/lsp/completion.vim
M  autoload/lsp/lspserver.vim

17 months agoMerge pull request #415 from Konfekt/patch-1
Yegappan Lakshmanan [Tue, 28 Nov 2023 15:42:36 +0000 (07:42 -0800)]
Merge pull request #415 from Konfekt/patch-1

update doc on default options

17 months agoMerge pull request #357 from Shane-XB-Qian/fix_inlay_maybe_delayed
Yegappan Lakshmanan [Tue, 28 Nov 2023 15:41:30 +0000 (07:41 -0800)]
Merge pull request #357 from Shane-XB-Qian/fix_inlay_maybe_delayed

fix: inlay hints maybe a bit delayed if sync init

17 months agoupdate default options
Enno [Mon, 20 Nov 2023 08:24:31 +0000 (09:24 +0100)]
update default options

the documentation no longer reflected autoload/lsp/options.vim (lines 9-162):

export var lspOptions: dict<any> = {
  # Enable ale diagnostics support.
  # If true, diagnostics will be sent to ale, which will be responsible for
  # showing them.
  aleSupport: false,

  # In insert mode, complete the current symbol automatically
  # Otherwise, use omni-completion
  autoComplete: true,

  # In normal mode, highlight the current symbol automatically
  autoHighlight: false,

  # Automatically highlight diagnostics messages from LSP server
  autoHighlightDiags: true,

  # Automatically populate the location list with new diagnostics
  autoPopulateDiags: false,

  # icase | fuzzy | case match for language servers that replies with a full
  # list of completion items
  completionMatcher: 'case',

  # Due to a bug in the earlier versions of Vim, cannot use the
  # COMPLETIONMATCHER_CASE constant here for initialization.
  completionMatcherValue: 1,

  # diagnostics signs options
  diagSignErrorText: 'E>',
  diagSignHintText: 'H>',
  diagSignInfoText: 'I>',
  diagSignWarningText: 'W>',

  # In insert mode, echo the current symbol signature in the status line
  # instead of showing it in a popup
  echoSignature: false,

  # hide disabled code actions
  hideDisabledCodeActions: false,

  # Highlight diagnostics inline
  highlightDiagInline: true,

  # Show the symbol documentation in the preview window instead of in a popup
  hoverInPreview: false,

  # Don't print message when a configured language server is missing.
  ignoreMissingServer: false,

  # Focus on the location list window after ":LspDiag show"
  keepFocusInDiags: true,

  # Focus on the location list window after LspShowReferences
  keepFocusInReferences: true,

  # If true, apply the LSP server supplied text edits after a completion.
  # If a snippet plugin is going to apply the text edits, then set this to
  # false to avoid applying the text edits twice.
  completionTextEdit: true,

  # Alignment of virtual diagnostic text, when showDiagWithVirtualText is true
  # Allowed values: 'above' | 'below' | 'after' (default is 'above')
  diagVirtualTextAlign: 'above',

  # Suppress adding a new line on completion selection with <CR>
  noNewlineInCompletion: false,

  # Omni-completion support.  To keep backward compatibility, this option is
  # set to null by default instead of false.
  omniComplete: null,

  # Open outline window on right side
  outlineOnRight: false,

  # Outline window size
  outlineWinSize: 20,

  # Show diagnostic text in a balloon when the mouse is over the diagnostic
  showDiagInBalloon: true,

  # Make diagnostics show in a popup instead of echoing
  showDiagInPopup: true,

  # Suppress diagnostic hover from appearing when the mouse is over the line
  # Show a diagnostic message on a status line
  showDiagOnStatusLine: false,

  # Show a diagnostic messages using signs
  showDiagWithSign: true,

  # Show a diagnostic messages with virtual text
  showDiagWithVirtualText: false,

  # enable inlay hints
  showInlayHints: false,

  # In insert mode, show the current symbol signature automatically
  showSignature: true,

  # enable snippet completion support
  snippetSupport: false,

  # enable SirVer/ultisnips completion support
  ultisnipsSupport: false,

  # add to autocomplition list current buffer words
  useBufferCompletion: false,

  # Use a floating menu to show the code action menu instead of asking for
  # input
  usePopupInCodeAction: false,

  # ShowReferences in a quickfix list instead of a location list`
  useQuickfixForLocations: false,

  # enable hrsh7th/vim-vsnip completion support
  vsnipSupport: false,

  # Limit the time autocompletion searches for words in current buffer (in
  # milliseconds)
  bufferCompletionTimeout: 100,

  # Enable support for custom completion kinds
  customCompletionKinds: false,

  # A dictionary with all completion kinds that you want to customize
  completionKinds: {}
}

# set the LSP plugin options from the user provided option values
export def OptionsSet(opts: dict<any>)
  lspOptions->extend(opts)
  if !has('patch-9.0.0178')
    lspOptions.showInlayHints = false
  endif
  if !has('patch-9.0.1157')
    lspOptions.showDiagWithVirtualText = false
  endif

  # For faster comparison, convert the 'completionMatcher' option value from a
  # string to a number.
  if lspOptions.completionMatcher == 'icase'
    lspOptions.completionMatcherValue = COMPLETIONMATCHER_ICASE
  elseif lspOptions.completionMatcher == 'fuzzy'
    lspOptions.completionMatcherValue = COMPLETIONMATCHER_FUZZY
  else
    lspOptions.completionMatcherValue = COMPLETIONMATCHER_CASE
  endif

  # Apply the changed options
  if exists('#LspCmds#User#LspOptionsChanged')
    :doautocmd <nomodeline> LspCmds User LspOptionsChanged
  endif
enddef

18 months agoMerge pull request #407 from vimpostor/textedit_cursor
Yegappan Lakshmanan [Mon, 16 Oct 2023 14:39:54 +0000 (07:39 -0700)]
Merge pull request #407 from vimpostor/textedit_cursor

Avoid moving the cursor when applying textedits

18 months agoAvoid moving the cursor when applying textedits
Magnus Groß [Thu, 12 Oct 2023 23:08:06 +0000 (01:08 +0200)]
Avoid moving the cursor when applying textedits

In 33c9dc37bd354391579f669a142699801b13d571 we removed a workaround that
resets the cursor to the previous location after applying an
workspaceEdit, because it interfered with auto-imports.

Turns out the workaround was there for a reason: When we apply general
textedits (e.g. when we rename a variable), then we are always moving
the cursor by accident, because internally (to apply a textedit) we
delete the entire text range and then append the new range.
Obviously this loses the cursor position, hence the reason for the
original manual cursor reset workaround.

Instead of reintroducing that workaround, we now avoid moving the cursor
altogether: We accomplish this by no longer deleting the entire range
and inserting it again. Instead we just remove lines that actually need
to be deleted, add lines that actually need to be added and then handle
the rest with a normal setbufline() call.

This will cause the cursor to never lose the correct position, because
we never remove the entire region where the cursor is located in.

We have to be careful with off-by-one errors, therefore this also adds
an extra test for the scenario where we have to delete some lines. The
two other scenarios already had comprehensive tests (adding lines, and
keeping the amount of lines).

18 months agoAccess the save key in textDocumentSync only if it is a Dict
Yegappan Lakshmanan [Fri, 6 Oct 2023 19:11:39 +0000 (12:11 -0700)]
Access the save key in textDocumentSync only if it is a Dict

18 months agoMerge pull request #405 from mhanberg/didsavetext
Yegappan Lakshmanan [Fri, 6 Oct 2023 15:21:49 +0000 (08:21 -0700)]
Merge pull request #405 from mhanberg/didsavetext

fix: send buffer text on textDocument/didSave

18 months agofixup! fix: send buffer text on textDocument/didSave
Mitchell Hanberg [Fri, 6 Oct 2023 14:42:34 +0000 (10:42 -0400)]
fixup! fix: send buffer text on textDocument/didSave

18 months agofixup! fix: send buffer text on textDocument/didSave
Mitchell Hanberg [Thu, 5 Oct 2023 22:46:08 +0000 (18:46 -0400)]
fixup! fix: send buffer text on textDocument/didSave

18 months agofix: send buffer text on textDocument/didSave
Mitchell Hanberg [Thu, 5 Oct 2023 21:29:09 +0000 (17:29 -0400)]
fix: send buffer text on textDocument/didSave

This sends the full buffer text on the textDocument/didSave notification
if the server's sync options specify it.

19 months agonone: change to use 'LspInlayHintsUpdateNow'
shane.xb.qian [Thu, 21 Sep 2023 05:44:29 +0000 (13:44 +0800)]
none: change to use 'LspInlayHintsUpdateNow'

19 months agofix: inlay hints maybe a bit delayed if sync init
shane.xb.qian [Sat, 8 Jul 2023 11:54:51 +0000 (19:54 +0800)]
fix: inlay hints maybe a bit delayed if sync init

Signed-off-by: shane.xb.qian <shane.qian@foxmail.com>
19 months agoMerge pull request #393 from andlrc/fix-doc-error
Yegappan Lakshmanan [Thu, 14 Sep 2023 04:10:51 +0000 (21:10 -0700)]
Merge pull request #393 from andlrc/fix-doc-error

Fix filetype error in docs

19 months agoFix filetype error in docs
Andreas Louv [Wed, 13 Sep 2023 21:53:58 +0000 (23:53 +0200)]
Fix filetype error in docs

19 months agoMerge pull request #390 from vimpostor/completionitem_fix
Yegappan Lakshmanan [Mon, 4 Sep 2023 18:47:51 +0000 (11:47 -0700)]
Merge pull request #390 from vimpostor/completionitem_fix

Fix additionalTextEdits being ignored

19 months agoFix additionalTextEdits being ignored
Magnus Groß [Mon, 4 Sep 2023 18:16:43 +0000 (20:16 +0200)]
Fix additionalTextEdits being ignored

Regression was introduced in 6f4fdc7bcc3a1ba041c6196b85b506bd0c207cf0.
The logic was still fine if the LSP server delayed the
additionalTextEdits field, but if we already got it, we ended up
ignoring it.

Fix this by checking for additionalTextEdits outside the delayed-resolve
condition.

Also see #389

19 months agoMerge pull request #388 from matthias-margush/fix/initialize-lspserver-with-needOffse...
Yegappan Lakshmanan [Mon, 4 Sep 2023 16:15:47 +0000 (09:15 -0700)]
Merge pull request #388 from matthias-margush/fix/initialize-lspserver-with-needOffsetEncoding

fix: initialize needOffsetEncoding in NewLspServer

19 months agoMerge pull request #389 from vimpostor/completionitem_command
Yegappan Lakshmanan [Mon, 4 Sep 2023 16:15:28 +0000 (09:15 -0700)]
Merge pull request #389 from vimpostor/completionitem_command

Add support for CompletionItem commands

19 months agoDo not reset cursor after workspaceEdit
Magnus Groß [Mon, 4 Sep 2023 15:50:12 +0000 (17:50 +0200)]
Do not reset cursor after workspaceEdit

The workspace edit may add or delete lines, so resetting it to the last
linenumber and column will very likely not match the last logical line
before the workspaceEdit operation.

For example an action might add an auto-import statement at the top of
the file, effectively adding one line in-between. If we now reset the
cursor, we will end up one logical line before the one where we actually
started at.

This behaviour is automatically fixed if we just don't reset the cursor
at all.

19 months agoAdd support for CompletionItem commands
Magnus Groß [Sun, 3 Sep 2023 22:57:59 +0000 (00:57 +0200)]
Add support for CompletionItem commands

When we resolve a completion item with a "completionItem/resolve"
request, the LSP server returns a CompletionItem object [0], which may
contain an optional "command" field. This field describes a command that
must be called **after** inserting the completion.

For example the haskell-language-server may respond with the following
command after autocompleting an unimported function (arguments are left
out for brevity):

{'command': '10619:ghcide-extend-import-action:extendImport', 'arguments': [], 'title': 'extend import'}

Then when we send the matching "workspace/executeCommand" request, the
server will respond with a "workspace/applyEdit" request, that
autoimports the function.

Technically the specification dictates that servers should prefer to set
"additionalTextEdits" for that usecase, but there is still some use for
doing it this way, e.g. haskell-language-server also wants to display an
info message to the user, which doesn't happen with
"additionalTextEdits".

In any case it is important to support the "command" field, as it may
also contain actions unrelated to "additionalTextEdits".

[0] https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#completionItem

19 months agoMerge pull request #387 from maximyurevich/main
Yegappan Lakshmanan [Sun, 3 Sep 2023 20:56:43 +0000 (13:56 -0700)]
Merge pull request #387 from maximyurevich/main

fix(handlers): ignore `sqlLanguageServer.finishSetup`

19 months agofix: initialize needOffsetEncoding in NewLspServer
Matthias Margush [Sun, 3 Sep 2023 20:31:29 +0000 (13:31 -0700)]
fix: initialize needOffsetEncoding in NewLspServer

19 months agofix(handlers): ignore `sqlLanguageServer.finishSetup`
Maxim Yurevich [Sun, 3 Sep 2023 17:58:06 +0000 (20:58 +0300)]
fix(handlers): ignore `sqlLanguageServer.finishSetup`

19 months agoMerge pull request #383 from maximyurevich/main
Yegappan Lakshmanan [Thu, 31 Aug 2023 13:41:19 +0000 (06:41 -0700)]
Merge pull request #383 from maximyurevich/main

fix: ignore `eslint/status` and `taplo/didChangeSchemaAssociation`

20 months agofix: ignore `eslint/status` and `taplo/didChangeSchemaAssociation`
Maxim Yurevich [Tue, 29 Aug 2023 21:36:59 +0000 (00:36 +0300)]
fix: ignore `eslint/status` and `taplo/didChangeSchemaAssociation`

20 months agoMerge pull request #375 from girishji/main
Yegappan Lakshmanan [Mon, 14 Aug 2023 14:44:40 +0000 (07:44 -0700)]
Merge pull request #375 from girishji/main

omnifunc documentation popup should not throw error

20 months agoSilenty ignore a file with empty file type
Yegappan Lakshmanan [Mon, 14 Aug 2023 14:37:54 +0000 (07:37 -0700)]
Silenty ignore a file with empty file type

20 months agoomnifunc documentation popup not throw error
Girish Palya [Thu, 10 Aug 2023 17:26:34 +0000 (19:26 +0200)]
omnifunc documentation popup not throw error
When using Omni completion with other sources of completion items
that do not have 'user_data' dictionary, documentation popup should
not throw error.

I am using my own completion plugin with g:LspOmniFunc and I need
LSP to grab lazy-doc from lsp server. But it should not throw
error when user_data does not contain dictionary.

M  autoload/lsp/completion.vim

20 months agoOptions changed autocmd is not invoked
Yegappan Lakshmanan [Tue, 1 Aug 2023 04:34:01 +0000 (21:34 -0700)]
Options changed autocmd is not invoked

20 months agoOption changes are not handled properly
Yegappan Lakshmanan [Tue, 1 Aug 2023 01:21:50 +0000 (18:21 -0700)]
Option changes are not handled properly

21 months agoAuto import is not working with typescript language server. Fixes #367.
Yegappan Lakshmanan [Sat, 29 Jul 2023 01:01:49 +0000 (18:01 -0700)]
Auto import is not working with typescript language server.  Fixes #367.

21 months agoMove the code for displaying the current diag in the status line to diag.vim
Yegappan Lakshmanan [Fri, 28 Jul 2023 15:31:23 +0000 (08:31 -0700)]
Move the code for displaying the current diag in the status line to diag.vim

21 months agoUpdate help text
Yegappan Lakshmanan [Fri, 28 Jul 2023 14:56:50 +0000 (07:56 -0700)]
Update help text

21 months agoAdd option to enalbe/disable omni-completion
Yegappan Lakshmanan [Fri, 28 Jul 2023 04:32:00 +0000 (21:32 -0700)]
Add option to enalbe/disable omni-completion