Update Doom Emacs install instructions, format README

This commit is contained in:
Nathan Lovato
2020-12-13 12:45:57 -06:00
parent 75fe658ab8
commit 20fc7e4381

View File

@@ -8,38 +8,38 @@ game engine in Emacs. It gives syntax highlighting and indentations.
[Contributors](#contributing) are welcome! [Contributors](#contributing) are welcome!
<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-refresh-toc --> <!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-refresh-toc -->
**Table of Contents** **Table of Contents**
- [Features](#features) - [Features](#features)
- [Contributing](#contributing) - [Contributing](#contributing)
- [How to install](#how-to-install) - [How to install](#how-to-install)
- [Installing in Spacemacs](#installing-in-spacemacs) - [Installing in Spacemacs](#installing-in-spacemacs)
- [Installing in Doom Emacs](#installing-in-doom-emacs) - [Installing in Doom Emacs](#installing-in-doom-emacs)
- [Installing with `use-package` + `straight.el`](#installing-with-use-package--straightel) - [Installing with `use-package` + `straight.el`](#installing-with-use-package--straightel)
- [Installing manually](#installing-manually) - [Installing manually](#installing-manually)
- [Auto-completion with the Language Server Protocol (LSP)](#auto-completion-with-the-language-server-protocol-lsp) - [Auto-completion with the Language Server Protocol (LSP)](#auto-completion-with-the-language-server-protocol-lsp)
- [How to use](#how-to-use) - [How to use](#how-to-use)
- [Opening the project in the editor](#opening-the-project-in-the-editor) - [Opening the project in the editor](#opening-the-project-in-the-editor)
- [Running Godot with visual debug options](#running-godot-with-visual-debug-options) - [Running Godot with visual debug options](#running-godot-with-visual-debug-options)
- [Using Hydra](#using-hydra) - [Using Hydra](#using-hydra)
- [Formatting code with gdformat](#formatting-code-with-gdformat) - [Formatting code with gdformat](#formatting-code-with-gdformat)
- [Browsing the Godot API with eww](#browsing-the-godot-api-with-eww) - [Browsing the Godot API with eww](#browsing-the-godot-api-with-eww)
- [Keyboard shortcuts](#keyboard-shortcuts) - [Keyboard shortcuts](#keyboard-shortcuts)
- [Customization](#customization) - [Customization](#customization)
- [Using the debugger](#using-the-debugger) - [Using the debugger](#using-the-debugger)
- [Adding and removing breakpoints](#adding-and-removing-breakpoints) - [Adding and removing breakpoints](#adding-and-removing-breakpoints)
- [Running the project with the debugger active](#running-the-project-with-the-debugger-active) - [Running the project with the debugger active](#running-the-project-with-the-debugger-active)
- [Fetching an object's details](#fetching-an-objects-details) - [Fetching an object's details](#fetching-an-objects-details)
- [Debug Hydra](#debug-hydra) - [Debug Hydra](#debug-hydra)
- [The `* Stack frame vars *` buffer](#the--stack-frame-vars--buffer) - [The `* Stack frame vars *` buffer](#the--stack-frame-vars--buffer)
- [`* Inspector *` buffer](#-inspector--buffer) - [`* Inspector *` buffer](#-inspector--buffer)
- [`* Stack dump *` buffer](#-stack-dump--buffer) - [`* Stack dump *` buffer](#-stack-dump--buffer)
- [`* Breakpoints *` buffer](#-breakpoints--buffer) - [`* Breakpoints *` buffer](#-breakpoints--buffer)
- [`* Scene tree *` buffer](#-scene-tree--buffer) - [`* Scene tree *` buffer](#-scene-tree--buffer)
<!-- markdown-toc end --> <!-- markdown-toc end -->
## Features ## Features
This mode features all the essentials: This mode features all the essentials:
@@ -120,19 +120,18 @@ Then, in your init.el file, you can require the package:
### Installing in Doom Emacs ### Installing in Doom Emacs
Add the following package definition to your `.doom.d/packages.el` file: Doom Emacs comes with a Godot GDScript module.
You just need to add the "lang: gdscript" keyword to your `.doom.d/init.el` file.
```lisp ```lisp
(package! gdscript-mode :lang
:recipe (:host github (gdscript +lsp) ; the language you waited for
:repo "GDQuest/emacs-gdscript-mode"))
``` ```
Require the package in your `.doom.d/config.el` file: The `+lsp` flag adds language server support for game development with Godot.
```lisp To see the module's documentation in Emacs, place your cursor over the word `gdscript` and press <kbd>k</kbd>.
(require 'gdscript-mode)
```
### Installing with `use-package` + `straight.el` ### Installing with `use-package` + `straight.el`
@@ -156,12 +155,11 @@ Add the call to use-package to your Emacs configuration:
(require 'gdscript-mode) (require 'gdscript-mode)
``` ```
## Auto-completion with the Language Server Protocol (LSP) ## Auto-completion with the Language Server Protocol (LSP)
For auto-completion, we rely on the [lsp-mode](https://emacs-lsp.github.io/lsp-mode/) package and the GDScript language server, which is built into Godot. For auto-completion, we rely on the [lsp-mode](https://emacs-lsp.github.io/lsp-mode/) package and the GDScript language server, which is built into Godot.
The GDScript LSP support is part of the LSP mode. To use it, you need to install `lsp-mode` on top of `gdscript-mode` and configure it. To install and configure `lsp-mode`, see the [lsp-mode documentation](https://emacs-lsp.github.io/lsp-mode/page/installation/). The GDScript LSP support is part of the LSP mode. To use it, you need to install `lsp-mode` on top of `gdscript-mode` and configure it. To install and configure `lsp-mode`, see the [lsp-mode documentation](https://emacs-lsp.github.io/lsp-mode/page/installation/).
### Known issues ### Known issues
@@ -181,6 +179,7 @@ There are some known issues with the GDScript language server in Godot 3.2 due t
;; Runs the function `lsp--gdscript-ignore-errors` around `lsp--get-message-type` to suppress unknown notification errors. ;; Runs the function `lsp--gdscript-ignore-errors` around `lsp--get-message-type` to suppress unknown notification errors.
(advice-add #'lsp--get-message-type :around #'lsp--gdscript-ignore-errors) (advice-add #'lsp--get-message-type :around #'lsp--gdscript-ignore-errors)
``` ```
## How to use ## How to use
### Opening the project in the editor ### Opening the project in the editor