This commit is contained in:
ry
2022-01-11 18:05:13 -08:00
parent 2046befee2
commit 8e7b654716
846 changed files with 71287 additions and 4 deletions

View File

@@ -0,0 +1,55 @@
#+TITLE: lang/gdscript
#+DATE: May 27, 2020
#+SINCE: v2.0.9
* Table of Contents :TOC:
- [[#description][Description]]
- [[#module-flags][Module Flags]]
- [[#plugins][Plugins]]
- [[#prerequisites][Prerequisites]]
- [[#features][Features]]
- [[#configuration][Configuration]]
- [[#appendix][Appendix]]
- [[#commands][Commands]]
* Description
This module adds support for GDScript, the scripting language of the [[http://godotengine.org/][Godot]] game
engine, to Doom Emacs, powered by [[https://github.com/GDQuest/emacs-gdscript-mode][gdscript-mode]].
** Module Flags
+ =+lsp= Enables LSP support for gdscript-mode. This requires the =:tools lsp=
module to be enabled and you need to open your project in Godot ~3.2.1~ or
above to run the language server.
** Plugins
This module provides no plugins.
* Prerequisites
To format your GDScript code, you need to install [[https://github.com/Scony/godot-gdscript-toolkit/][gdtoolkit]]:
#+BEGIN_SRC shell
# On Windows
pip install gdtoolkit
# On MacOS and Linux
pip3 install gdtoolkit
#+END_SRC
* Features
The language server support for GDScript is built into by lsp-mode. As long as
you have the ~lsp~ module installed, you should be able to use the language
server.
Godot's language server is built into the game engine, so you need to open your
project in Godot ~3.2.1~ or above for the GDScript language server to be
available.
/Note that the GDScript language server has known issues causing some errors
with lsp-mode. They should be addressed in future releases./
* Configuration
This module provides no configuration.
* Appendix
** Commands
Press ~SPC m~ (local leader key) to explore available commands.

View File

@@ -0,0 +1,42 @@
;;; lang/gdscript/config.el -*- lexical-binding: t; -*-
(after! projectile
(add-to-list 'projectile-project-root-files "project.godot"))
;;
;;; Packages
(use-package! gdscript-mode
:defer t
:config
(set-lookup-handlers! 'gdscript-mode
:documentation #'gdscript-docs-browse-symbol-at-point)
(when (featurep! +lsp)
(add-hook 'gdscript-mode-local-vars-hook #'lsp!))
(map! :localleader
:map gdscript-mode-map
(:prefix ("r" . "run")
:desc "Open project in Godot" "e" #'gdscript-godot-open-project-in-editor
:desc "Run project" "p" #'gdscript-godot-run-project
:desc "Run debug" "d" #'gdscript-godot-run-project-debug
:desc "Run current scene" "s" #'gdscript-godot-run-current-scene)
(:prefix ("d" . "debug")
:desc "Add breakpoint" "a" #'gdscript-debug-add-breakpoint
:desc "Display breakpoint buffer" "b" #'gdscript-debug-display-breakpoint-buffer
:desc "Remove breakpoint" "d" #'gdscript-debug-remove-breakpoint
:desc "Continue execution" "c" #'gdscript-debug-continue
:desc "Next" "n" #'gdscript-debug-next
:desc "Step" "s" #'gdscript-debug-step)
(:prefix ("h" . "help")
:desc "Browse online API" "b" #'gdscript-docs-browse-api
:desc "Browse API at point" "f" #'gdscript-docs-browse-symbol-at-point)
(:prefix ("f" . "format")
:desc "Format buffer" "b" #'gdscript-format-buffer
:desc "Format region" "r" #'gdscript-format-region)))

View File

@@ -0,0 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; lang/gdscript/packages.el
(package! gdscript-mode :pin "b7bfa6a3b294039f5093f85e4ff809ff05333abd")