From d0063c054b3d55be74ed2f60fcc502af5b7ee89a Mon Sep 17 00:00:00 2001 From: jeschli Date: Fri, 26 Oct 2018 11:53:19 +0200 Subject: j emacs: enable ido completion --- jeschli/2configs/emacs.nix | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'jeschli/2configs/emacs.nix') diff --git a/jeschli/2configs/emacs.nix b/jeschli/2configs/emacs.nix index 5fc887477..896d3838f 100644 --- a/jeschli/2configs/emacs.nix +++ b/jeschli/2configs/emacs.nix @@ -25,6 +25,10 @@ let ;; (require 'evil-org-agenda) ;; (evil-org-agenda-set-keys) ''; + ido = '' + (require 'ido) + (ido-mode t) + ''; windowCosmetics = '' (menu-bar-mode -1) (tool-bar-mode -1) ; Disable the button bar atop screen @@ -58,6 +62,7 @@ let ''; dotEmacs = pkgs.writeText "dot-emacs" '' ${evilMode} + ${ido} ${packageRepos} ${orgMode} ${recentFiles} -- cgit v1.2.3 From b22d3461ac908a9125848792f90fa58029fbc980 Mon Sep 17 00:00:00 2001 From: jeschli Date: Fri, 26 Oct 2018 11:55:06 +0200 Subject: j emacs: shortcuts for global org link creation --- jeschli/2configs/emacs.nix | 2 ++ 1 file changed, 2 insertions(+) (limited to 'jeschli/2configs/emacs.nix') diff --git a/jeschli/2configs/emacs.nix b/jeschli/2configs/emacs.nix index 896d3838f..096d23dff 100644 --- a/jeschli/2configs/emacs.nix +++ b/jeschli/2configs/emacs.nix @@ -46,6 +46,8 @@ let (global-set-key "\C-cl" 'org-store-link) (global-set-key "\C-ca" 'org-agenda) (global-set-key "\C-cb" 'org-iswitchb) + (global-set-key "\C-c L" 'org-insert-link-global) + (global-set-key "\C-c o" 'org-open-at-point-global) (setq org-link-frame-setup '((file . find-file))) ; open link in same frame. (if (boundp 'org-user-agenda-files) (setq org-agenda-files org-user-agenda-files) -- cgit v1.2.3 From 18528650ed3619c505fd4f1ab79feb40d727be20 Mon Sep 17 00:00:00 2001 From: jeschli Date: Fri, 26 Oct 2018 11:56:28 +0200 Subject: j emacs: load monokai-alt without asking --- jeschli/2configs/emacs.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'jeschli/2configs/emacs.nix') diff --git a/jeschli/2configs/emacs.nix b/jeschli/2configs/emacs.nix index 096d23dff..6197f9523 100644 --- a/jeschli/2configs/emacs.nix +++ b/jeschli/2configs/emacs.nix @@ -55,7 +55,7 @@ let ) ''; theme = '' - (load-theme 'monokai-alt) + (load-theme 'monokai-alt t) ''; recentFiles = '' (recentf-mode 1) -- cgit v1.2.3 From f6ad60a0c6cbac45e8ba715b24a7a37f8e2560dc Mon Sep 17 00:00:00 2001 From: jeschli Date: Fri, 26 Oct 2018 12:17:28 +0200 Subject: j emacs: add haskell-mode --- jeschli/2configs/emacs.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'jeschli/2configs/emacs.nix') diff --git a/jeschli/2configs/emacs.nix b/jeschli/2configs/emacs.nix index 6197f9523..1c92f601f 100644 --- a/jeschli/2configs/emacs.nix +++ b/jeschli/2configs/emacs.nix @@ -76,6 +76,7 @@ let epkgs.melpaStablePackages.magit epkgs.melpaPackages.nix-mode epkgs.melpaPackages.go-mode + epkgs.melpaPackages.haskell-mode epkgs.melpaPackages.google-this epkgs.melpaPackages.monokai-alt-theme ]); -- cgit v1.2.3 From a931b19ababfb446c77c55c075e35f22f176088e Mon Sep 17 00:00:00 2001 From: jeschli Date: Fri, 2 Nov 2018 09:41:47 +0100 Subject: j emacs: modify go-mode --- jeschli/2configs/emacs.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'jeschli/2configs/emacs.nix') diff --git a/jeschli/2configs/emacs.nix b/jeschli/2configs/emacs.nix index 1c92f601f..636c8dafd 100644 --- a/jeschli/2configs/emacs.nix +++ b/jeschli/2configs/emacs.nix @@ -25,10 +25,22 @@ let ;; (require 'evil-org-agenda) ;; (evil-org-agenda-set-keys) ''; + + goMode = '' + (add-to-list 'exec-path "~/go/bin") + (add-hook 'go-mode-hook + (lambda () + (setq-default) + (setq tab-width 2) + (setq standard-indent 2) + (setq indent-tabs-mode nil))) + ''; + ido = '' (require 'ido) (ido-mode t) ''; + windowCosmetics = '' (menu-bar-mode -1) (tool-bar-mode -1) ; Disable the button bar atop screen @@ -54,16 +66,20 @@ let (setq org-agenda-files (quote ("~/projects/notes"))) ) ''; + theme = '' (load-theme 'monokai-alt t) ''; + recentFiles = '' (recentf-mode 1) (setq recentf-max-menu-items 25) (global-set-key "\C-x\ \C-r" 'recentf-open-files) ''; + dotEmacs = pkgs.writeText "dot-emacs" '' ${evilMode} + ${goMode} ${ido} ${packageRepos} ${orgMode} -- cgit v1.2.3 From ebb2a99f21bab752945ee955fc83643f5a20f668 Mon Sep 17 00:00:00 2001 From: jeschli Date: Fri, 2 Nov 2018 09:43:08 +0100 Subject: j emacs: add newlines --- jeschli/2configs/emacs.nix | 2 ++ 1 file changed, 2 insertions(+) (limited to 'jeschli/2configs/emacs.nix') diff --git a/jeschli/2configs/emacs.nix b/jeschli/2configs/emacs.nix index 636c8dafd..ace6b0f4a 100644 --- a/jeschli/2configs/emacs.nix +++ b/jeschli/2configs/emacs.nix @@ -15,6 +15,7 @@ let (add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/"))) (package-initialize) ''; + evilMode = '' ;; Evil Mode (require 'evil) @@ -53,6 +54,7 @@ let (setq visible-bell nil) ; Disable annoying visual bell graphic (setq ring-bell-function 'ignore) ; Disable super annoying audio bell ''; + orgMode = '' (add-to-list 'auto-mode-alist '("\\.\\(org\\|org_archive\\|txt\\)$" . org-mode)) (global-set-key "\C-cl" 'org-store-link) -- cgit v1.2.3 From 7a0808135928662693cc8a79db905d4e436183f7 Mon Sep 17 00:00:00 2001 From: jeschli Date: Fri, 2 Nov 2018 09:43:47 +0100 Subject: j emacs: add ag, rust-mode and emacs-as-daemon --- jeschli/2configs/emacs.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'jeschli/2configs/emacs.nix') diff --git a/jeschli/2configs/emacs.nix b/jeschli/2configs/emacs.nix index ace6b0f4a..4f5b690f2 100644 --- a/jeschli/2configs/emacs.nix +++ b/jeschli/2configs/emacs.nix @@ -89,7 +89,9 @@ let ${theme} ${windowCosmetics} ''; + emacsWithCustomPackages = (pkgs.emacsPackagesNgGen pkgs.emacs).emacsWithPackages (epkgs: [ + epkgs.melpaPackages.ag epkgs.melpaPackages.evil epkgs.melpaStablePackages.magit epkgs.melpaPackages.nix-mode @@ -97,12 +99,23 @@ let epkgs.melpaPackages.haskell-mode epkgs.melpaPackages.google-this epkgs.melpaPackages.monokai-alt-theme + epkgs.melpaPackages.rust-mode ]); + myEmacs = pkgs.writeDashBin "my-emacs" '' exec ${emacsWithCustomPackages}/bin/emacs -q -l ${dotEmacs} "$@" ''; + + myEmacsWithDaemon = pkgs.writeDashBin "my-emacs-daemon" '' + exec ${emacsWithCustomPackages}/bin/emacs -q -l ${dotEmacs} --daemon + ''; + + myEmacsClient = pkgs.writeDashBin "meclient" '' + exec ${emacsWithCustomPackages}/bin/emacsclient --create-frame + ''; + in { environment.systemPackages = [ - myEmacs + myEmacs myEmacsWithDaemon myEmacsClient ]; } -- cgit v1.2.3