Skip to content
This repository has been archived by the owner on Apr 9, 2021. It is now read-only.

Emacs flycheck extension to lint GDScript code with gdlint

License

Notifications You must be signed in to change notification settings

GDQuest/emacs-flycheck-gdscript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Emacs Flycheck GDSCript

banner showing the "GDScript mode" title with GDScript code in the background

This package adds linting support for Godot GDScript code through Flycheck, using gdlint.

For general support for Godot in Emacs, see Emacs GDScript mode.

Installation

This package isn't available in the MELPA archive yet, so you need to install it manually.

You should have flycheck available in Emacs. Distributions like Spacemacs and Doom Emacs can install it for you. To install it manually, see the Flycheck install guide.

You also need to have gdtoolkit installed. It's a GDScript parser, linter, and code formatter written in Python. You can install gdtoolkit using the pip package manager from Python 3:

pip3 install gdtoolkit

To install flycheck-gdscript manually:

  1. Clone the repository to your computer.
  2. In your init.el file, add a call to load and require the package.
(add-to-list 'load-path "/path/to/gdscript-flycheck.el")
(require 'flycheck-gdscript)

Installing in Spacemacs

  1. Clone the repository to the private/local sub-directory of your .emacs.d directory, where you installed Spacemacs.
  2. Add the package to the dotspacemacs-additional-packages and mark it as local. That's Spacemacs' feature to make it easy to load locally installed packages.
dotspacemacs-additional-packages '((flycheck-gdscript :location local))
  1. In your dotspacemacs/user-config function, require the package.
(defun dotspacemacs/user-config ()
  (require 'gdscript-mode))

Installing in Doom Emacs

Add the following package definition to your .doom.d/packages.el file:

(package! gdscript-mode
          :recipe (:host github
                   :repo "GDQuest/emacs-gdscript-flycheck"
                   :files ("*.el")))

Require the package in your .doom.d/config.el file:

(require 'flycheck-gdscript)

Contributing

If you find a bug or would like to suggest an improvement, open an issue.

For code style, we follow the Emacs lisp style guide by Bozhidar Batsov, and the tips and conventions from the Emacs manual.