From dc862a2c26a2e852392eae2e0f30ece7425f01be Mon Sep 17 00:00:00 2001 From: Binbin Ye Date: Tue, 21 Jan 2025 15:07:18 +0900 Subject: [PATCH] fix: find last dot position to determine file extension --- lsp-bridge.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lsp-bridge.el b/lsp-bridge.el index 4d7a380b01..5d4d13cb7d 100644 --- a/lsp-bridge.el +++ b/lsp-bridge.el @@ -1085,7 +1085,7 @@ So we build this macro to restore postion after code format." (defun lsp-bridge-get-lang-server-by-extension (filename extension-list) "Get lang server for file extension." - (when-let* ((dot-pos (cl-position ?. filename)) + (when-let* ((dot-pos (cl-position ?. filename :from-end t)) (file-extension (substring filename (1+ dot-pos) (length filename))) (langserver-info (cl-find-if (lambda (pair)