Skip to content

Conversation

@stefanvanburen
Copy link
Member

It's nice to send this along if it doesn't exist; makes the import valid.

Ref: #4103 (review)

It's nice to send this along if it doesn't exist; makes the import
valid.

Ref: #4103 (review)
@github-actions
Copy link
Contributor

The latest Buf updates on your PR. Results from workflow Buf CI / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedOct 24, 2025, 8:21 PM

},
End: protocol.Position{
Line: position.Line,
Character: math.MaxUint32,
Copy link
Contributor

@emcfarlane emcfarlane Oct 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't seem to work in neovim/vim. I tried the following change:

+		importRange := reportSpanToProtocolRange(declImport.Span())

-				Start: protocol.Position{
-					Line:      position.Line,
-					Character: math.MaxInt32 - 1,
-				},
-				End: protocol.Position{
-					Line:      position.Line,
-					Character: math.MaxUint32,
-				},
+				Start: importRange.End,
+				End:   importRange.End,

But that doesn't look like it works either (works in VSCode).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works for me in neovim, at least (I can check vim); with both mini.completion & nvim-cmp. (The trick is to make sure you're using the plugin's mapping for complete, e.g. <C-y> for nvim-cmp, assuming you've set up the defaults.)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unfortunately, with vim + https://github.com/prabirshrestha/asyncomplete.vim + https://github.com/prabirshrestha/asyncomplete-lsp.vim, it looks like the plugin has a bug where it applies the additionalTextEdit, but then also inserts the completion again?:

import "google/protobuf/type.proto";import "google/protobuf/type.proto"

Going to see about reporting upstream.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stefanvanburen stefanvanburen merged commit f5bf325 into main Oct 27, 2025
12 checks passed
@stefanvanburen stefanvanburen deleted the svanburen/addtl-text-edit-semicolon branch October 27, 2025 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants