File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -141,7 +141,7 @@ return {
141141 vim .ui .select (
142142 vim .tbl_map (
143143 function (buf )
144- return { id = buf , name = vim .api .nvim_buf_get_name (buf ) }
144+ return { id = buf , name = vim .fn . fnamemodify ( vim . api .nvim_buf_get_name (buf ), ' :p:. ' ) }
145145 end ,
146146 vim .tbl_filter (function (buf )
147147 return vim .api .nvim_buf_is_loaded (buf ) and vim .fn .buflisted (buf ) == 1
Original file line number Diff line number Diff line change @@ -85,6 +85,10 @@ function M.files(pattern)
8585 return {}
8686 end
8787
88+ files = vim .tbl_map (function (file )
89+ return vim .fn .fnamemodify (file , ' :p:.' )
90+ end , files )
91+
8892 local out = {}
8993
9094 -- Create embeddings in chunks
@@ -116,7 +120,7 @@ function M.file(filename)
116120
117121 return {
118122 content = table.concat (content , ' \n ' ),
119- filename = filename ,
123+ filename = vim . fn . fnamemodify ( filename , ' :p:. ' ) ,
120124 filetype = vim .filetype .match ({ filename = filename }),
121125 }
122126end
127131--- @return CopilotChat.copilot.embed ?
128132function M .outline (bufnr )
129133 local name = vim .api .nvim_buf_get_name (bufnr )
134+ name = vim .fn .fnamemodify (name , ' :p:.' )
130135 local ft = vim .bo [bufnr ].filetype
131136
132137 -- If buffer is not too big, just return the content
You can’t perform that action at this time.
0 commit comments