Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 

Repository files navigation

yara-mode

http://melpa.org/packages/yara-mode-badge.svg

yara mode for GNU Emacs to edit yara related files.

(require ‘yara-mode)

How to use YARA Language Server?

Install the official YARA-X Language Server (yr-ls) from VirusTotal/yara-x:

cargo install yara-x-ls

Eglot (Emacs 29+)

yara-mode automatically registers yr-ls with eglot. Simply call M-x eglot or add to your init.el:

(add-hook 'yara-mode-hook #'eglot-ensure)

lsp-mode

To use lsp-mode, add the following to your init.el:

(with-eval-after-load 'lsp-mode
  (add-to-list 'lsp-language-id-configuration
    '(yara-mode . "yara"))

  (lsp-register-client
    (make-lsp-client :new-connection (lsp-stdio-connection '("yr-ls"))
                     :activation-fn (lsp-activate-on-modes 'yara-mode)
                     :server-id 'yara-x-ls)))

(add-hook 'yara-mode-hook #'lsp-deferred)

./yara-mode-yls.png

About

yara-mode for GNU Emacs

Resources

Stars

7 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages