# Buggy code
def handle_response(self, response: "Optional[List[ReferenceDict]]", pos: int) -> None:
    window = self.view.window()

    if response is None:
        response = []

    references_count = len(response)
    # return if there are no references
    if references_count < 1:
        window.run_command("hide_panel", {"panel": "output.references"})
        window.status_message("No references found")
        return

    word_region = self.view.word(pos)
    word = self.view.substr(word_region)

    base_dir = windows.lookup(window).get_project_path()
    formatted_references = self._get_formatted_references(response, base_dir)

    if settings.show_references_in_quick_panel:
        flags = sublime.KEEP_OPEN_ON_FOCUS_LOST
        if settings.quick_panel_monospace_font:
            flags |= sublime.MONOSPACE_FONT
        window.show_quick_panel(
            self.reflist,
            lambda index: self.on_ref_choice(base_dir, index),
            flags,
            self.get_current_ref(base_dir, word_region.begin()),
            lambda index: self.on_ref_highlight(base_dir, index),
        )
    else:
        panel = ensure_references_panel(window)
        if not panel:
            return
        panel.settings().set("result_base_dir", base_dir)

        panel.set_read_only(False)
        panel.run_command("lsp_clear_panel")
        window.run_command("show_panel", {"panel": "output.references"})
        panel.run_command(
            "append",
            {
                "characters": "{} references for '{}'\n\n{}".format(
                    references_count, word, formatted_references
                ),
                "force": True,
                "scroll_to_end": False,
            },
        )

        # highlight all word occurrences
        regions = panel.find_all(r"\b{}\b".format(word))
        panel.add_regions(
            "ReferenceHighlight", regions, "comment", flags=sublime.DRAW_OUTLINED
        )
        panel.set_read_only(True)


# Traceback (ValueError)
LSP:  --> textDocument/references
LSP:      [{'uri': 'file:///D:/Amjad/rls-vscode/src/extension.ts', 'range': {'end': {'line': 25, 'character': 20}, 'start': {'line': 25, 'character': 9}}}, {'uri': 'file:///D:/Amjad/rls-vscode/src/extension.ts', 'range': {'end': {'line': 434, 'character': 25}, 'start': {'line': 434, 'character': 14}}}, {'uri': 'file:///D:/Amjad/rls-vscode/src/rustup.ts', 'range': {'end': {'line': 67, 'character': 33}, 'start': {'line': 67, 'character': 22}}}]
Error handling server payload
Traceback (most recent call last):
File "C:\Users\Lehdhili\AppData\Roaming\Sublime Text 3\Packages\LSP\plugin\core\rpc.py", line 150, in receive_payload
self.response_handler(payload)
File "C:\Users\Lehdhili\AppData\Roaming\Sublime Text 3\Packages\LSP\plugin\core\rpc.py", line 169, in response_handler
handler(response["result"])
File "C:\Users\Lehdhili\AppData\Roaming\Sublime Text 3\Packages\LSP\plugin\references.py", line 45, in <lambda>
request, lambda response: self.handle_response(response, pos))
File "C:\Users\Lehdhili\AppData\Roaming\Sublime Text 3\Packages\LSP\plugin\references.py", line 64, in handle_response
formatted_references = self._get_formatted_references(response, base_dir)
File "C:\Users\Lehdhili\AppData\Roaming\Sublime Text 3\Packages\LSP\plugin\references.py", line 142, in _get_formatted_references
grouped_references = self._group_references_by_file(references, base_dir)
File "C:\Users\Lehdhili\AppData\Roaming\Sublime Text 3\Packages\LSP\plugin\references.py", line 150, in _group_references_by_file
relative_file_path = os.path.relpath(file_path, base_dir)
File "./python3.3/ntpath.py", line 564, in relpath
ValueError: path is on mount 'D:', start on mount 'C:'

# Fixed code
def handle_response(self, response: "Optional[List[ReferenceDict]]", pos: int) -> None:
    window = self.view.window()

    if response is None:
        response = []

    references_count = len(response)
    # return if there are no references
    if references_count < 1:
        window.run_command("hide_panel", {"panel": "output.references"})
        window.status_message("No references found")
        return

    references_by_file = self._group_references_by_file(response)

    if settings.show_references_in_quick_panel:
        self.show_quick_panel(references_by_file)
    else:
        self.show_references_panel(references_by_file)