fixing some ellama things and adding gitlab
This commit is contained in:
parent
a05cc4363b
commit
2956f55edf
38
README.org
38
README.org
|
@ -28,6 +28,7 @@
|
||||||
- [[#tempel][Tempel]]
|
- [[#tempel][Tempel]]
|
||||||
- [[#projectile][Projectile]]
|
- [[#projectile][Projectile]]
|
||||||
- [[#project][Project]]
|
- [[#project][Project]]
|
||||||
|
- [[#gitlab][Gitlab]]
|
||||||
- [[#httpd][HTTPD]]
|
- [[#httpd][HTTPD]]
|
||||||
- [[#navigation][Navigation]]
|
- [[#navigation][Navigation]]
|
||||||
- [[#window-management][Window Management]]
|
- [[#window-management][Window Management]]
|
||||||
|
@ -2149,6 +2150,11 @@ Idk, let's try this i guess
|
||||||
:port 443
|
:port 443
|
||||||
:chat-model "dolphin-uncensored"
|
:chat-model "dolphin-uncensored"
|
||||||
:embedding-model "dolphin-uncensored"))))
|
:embedding-model "dolphin-uncensored"))))
|
||||||
|
:config
|
||||||
|
(defun chris/ellama-new-session (prompt)
|
||||||
|
(interactive "sAsk ellama: ")
|
||||||
|
(ellama-provider-select)
|
||||||
|
(ellama-new-session ellama-provider prompt))
|
||||||
:general
|
:general
|
||||||
(chris/leader-keys
|
(chris/leader-keys
|
||||||
:states '(normal visual)
|
:states '(normal visual)
|
||||||
|
@ -2924,10 +2930,13 @@ Tempel is another templating system. Also perhaps even more powerful with it's e
|
||||||
(cons #'tempel-complete
|
(cons #'tempel-complete
|
||||||
completion-at-point-functions)))
|
completion-at-point-functions)))
|
||||||
|
|
||||||
|
(add-hook 'conf-mode-hook 'tempel-setup-capf)
|
||||||
(add-hook 'prog-mode-hook 'tempel-setup-capf)
|
(add-hook 'prog-mode-hook 'tempel-setup-capf)
|
||||||
(add-hook 'text-mode-hook 'tempel-setup-capf)
|
(add-hook 'text-mode-hook 'tempel-setup-capf)
|
||||||
(add-hook 'org-mode-hook 'tempel-setup-capf)
|
(add-hook 'org-mode-hook 'tempel-setup-capf)
|
||||||
|
|
||||||
|
(setq tempel-path "/home/chris/.emacs.d/templates")
|
||||||
|
|
||||||
;; Optionally make the Tempel templates available to Abbrev,
|
;; Optionally make the Tempel templates available to Abbrev,
|
||||||
;; either locally or globally. `expand-abbrev' is bound to C-x '.
|
;; either locally or globally. `expand-abbrev' is bound to C-x '.
|
||||||
;; (add-hook 'prog-mode-hook #'tempel-abbrev-mode)
|
;; (add-hook 'prog-mode-hook #'tempel-abbrev-mode)
|
||||||
|
@ -2937,10 +2946,12 @@ Tempel is another templating system. Also perhaps even more powerful with it's e
|
||||||
"ic" 'tempel-insert)
|
"ic" 'tempel-insert)
|
||||||
(general-def 'insert tempel-map
|
(general-def 'insert tempel-map
|
||||||
"C-l" 'tempel-next
|
"C-l" 'tempel-next
|
||||||
"C-h" 'tempel-previous)
|
"C-h" 'tempel-previous))
|
||||||
)
|
|
||||||
|
(use-package tempel-collection)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
|
||||||
** Projectile
|
** Projectile
|
||||||
I'm going to use projectile to keep my projects inline.
|
I'm going to use projectile to keep my projects inline.
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
|
@ -2957,6 +2968,7 @@ I'm going to use projectile to keep my projects inline.
|
||||||
"fp" 'project-find-file
|
"fp" 'project-find-file
|
||||||
"fP" 'project-switch-project))
|
"fP" 'project-switch-project))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Project
|
** Project
|
||||||
Here are project specific commands
|
Here are project specific commands
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
|
@ -2984,6 +2996,19 @@ Here are project specific commands
|
||||||
"p" 'evil-paste-after)
|
"p" 'evil-paste-after)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
** Gitlab
|
||||||
|
Because most of my projects are hosted on gitlab right now, I think having a client access to it from emacs seems like a really good idea.
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package lab
|
||||||
|
:config
|
||||||
|
(defun chris/gitlab-token ()
|
||||||
|
(interactive)
|
||||||
|
(string-clean-whitespace (shell-command-to-string "rbw get 'gitlab token'")))
|
||||||
|
|
||||||
|
(setq lab-host "https://gitlab.com"
|
||||||
|
lab-token (chris/gitlab-token)))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
** HTTPD
|
** HTTPD
|
||||||
In order to view created websites, I'll use =simple-httpd= to get a web server running in emacs for preview.
|
In order to view created websites, I'll use =simple-httpd= to get a web server running in emacs for preview.
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
@ -4398,6 +4423,15 @@ Let's add our own eshell prompt. and set the password cache to a significantly h
|
||||||
|
|
||||||
(add-hook 'eshell-mode-hook (lambda () (display-line-numbers-mode -1)))
|
(add-hook 'eshell-mode-hook (lambda () (display-line-numbers-mode -1)))
|
||||||
|
|
||||||
|
(defun chris/upgrade-nix ()
|
||||||
|
"A function for updating my nix config"
|
||||||
|
(interactive)
|
||||||
|
(let* ((default-directory (file-truename (concat home-directory ".dotfiles/"))))
|
||||||
|
(async-shell-command
|
||||||
|
"sudo nixos-rebuild switch --show-trace --verbose --impure --flake .#"
|
||||||
|
"*upgrade*"
|
||||||
|
"*upgrade-errors*")))
|
||||||
|
|
||||||
(setq eshell-command-aliases-list
|
(setq eshell-command-aliases-list
|
||||||
`(("q" "exit")
|
`(("q" "exit")
|
||||||
("f" "find-file $1")
|
("f" "find-file $1")
|
||||||
|
|
31
init.el
31
init.el
|
@ -1643,6 +1643,11 @@ Optional BACKEND must be `re-reveal' or a backend derived from it."
|
||||||
:port 443
|
:port 443
|
||||||
:chat-model "dolphin-uncensored"
|
:chat-model "dolphin-uncensored"
|
||||||
:embedding-model "dolphin-uncensored"))))
|
:embedding-model "dolphin-uncensored"))))
|
||||||
|
:config
|
||||||
|
(defun chris/ellama-new-session (prompt)
|
||||||
|
(interactive "sAsk ellama: ")
|
||||||
|
(ellama-provider-select)
|
||||||
|
(ellama-new-session ellama-provider prompt))
|
||||||
:general
|
:general
|
||||||
(chris/leader-keys
|
(chris/leader-keys
|
||||||
:states '(normal visual)
|
:states '(normal visual)
|
||||||
|
@ -2134,10 +2139,13 @@ targets."
|
||||||
(cons #'tempel-complete
|
(cons #'tempel-complete
|
||||||
completion-at-point-functions)))
|
completion-at-point-functions)))
|
||||||
|
|
||||||
|
(add-hook 'conf-mode-hook 'tempel-setup-capf)
|
||||||
(add-hook 'prog-mode-hook 'tempel-setup-capf)
|
(add-hook 'prog-mode-hook 'tempel-setup-capf)
|
||||||
(add-hook 'text-mode-hook 'tempel-setup-capf)
|
(add-hook 'text-mode-hook 'tempel-setup-capf)
|
||||||
(add-hook 'org-mode-hook 'tempel-setup-capf)
|
(add-hook 'org-mode-hook 'tempel-setup-capf)
|
||||||
|
|
||||||
|
(setq tempel-path "/home/chris/.emacs.d/templates")
|
||||||
|
|
||||||
;; Optionally make the Tempel templates available to Abbrev,
|
;; Optionally make the Tempel templates available to Abbrev,
|
||||||
;; either locally or globally. `expand-abbrev' is bound to C-x '.
|
;; either locally or globally. `expand-abbrev' is bound to C-x '.
|
||||||
;; (add-hook 'prog-mode-hook #'tempel-abbrev-mode)
|
;; (add-hook 'prog-mode-hook #'tempel-abbrev-mode)
|
||||||
|
@ -2147,8 +2155,9 @@ targets."
|
||||||
"ic" 'tempel-insert)
|
"ic" 'tempel-insert)
|
||||||
(general-def 'insert tempel-map
|
(general-def 'insert tempel-map
|
||||||
"C-l" 'tempel-next
|
"C-l" 'tempel-next
|
||||||
"C-h" 'tempel-previous)
|
"C-h" 'tempel-previous))
|
||||||
)
|
|
||||||
|
(use-package tempel-collection)
|
||||||
|
|
||||||
(use-package projectile
|
(use-package projectile
|
||||||
:ensure t
|
:ensure t
|
||||||
|
@ -2186,6 +2195,15 @@ targets."
|
||||||
(general-def 'normal
|
(general-def 'normal
|
||||||
"p" 'evil-paste-after)
|
"p" 'evil-paste-after)
|
||||||
|
|
||||||
|
(use-package lab
|
||||||
|
:config
|
||||||
|
(defun chris/gitlab-token ()
|
||||||
|
(interactive)
|
||||||
|
(string-clean-whitespace (shell-command-to-string "rbw get 'gitlab token'")))
|
||||||
|
|
||||||
|
(setq lab-host "https://gitlab.com"
|
||||||
|
lab-token (chris/gitlab-token)))
|
||||||
|
|
||||||
(use-package simple-httpd
|
(use-package simple-httpd
|
||||||
:ensure t)
|
:ensure t)
|
||||||
|
|
||||||
|
@ -3198,6 +3216,15 @@ targets."
|
||||||
|
|
||||||
(add-hook 'eshell-mode-hook (lambda () (display-line-numbers-mode -1)))
|
(add-hook 'eshell-mode-hook (lambda () (display-line-numbers-mode -1)))
|
||||||
|
|
||||||
|
(defun chris/upgrade-nix ()
|
||||||
|
"A function for updating my nix config"
|
||||||
|
(interactive)
|
||||||
|
(let* ((default-directory (file-truename (concat home-directory ".dotfiles/"))))
|
||||||
|
(async-shell-command
|
||||||
|
"sudo nixos-rebuild switch --show-trace --verbose --impure --flake .#"
|
||||||
|
"*upgrade*"
|
||||||
|
"*upgrade-errors*")))
|
||||||
|
|
||||||
(setq eshell-command-aliases-list
|
(setq eshell-command-aliases-list
|
||||||
`(("q" "exit")
|
`(("q" "exit")
|
||||||
("f" "find-file $1")
|
("f" "find-file $1")
|
||||||
|
|
|
@ -71,11 +71,12 @@ c-mode :condition (re-search-backward "^\\w*$" (line-beginning-position) 'noerro
|
||||||
(incc "#include \"" (p (concat (file-name-base (or (buffer-file-name) (buffer-name))) ".h")) "\"")
|
(incc "#include \"" (p (concat (file-name-base (or (buffer-file-name) (buffer-name))) ".h")) "\"")
|
||||||
|
|
||||||
org-mode
|
org-mode
|
||||||
|
|
||||||
(title "#+title: " p n "#+author: Chris Cochrun" n n)
|
(title "#+title: " p n "#+author: Chris Cochrun" n n)
|
||||||
(drawer ":" p ":" n r ":end:")
|
(drawer ":" p ":" n r ":end:")
|
||||||
(begin "#+begin_" (s name) n> r> n "#+end_" name)
|
(begin "#+begin_" (s name) n> r> n "#+end_" name)
|
||||||
(quote "#+begin_quote" n> r> n> "#+end_quote")
|
(quote "#+begin_quote" n> r> n> "#+end_quote")
|
||||||
|
(sidenote "#+begin_sidenote" n> r> n "#+end_sidenote")
|
||||||
|
(marginnote "#+begin_marginnote" n> r> n "#+end_marginnote")
|
||||||
(example "#+begin_example" n> r> n> "#+end_example")
|
(example "#+begin_example" n> r> n> "#+end_example")
|
||||||
(center "#+begin_center" n> r> n> "#+end_center")
|
(center "#+begin_center" n> r> n> "#+end_center")
|
||||||
(comment "#+begin_comment" n> r> n> "#+end_comment")
|
(comment "#+begin_comment" n> r> n> "#+end_comment")
|
||||||
|
|
Loading…
Reference in a new issue