Raku mode lets you edit Raku code with GNU Emacs 24.
This mode needs GNU Emacs 24.4.
find-file-at-point
for module nameselectric-pair-mode
needs some context-sensitive help)With use-package
in your init file:
(use-package raku-mode :ensure t :defer t)
Or in your Cask
file:
(source melpa) (depends-on "raku-mode")
Or manually from MELPA with M-x package-refresh-contents and M-x package-install RET raku-mode.
Just visit Raku files.
The major mode will be autoloaded whenever a Raku file is visited. This includes any file with raku
in the shebang, as well as any file with a .p6
, .pm6
, or .pl6
extension. It also applies to any .pm
, .pl
, and .t
files whose first line of code looks like Raku.
Start the REPL with M-x run-raku RET. The following keybindings are available to interact with the REPL:
The REPL will start if needed with this keybindings.
Use M-x customize-group RET raku to customize Raku Mode.
Included are two skeletons (file templates) that can be auto-inserted with auto-insert-mode:
raku-script-skeleton
, andraku-module-skeleton
.To use them, add them to your auto-insert-alist (M-x customize-option RET auto-insert-alist
) with the conditions of your choice.
To insert them when you create a new file with the .raku
or .rakumod
extension, use the following matching regular expressions:
raku-script-skeleton
: \.raku\'
.raku-module-skeleton
: \.rakumod\
.Alternatively you can add them in your .emacs using define-auto-insert
:
(define-auto-insert '("\\.rakumod\\'" . "Raku module skeleton") 'raku-module-skeleton) (define-auto-insert '("\\.raku\\'" . "Raku script skeleton") 'raku-script-skeleton)
The full path to the Raku executable for the shebang, as well as the default auth information for a module can be defined in the Raku Skeleton customization group, M-x customize-group RET raku-skeleton
.
Pull requests are welcome.
You might want to install cask
so you can run the test suite (with make test
).
The original version of this code can be found at https://github.com/hinrik/perl6-mode
Raku Mode is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Raku Mode is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
See COPYING
for the complete license.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4