lsp-bridge -- 速度最快的语法补全插件

lsp-bridge 里基本是用 bounds-of-thing-at-point 来获得光标当前的字符作为 keyword 去匹配候选项词,但这会把中文连着英文的情况都选上,比如输入 “使用emacs“ 这时候尽管 emacs 是文件里已经有的词,但输入时也不会匹配到候选项,因为 prefix 会把 “使用” 也算上,有考虑改吗?如果可以改,有推荐的只获取英文单词的函数吗?

我当前是自己定义一个函数

(defun acm-get-input-prefix-bound ()
  (let ((bound (bounds-of-thing-at-point 'symbol)))
    (when bound
      (let* ((keyword (buffer-substring-no-properties (car bound) (cdr bound)))
             (offset (string-match "[[:ascii:]]+" keyword)))
        (cons (+ (car bound) offset) (cdr bound))))))

然后把 bounds-of-thing-at-point 都替换成这个