Disable auto-reindexing by default
continuous-integration/drone/push Build is passing Details

WIP-incremental-parsing
Hugo Thunnissen 1 year ago
parent 97377c2922
commit ae3acbdbe1

@ -42,6 +42,11 @@
(require 'phpinspect-imports) (require 'phpinspect-imports)
(require 'phpinspect-buffer) (require 'phpinspect-buffer)
(defvar phpinspect-auto-reindex nil
"Whether or not phpinspect should automatically search for new
files. The current implementation is clumsy and can result in
serious performance hits. Enable at your own risk (:")
(defvar-local phpinspect--buffer-index nil (defvar-local phpinspect--buffer-index nil
"The result of the last successfull parse + index action "The result of the last successfull parse + index action
executed by phpinspect for the current buffer") executed by phpinspect for the current buffer")
@ -1211,7 +1216,7 @@ before the search is executed."
;; Index new files and try again if not done already. ;; Index new files and try again if not done already.
(if (eq index-new 'index-new) (if (eq index-new 'index-new)
nil nil
(progn (when phpinspect-auto-reindex
(phpinspect--log "Failed finding filepath for type %s. Retrying with reindex." (phpinspect--log "Failed finding filepath for type %s. Retrying with reindex."
(phpinspect--type-name class)) (phpinspect--type-name class))
(phpinspect-get-class-filepath class 'index-new))) (phpinspect-get-class-filepath class 'index-new)))

Loading…
Cancel
Save