Skip to content

payneca/swish-lint

Repository files navigation

Swish Lint

Swish-Lint is a tool that analyzes source code to flag programming errors, bugs, stylistic errors, and suspicious constructs. It provides feedback to improve code quality during development before reviews and inspections. Swish-Lint provides language features like auto completion, go to definition, and find all references to editors like Emacs and VSCode that support the Language Server Protocol.

Features include:

  • Code completion
  • Goto definition
  • Find references
  • Indentation

Install for Emacs

  1. Install lsp-mode

  2. Install lsp-ui

  3. Install flycheck - Flycheck version 31 does not work properly with lsp-mode. We recommend either using the non-stable MELPA url https://melpa.org/packages/ or another package management system to get a newer version.

  4. Install company-mode

You may also want to follow the performance tuning instructions for lsp-mode.

(require 'flycheck)

(require 'company)
(setq company-minimum-prefix-length 1)
(setq company-idle-delay 0.0)

(require 'lsp-mode)
(setq lsp-prefer-capf t)
(setq lsp-prefer-flymake nil)
(setq lsp-enable-snippet nil)
(setq lsp-idle-delay 0.100)

(require 'lsp-ui)
(add-hook 'lsp-mode-hook 'lsp-ui-mode)
(add-hook 'scheme-mode-hook 'flycheck-mode)

(setq gc-cons-threshold 100000000)
(setq read-process-output-max (* 1024 1024))

(add-to-list 'load-path "~/.emacs.d/swish-lint")
(add-to-list 'exec-path "~/.emacs.d/swish-lint")
(require 'lsp-swish)

To use Swish-Lint's indentation, bind swish-indent-sexp in your scheme mode hook:

(add-hook 'scheme-mode-hook
  (function
   (lambda ()
     (local-set-key (kbd "C-M-q") 'swish-indent-sexp))))

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Scheme 97.8%
  • Emacs Lisp 1.2%
  • Makefile 1.0%