mirror of
https://github.com/godotengine/emacs-gdscript-mode.git
synced 2026-01-05 22:10:05 +03:00
Address omissions from fa26dd5 refactor.
This commit is contained in:
@@ -2,6 +2,13 @@
|
|||||||
|
|
||||||
This document lists new features, improvements, changes, and bug fixes in each release of the package.
|
This document lists new features, improvements, changes, and bug fixes in each release of the package.
|
||||||
|
|
||||||
|
## GDScript mode 1.1.1
|
||||||
|
|
||||||
|
### Bug fixes
|
||||||
|
|
||||||
|
- Fixed loading the `gdscript-godot` module at initialization.
|
||||||
|
- Fixed function calls in the mode map.
|
||||||
|
|
||||||
## GDScript mode 1.1.0
|
## GDScript mode 1.1.0
|
||||||
|
|
||||||
Emacs GDScript mode is now available on the [MELPA](https://melpa.org/) package archive!
|
Emacs GDScript mode is now available on the [MELPA](https://melpa.org/) package archive!
|
||||||
|
|||||||
@@ -38,19 +38,10 @@
|
|||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun gdscript-run-command (cmd &optional show)
|
(defun gdscript-run-command (cmd &optional show)
|
||||||
"Run a Godot process.
|
"Run a Godot process.
|
||||||
Input and output via buffer named after `*godot*'. If there is a process
|
|
||||||
already running in that buffer, just switch to it.
|
|
||||||
|
|
||||||
With argument, allows you to define CMD so you can edit the
|
CMD is the command to be invoked by the shell. If SHOW, the
|
||||||
command used to call the interpreter.
|
output of the process will be provided in a buffer named
|
||||||
When numeric prefix arg is other than 0 or 4 do not SHOW."
|
`*godot*'."
|
||||||
(interactive
|
|
||||||
(if current-prefix-arg
|
|
||||||
(list
|
|
||||||
(read-string "Run Godot: " (gdscript-godot--build-shell-command))
|
|
||||||
(y-or-n-p "Make dedicated process? ")
|
|
||||||
(= (prefix-numeric-value current-prefix-arg) 4))
|
|
||||||
(list (gdscript-godot--build-shell-command) nil t)))
|
|
||||||
(start-process-shell-command "Godot Process" (if show
|
(start-process-shell-command "Godot Process" (if show
|
||||||
"*godot*" nil) cmd))
|
"*godot*" nil) cmd))
|
||||||
|
|
||||||
@@ -71,16 +62,14 @@ file's directory as starting point."
|
|||||||
(defun gdscript-godot-run-project ()
|
(defun gdscript-godot-run-project ()
|
||||||
"Run the current project in Godot Engine."
|
"Run the current project in Godot Engine."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let* ()
|
(gdscript-run-command
|
||||||
(gdscript-run-command
|
(gdscript-godot--build-shell-command)))
|
||||||
(gdscript-godot--build-shell-command))))
|
|
||||||
|
|
||||||
(defun gdscript-godot-run-project-debug ()
|
(defun gdscript-godot-run-project-debug ()
|
||||||
"Run the current project in Godot Engine."
|
"Run the current project in Godot Engine."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let* ()
|
(gdscript-run-command
|
||||||
(gdscript-run-command
|
(concat (gdscript-godot--build-shell-command) " -d") t))
|
||||||
(concat (gdscript-godot--build-shell-command) " -d"))))
|
|
||||||
|
|
||||||
(defun gdscript-godot-run-current-scene ()
|
(defun gdscript-godot-run-current-scene ()
|
||||||
"Run the current script file in Godot Engine."
|
"Run the current script file in Godot Engine."
|
||||||
@@ -94,7 +83,8 @@ file's directory as starting point."
|
|||||||
(interactive)
|
(interactive)
|
||||||
(gdscript-run-command
|
(gdscript-run-command
|
||||||
(concat (gdscript-godot--build-shell-command) " -d "
|
(concat (gdscript-godot--build-shell-command) " -d "
|
||||||
(gdscript-util--get-godot-project-file-path-relative buffer-file-name) ".tscn")))
|
(gdscript-util--get-godot-project-file-path-relative buffer-file-name) ".tscn")
|
||||||
|
t))
|
||||||
|
|
||||||
(defun gdscript-godot-edit-current-scene ()
|
(defun gdscript-godot-edit-current-scene ()
|
||||||
"Run the current script file in Godot Engine."
|
"Run the current script file in Godot Engine."
|
||||||
@@ -110,7 +100,8 @@ For this to work, the script must inherit either from
|
|||||||
\"SceneTree\" or \"MainLoop\"."
|
\"SceneTree\" or \"MainLoop\"."
|
||||||
(interactive)
|
(interactive)
|
||||||
(gdscript-run-command
|
(gdscript-run-command
|
||||||
(concat (gdscript-godot--build-shell-command) " -s " (file-relative-name buffer-file-name))))
|
(concat (gdscript-godot--build-shell-command) " -s " (file-relative-name buffer-file-name))
|
||||||
|
t))
|
||||||
|
|
||||||
(provide 'gdscript-godot)
|
(provide 'gdscript-godot)
|
||||||
;;; gdscript-godot.el ends here
|
;;; gdscript-godot.el ends here
|
||||||
|
|||||||
@@ -38,6 +38,7 @@
|
|||||||
(require 'gdscript-completion)
|
(require 'gdscript-completion)
|
||||||
(require 'gdscript-format)
|
(require 'gdscript-format)
|
||||||
(require 'gdscript-rx)
|
(require 'gdscript-rx)
|
||||||
|
(require 'gdscript-godot)
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(add-to-list 'auto-mode-alist '("\\.gd\\'" . gdscript-mode))
|
(add-to-list 'auto-mode-alist '("\\.gd\\'" . gdscript-mode))
|
||||||
@@ -58,13 +59,13 @@
|
|||||||
(define-key map (kbd "<backtab>") 'gdscript-indent-dedent-line)
|
(define-key map (kbd "<backtab>") 'gdscript-indent-dedent-line)
|
||||||
(define-key map (kbd "\t") 'company-complete)
|
(define-key map (kbd "\t") 'company-complete)
|
||||||
;; Run in Godot.
|
;; Run in Godot.
|
||||||
(define-key map "\C-c\C-g" 'gdscript--run-godot-editor)
|
(define-key map "\C-c\C-r\C-p" 'gdscript-godot-open-project-in-editor)
|
||||||
(define-key map "\C-c\C-p" 'gdscript--run-project-in-godot)
|
(define-key map "\C-c\C-r\C-r" 'gdscript-godot-run-project)
|
||||||
(define-key map "\C-c\C-s" 'gdscript--run-current-scene-in-godot)
|
(define-key map "\C-c\C-r\C-d" 'gdscript-godot-run-project-debug)
|
||||||
(define-key map "\C-c\C-e" 'gdscript-godot-edit-current-scene)
|
(define-key map "\C-c\C-r\C-s" 'gdscript-godot-run-current-scene)
|
||||||
(define-key map "\C-c\C-r" 'gdscript--run-current-script-in-godot)
|
(define-key map "\C-c\C-r\C-q" 'gdscript-godot-run-current-scene-debug)
|
||||||
(define-key map "\C-c\C-dp" 'gdscript--run-project-in-godot-debug-mode)
|
(define-key map "\C-c\C-r\C-e" 'gdscript-godot-edit-current-scene)
|
||||||
(define-key map "\C-c\C-ds" 'gdscript--run-current-scene-in-godot-debug-mode)
|
(define-key map "\C-c\C-r\C-x" 'gdscript-godot-run-current-script)
|
||||||
map)
|
map)
|
||||||
"Keymap for `gdscript-mode'.")
|
"Keymap for `gdscript-mode'.")
|
||||||
|
|
||||||
|
|||||||
@@ -115,8 +115,7 @@ WARNING: the Godot project must exist for this function to work."
|
|||||||
|
|
||||||
(defun gdscript-util--get-godot-project-file-path-relative (file-path)
|
(defun gdscript-util--get-godot-project-file-path-relative (file-path)
|
||||||
"Return the relative path of `FILE-PATH' to Godot's configuration file."
|
"Return the relative path of `FILE-PATH' to Godot's configuration file."
|
||||||
(concat (gdscript-godot--build-shell-command) " -d "
|
(concat (file-name-sans-extension
|
||||||
(file-name-sans-extension
|
|
||||||
(file-relative-name file-path
|
(file-relative-name file-path
|
||||||
(gdscript-util--find-project-configuration-file)))))
|
(gdscript-util--find-project-configuration-file)))))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user