File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -567,9 +567,8 @@ function server.create()
567567 end
568568
569569 function srv .completion (params , callback )
570- local uri = params .textDocument .uri
571570 local position = params .position
572- local filename = uri : gsub ( ' file:// ' , ' ' )
571+ local filename = vim . uri_to_fname ( params . textDocument . uri )
573572 local root = get_root (filename )
574573
575574 if not root then
@@ -674,6 +673,15 @@ function server.create()
674673 end
675674 end
676675
676+ srv [' textDocument/didClose' ] = function (params )
677+ local filename = vim .uri_to_fname (params .textDocument .uri )
678+ local root = get_root (filename )
679+ if not root then
680+ return
681+ end
682+ root [filename ] = nil
683+ end
684+
677685 function srv .shutdown (params , callback )
678686 callback (nil , nil )
679687 end
You can’t perform that action at this time.
0 commit comments