Skip to content

Commit 6ca9b4b

Browse files
committed
feat: bump to copilot.vim 1.8.1
1 parent 1a79949 commit 6ca9b4b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lua/copilot/util.lua

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function M.get_editor_info()
1919
},
2020
editorPluginInfo = {
2121
name = "copilot.vim",
22-
version = "1.8.0",
22+
version = "1.8.1",
2323
},
2424
}
2525
return info
@@ -163,9 +163,9 @@ function M.get_doc()
163163
local absolute = vim.api.nvim_buf_get_name(0)
164164
local params = vim.lsp.util.make_position_params(0, "utf-16") -- copilot server uses utf-16
165165
local doc = {
166-
languageId = language_for_file_type(vim.bo.filetype),
167-
path = absolute,
168166
uri = params.textDocument.uri,
167+
languageId = language_for_file_type(vim.bo.filetype),
168+
version = vim.api.nvim_buf_get_var(0, 'changedtick'),
169169
relativePath = relative_path(absolute),
170170
insertSpaces = vim.o.expandtab,
171171
tabSize = vim.fn.shiftwidth(),
@@ -185,6 +185,7 @@ function M.get_doc_params(overrides)
185185
params.textDocument = {
186186
uri = params.doc.uri,
187187
languageId = params.doc.languageId,
188+
version = params.doc.version,
188189
relativePath = params.doc.relativePath,
189190
}
190191
params.position = params.doc.position

0 commit comments

Comments
 (0)