Skip to content

Commit

Permalink
Fix file path completion when projectile is used
Browse files Browse the repository at this point in the history
When projectile is being used, `projectile-project-files' already returns file
paths relative to the project root directory.
  • Loading branch information
NicolasPetton committed Apr 17, 2024
1 parent d25f778 commit 7182675
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions gdscript-completion.el
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,13 @@ first."
(projectile-project-files project-root))
(read-file-name
"Find file: "
project-root))))
(insert
(concat "\"res://"
(gdscript-util--get-godot-project-file-path-relative file)
"." (file-name-extension file) "\"")))))
project-root)))
(resource-path
(if has-projectile
file
(concat (gdscript-util--get-godot-project-file-path-relative file)
"." (file-name-extension file)))))
(insert (concat "\"res://" resource-path "\"")))))


(provide 'gdscript-completion)
Expand Down

0 comments on commit 7182675

Please sign in to comment.