fix for +org-company-init-h company-files-regexps initialization

This commit is contained in:
Jakub Darul 2019-10-10 20:21:35 +02:00
parent fa14fc9688
commit d3ebe747b6

View file

@ -814,18 +814,11 @@ compelling reason, so..."
(sp-local-pair "~" "~" :unless '(:add sp-point-before-word-p +org-sp-in-src-block-p)) (sp-local-pair "~" "~" :unless '(:add sp-point-before-word-p +org-sp-in-src-block-p))
(sp-local-pair "=" "=" :unless '(:add sp-point-before-word-p sp-in-math-p +org-sp-in-src-block-p))))) (sp-local-pair "=" "=" :unless '(:add sp-point-before-word-p sp-in-math-p +org-sp-in-src-block-p)))))
(defun +org-init-company-h() (defun +org-init-company-h ()
(after! company (after! company-files
(setq company-files--regexps (setq-local company-files--regexps
(let* ((root (if (eq system-type 'windows-nt) (cons "file:\\(\\(?:\\.\\{1,2\\}/\\|~/\\|/\\)[^\]\n]*\\)"
"[a-zA-Z]:/" company-files--regexps))))
"/"))
(begin (concat "\\(?:\\.\\{1,2\\}/\\|~/\\|" root "\\)")))
(list (concat "\"\\(" begin "[^\"\n]*\\)")
(concat "\'\\(" begin "[^\'\n]*\\)")
(concat "file:\\(" begin "[^\]\n]*\\)")
(concat "\\(?:[ \t=]\\|^\\)\\(" begin "[^ \t\n]*\\)"))))))
;; ;;
;;; Bootstrap ;;; Bootstrap