[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/nix-mode 6a9cb7e682 081/500: Add basic REPL via nix-repl
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/nix-mode 6a9cb7e682 081/500: Add basic REPL via nix-repl |
Date: |
Sat, 29 Jan 2022 08:26:38 -0500 (EST) |
branch: elpa/nix-mode
commit 6a9cb7e6821b41de2a68181d17501706dce89b44
Author: Leon Isenberg <ljli@users.noreply.github.com>
Commit: Matthew Bauer <mjbauer95@gmail.com>
Add basic REPL via nix-repl
---
nix-mode.el | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/nix-mode.el b/nix-mode.el
index 309a5090af..f934dcc9c1 100644
--- a/nix-mode.el
+++ b/nix-mode.el
@@ -211,6 +211,27 @@ If a close brace `}' ends an antiquote, the next character
begins a string."
(add-to-list 'flycheck-checkers 'nix)
+;;; REPL
+
+(defvar nix-prompt-regexp "nix-repl> ")
+
+(define-derived-mode nix-repl-mode comint-mode "Nix-REPL"
+ "Interactive prompt for Nix."
+ (setq-local comint-prompt-regexp nix-prompt-regexp)
+ (setq-local comint-prompt-read-only t))
+
+(defun nix-repl-show ()
+ "Load the Nix-REPL."
+ (interactive)
+ (pop-to-buffer-same-window
+ (get-buffer-create "*Nix-REPL*"))
+ (unless (comint-check-proc (current-buffer))
+ (nix--make-repl-in-buffer (current-buffer))
+ (nix-repl-mode)))
+
+(defun nix--make-repl-in-buffer (buffer)
+ (make-comint-in-buffer "Nix-REPL" buffer "nix-repl"))
+
;;; Indentation
(defun nix-indent-level-parens ()
- [nongnu] elpa/nix-mode 9b705381c4 063/500: Fix antiquote highlighting., (continued)
- [nongnu] elpa/nix-mode 9b705381c4 063/500: Fix antiquote highlighting., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 0624820fd3 067/500: Fix org-mode fontification error., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 3338f5997e 056/500: Fix beginning of buffer issue, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 0f01eecdaa 050/500: Make sure everything starts at beginning of line., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 03f462ef34 062/500: Add "+" to hanging indent list., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode ad09b3be7f 066/500: Fix flycheck errors., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 6534f146eb 065/500: Formatting, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 5a29112764 073/500: Add function for escaped antiquote., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 460cc23161 075/500: Make " be treated as generic | syntax class., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode ff8409c617 079/500: Declare lexical-binding, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 6a9cb7e682 081/500: Add basic REPL via nix-repl,
ELPA Syncer <=
- [nongnu] elpa/nix-mode 836e14fdd4 093/500: Merge pull request #12 from matthewbauer/case-sensitive-searching, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode ea23a301d7 086/500: Fontification.., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode f309e106ef 090/500: Revert "Make " be treated as generic | syntax class.", ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 64d615d628 096/500: Add nix-mode-mmm, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode f968cb98ef 097/500: Add nix-buffer., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode c0502994b5 100/500: Remove nix-mode-reload., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 956280c161 116/500: Refactor nix--antiquote-close, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode de02e17924 135/500: Fix fontification of "}${" in some contexts, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 0b19f975cd 143/500: Merge pull request #28 from pvmart/fix-nix-mmm, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 719482b701 148/500: Update customizations for Nix related modes., ELPA Syncer, 2022/01/29