refactor: migrate to Neovim 0.11+ APIs - #535
Merged
Merged
Conversation
- use method-call form for client request/notify/supports_method - replace vim.highlight with vim.hl, nvim_buf_add_highlight with extmarks (strict = false preserves the old clamping of out-of-range end columns) - open devtools via vim.ui.open, dropping utils.open_command - drop utils.lsp_handler, only the new handler signature exists now - restart dartls via Client:stop + vim.lsp.start; stop() marks the client stopping synchronously so reuse_client won't hand back the dying one - add FlutterToolsDimmed, linked to 0.13's core Dimmed group where available and Comment otherwise; now the default for closing tags - fix includeexpr leaking globally from the dart ftplugin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces APIs deprecated in 0.11 (and slated for removal in 0.13) with their current equivalents, now that the README already requires 0.11+.
client:request/notify/supports_method; drops thehas("nvim-0.12")branch inon_init.vim.highlight→vim.hl,nvim_buf_add_highlight→nvim_buf_set_extmark.strict = falsepreserves the old behaviour of clamping an end column past the end of the line rather than raising.vim.ui.open, removingutils.open_command. Keepsdetach = trueand adds WSL support for free.utils.lsp_handleris gone — all three Dart handlers already use the new(err, result, ctx, config)signature.M.restart()usesClient:stop()+vim.lsp.startper buffer.stop()sets_is_stoppingsynchronously andreuse_client_defaultchecksis_stopped(), so the firststartspawns the replacement and the rest attach to it.includeexprbeing set withvim.optinstead ofvim.opt_localin the dart ftplugin, where it leaked into every other buffer.User-visible
FlutterToolsDimmedhighlight group, linked to 0.13's coreDimmedgroup where available and toCommentotherwise. It is now the default for closing tags and is used for outline return types and menu hints. Visually unchanged unless a colourscheme definesDimmeddifferently.closing_tags.highlightnow defaults toFlutterToolsDimmedrather thanComment.utils.open_commandandutils.lsp_handlerare removed. Undocumented, but reachable viarequire("flutter-tools.utils").