Bug fixes
- Fix occasional errors stemming from interleaving the handling of multiple messages from the server.
- Support the
DocumentHighlightOptions
format fordocumentHighlightsProvider
. - Avoid a state where no document highlights reference calls are made following a server restart.
- Avoid creating public functions for callbacks which should be temporary.
- Fix file edits in buffers that aren't current when the current buffer is shorter than the buffer being edited.
Minor breaking changes
- Remove
noselect
from the defaultcompleteopts
used during autocompletion. Re-enable this withset completeopts+=noselect
. This changes the initial behavior of some keys when autocomplete starts.
Enhancements
- Improve performance when the language server sends many diagnostics updates.
- Improve performance for periods of high message throughput.
- Add
g:lsc_diagnostic_highlights
config, and commands to enable and disable diagnostic highlights. - Add
g:lsc_block_complete_triggers
to override server config and disable autocomplete after specific characters.
Bug fixes
- Allow use with version that don't have the
trim()
function. - Avoid sending unnecessary
didClose
notifications for buffers of the wrong filetype. - Fix
getbufinfo
calls for loaded buffers. - Fix completions starting at the beginning of the line when the server did not
send any items containing a
textEdit
field. - Truncate diagnostics at 1 character shorter for when
ruler
is used. - Normalize windows file path separators to create valid URIs.
- Don't send
textDocument/didSave
notifications if the server does not advertise it as a capability. - Fix edits when there are folds in the buffer.
Minor breaking changes
- Server dictionaries no longer expose their full
init_results
, or their call logs. - Default keybinding for
LSClientSignatureHelp
changed togm
. - Notifications which are not handled by the client are ignored instead of reported.
Enhancements
- More tolerant towards buggy language servers that omit the
result
field on response message. - Add
g:lsc_autocomplete_length
to configure how many word characters to wait for before starting autocomplete. Set to0
orv:false
to disable autocomplete on anything other than trigger characters, or to a number to vary the length before autocomplete from the default of3
. - Add support for skipping calls by adding a
message_hook
and returninglsc#config#skip()
. - Add
'notifications'
support in server config to add callbacks for server specific notifications. - After calling
:LSClientAllDiagnostics
the quickfix list will be kept up to date with all diagnostics across the project, until it is set by some other tool. - Add support for a
workspace_config
server configuration key which causes aworkspace/didChangeConfiguration
notification on server startup. - Use the popup window for hover.
- Add autocmd
User LSCDiagnosticsChange
to trigger when diagnostics are received. - Add support for a custom action menu with
g:LSC_action_menu
. - Sort completion suggestions that match by prefix higher than those that match by substring.
- Include Completion item
detail
field in the preview window. - Strikethrough deprecated completion options in the menu.
- Improve performance of finding incremental changes for file syncing in very large files when lua support is available.
- Send
hover.contentFormat
to prefer plaintext content which should be more readable for most users. - Use full words for completion item kinds instead of single letters.
- Avoid overwriting location list if it is in use for something other than LSC diagnostics.
- Asynchronously loop over server messages to avoid long synchronous pauses between handling user input.
:LSClientShowHover
is now bound withkeywordprg
instead of by mappingK
. If theg:lsc_auto_map
manually specifies a binding of'K'
it should be dropped to pick up the default, or switched tov:true
to usekeywordprg
instead. If the mapping is set to a string it will continue to be mapped as usual, if it is mapped to0
orv:false
no mapping will occur, if it is set to1
orv:true
thenkeywordprg
will be set.:LSClientShowHover
also now allows an argument but it will always be ignored.- Added
g:lsc_enable_dagnostics
. Set tov:false
to ignore all diagnostics sent by the server. - Notifications with a method starting with
$/
will be silently dropped instead of showing a message. - Fix a bug where
au_group_id
was not initialized correctly. - Ignore a
null
or emptyinsertText
during completion. - Add support for
window/showMessageRequest
. - Add support for
:LSClientSignatureHelp
which callstextDocument/signatureHelp
. - Add highlighting group
lscCurrentParameter
which is used to highlight the active parameter in the signature help. - Send
textDocument/didSave
notifications onBufWritePost
if the server does not indicate they should be skipped. - Call
initialized
in response to theinitialize
result. - Fix a bug with responding to
window/showMessage
notifications. - Wait to call 'exit' until the 'shutdown' response comes back.
- Update tag stack when jumping to definition.
- Add special handling for window/progress messages
- Add
:LSClientLineDiagnostics
to print diagnostics for the current line. - Allow server commands to be specified as lists.
- Allow filtering what level of logs are echoed.
- Fix a bug with incremental text change syncing when there are multi-byte characters in the buffer.
- Fix some bugs with editing in a buffer for a file which has not been written, and would be written to a directory that does not exist.
- Add
:LSClientGoToDefinitionSplit
to go to definitions in a split window (depending onswitchbuf
). - Fix a bug where some uses of the quick fix list would modify paths under the home directory and make it impossible to jump to them.
- Fix a race condition where the same message from the server may be handled twice.
- Allow using the default map but overriding or omitting a subset of the keys.
- Set
completefunc
even when autocomplete is enabled. - Don't eagerly attempt to fetch completions when autocomplete is disabled. Allow fetching completions at any time when the manual completion function is triggered.
- Add support for passing a pattern to
:LSClientFindCodeActions
. When exactly one action has atitle
that matches the pattern it will be run automatically. - Bug fix: Handle workspace edits that have double quotes.
- Add support for
CodeAction
literals. - Bug fix: Correctly truncate multi-byte or wide character diagnostics.
- Bug fix: Allow duplicate words in completions (overloads).
- Add support for neovim.
- Add highlighting based on references to the symbol under the cursor. Disable
with
let g:lsc_reference_highlights = v:false
. Customize highlighting with the grouplscReference
. - Add
LSClientNextReference
andLSClientPreviousReference
command to jump to references when highlighting is enabled. - Bug Fix: Capitalize variable handling message hooks to allow
funcref
values. - Bug Fix: Order edits before applying them so that the offsets are correctly matched to the original file.
- Add
LSClientWorkspaceSymbol
. - Add
LSClientFindImplementations
. - Enable incremental sync by default.
- Enable apply edit by default.
- Improve the preview height for hover text which has few lines but they wrap.
- Bug Fix: Include diagnostics for the current line with code actions requests.
- Add
:LSClientDocumentSymbol
command to populate the quickfix list with symbols in the current document. - Bug Fix: Clear highlighting when entering buffers that don't fire
BufWinEnter
but do fireBufEnter
. Restore highlights when opening a buffer that in a window that previously had cleared highlights.
- Fix error in calling function message hooks.
- Add an argument to
lsc#edit#findCodeActions
to pass a callback to choose an action. - Save and restore window view when applying a workspace edit.
- Bug fix: Handle zero width edits at the end of a line.
- Add support for
textDocument/rename
. - Support
TextEdit
s in non-current buffers. - Add
lsc#diagnostics#count()
- Add
:LSClientAllDiagnostics
which populates the quickfix list with diagnostics across all files that have been sent by any server. - Bug fix: Don't make callback functions global.
- Reduce performance impact of a large number of files with empty diagnostics.
- Allow
message_hooks
values to be adict
which gets merged intoparams
. Supports inner values which are functions that get called to resolve values. - Support highlights for multi-line diagnostics.
- Split up large messages into chunks to avoid potential deadlocks where output buffer becomes full but it isn't read.
- Improve performance of incremental diff.
- Print messages received on stderr.
- Don't open an empty quickfix list when no references are found.
- Don't mask
hlsearch
with diagnostics.
- Don't track files which are not
modifiable
. - Bug Fix: Fix jumping from quickfix item to files under home directory.
- Only update diagnostic under cursor when the change is for the current file.
- Add support for additional per-server config.
- Bug Fix: If using
g:lsc_enable_incremental_sync
correctly handles multiple blank lines in a row. - Add support for overriding the
params
for certain methods. - Bug Fix: Correct paths on Windows.
- Bug Fix: Allow restarting a server which failed to start initially.
- Add experimental support for
textDocument/codeActions
andworkspace/applyEdit
- Add support for
TextDocumentSyncKind.Incremental
. There is a new setting calledg:lsc_enable_incremental_sync
which is defaulted tov:false
to allow the client to attempt incremental syncs. This feature is experimental. - Bug Fix: Use buffer filetype rather than current filetype when flushing file changes for background buffers.
- Update the diagnostic under the cursor when diagnostics change for the file.
- Bug Fix: Don't change diagnostic highlights while in visual mode.
- Send file updates after re-reading already open file. Fixes some cases where the server has a different idea of the file content than the editor.
- Avoid clearing and readding the same diagnostic matches each time diagnostics change in some other file.
- Avoid doing work on diagnostics for unopened files.
- Bug Fix: Use the correct diagnostics when updating the location list for windows other than the current window.
- Add
LSCServerStatus()
function which returns a string representing the state of the language server for the current filetype. :LSCRestartServer
can now restart servers that failed, rather than just those which are currently running.- Bug Fix: Always send
didOpen
calls with the content they have at the time of initialization rather than what they had when the buffer was read. Fixes some cases where an edit before the server is read would get lost. - Bug Fix: Handle case where a
GoToDefinition
is an empty list rather than null. - Bug Fix: Handle case where initialization call gets a null response.
- Bug Fix: Avoid breaking further callbacks when a message handler throws.
- Bug Fix: Handle
MarkedString
andList<MarkedString>
results totextDocument/hover
calls. - Add experimental support for communicating over a TCP channel. Configure the command as a "host:port" pair.
- Bug Fix: Handle null completions response.
- Bug Fix: Don't include an 'id' field for messages which are notifications.
- Add support for
window/showMessage
andwindow/logMessage
. - Use
<nomodeline>
withdoautocmd
. - Bug Fix: Check for
lsc_flush_timer
before stopping it. - Show an error if a user triggered call fails.
- Bug Fix: URI encode file paths.
- Add autocmds
LSCAutocomplete
before firing completion, andLSCShowPreview
after opening the preview window. - Change Info and Hint diagnostic default highlight to
SpellCap
. - Append diagnostic code to the message.
- Bug Fix: Handle completion items with empty detail.
LSClientShowHover
now reuses the window it already opened rather than closing it and splitting again to allow for maintaining layout.- Add optional configuration
g:lsc_preview_split_direction
to overridesplitbelow
. - Add docs.
redraw
after jumping to definition in another file.- Allow configuring trace level with
g:lsc_trace_level
. May be one of 'off', 'messages', or 'verbose'. Defaults to 'off'. - Bug fix: Avoid deep stack during large spikes of messages. Switch from recursion to a while loop.
- Add
LSClientDisable
,LSClientEnable
to disable or re-enable the client for the current filetype during a session. - Add
LSClientShowHover
to display hover information in a preview window. - Add support for automatically mapping keys only in buffers for tracked filetypes.
- Completion Improvements:
- Bug fix: Don't leave an extra character when completing after typing 3 characters.
- Filter completions after typing 3 characters.
- Add configuration to disable autocomplete.
- Bug Fix: Don't block future completion attempts after an empty suggestion list.
- Use the
triggerCharacters
suggested by the server instead of.
exclusively. - Use only the first line of suggestion detail in completion menu
- Bug Fix: Send and allow a space before header content.
- Handle language server restarts:
- Clean up local state when a language server exits.
- Call
didOpen
for all open files when a language server (re)starts.
- Add LSClientRestart command to restart the server for the current filetype.
- More detail in completion suggestions, doc comment in preview window.
- Sort diagnostics in location list.
- Breaking: Allow only 1 server command per filetype.
- Add commands for GoToDefinition and FindReferences
- Bug fix: Don't try to read lines from unreadable buffer.
- Bug fix: Newlines in diagnostics are replace with '\n' to avoid multiline messages
- Add support for
textDocument/references
request. References are shown in quickfix list. - Bug fix: Support receiving diagnostics for files which are not opened in a buffer
- Bug fix: Leave a jump in the jumplist when moving to a definition in the same file
- Completion improvements:
- Overwrite
completeopt
before completion for a better experience. - Avoid completion requests while already giving suggestions
- Improve heuristics for start of completion range
- Flush file changes after completion
- Overwrite
- Bug fix: Don't change window highlights when in select mode
- Bug fix: Location list is cleared when switching to a non-tracked filetype, and kept up to date across windows and tabs showing the same buffer
- Call initialize first for better protocol compliance
- Use a relative path where possible when jumping to definition
- Only display 'message' field for errors
- Bug Fix: Less likely to delete inserted text when trying to complete
- Bug Fix: More likely to try to complete when not following a '.'
- Populate location list with diagnostics
- Bug fix: Don't try to 'edit' the current file
Experimental first release - there are protocol bugs, for instance this does not
call the required initialize
method. Only known to work with the
dart_language_server
implementation.
Supports:
- Diagnostic highlights
- Autocomplete suggestions
- Jump to definition