File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -63,23 +63,24 @@ first."
6363 (let ((has-projectile (featurep 'projectile )))
6464 (when has-projectile
6565 (projectile-maybe-invalidate-cache arg))
66- (let* ((project-root
67- (if has-projectile
68- (projectile-ensure-project (projectile-project-root))
69- (gdscript-util--find-project-configuration-file)))
70- (file
71- (if has-projectile
72- (projectile-completing-read
73- " Find file: "
74- (projectile-project-files project-root))
75- (read-file-name
76- " Find file: "
77- project-root))))
78- (when file
79- (insert
80- (concat " \" res://"
81- (gdscript-util--get-godot-project-file-path-relative file)
82- " ." (file-name-extension file) " \" " ))))))
66+ (when-let* ((project-root
67+ (if has-projectile
68+ (projectile-ensure-project (projectile-project-root))
69+ (gdscript-util--find-project-configuration-file)))
70+ (file
71+ (if has-projectile
72+ (projectile-completing-read
73+ " Find file: "
74+ (projectile-project-files project-root))
75+ (read-file-name
76+ " Find file: "
77+ project-root)))
78+ (resource-path
79+ (if has-projectile
80+ file
81+ (concat (gdscript-util--get-godot-project-file-path-relative file)
82+ " ." (file-name-extension file)))))
83+ (insert (concat " \" res://" resource-path " \" " )))))
8384
8485
8586(provide 'gdscript-completion )
You can’t perform that action at this time.
0 commit comments