fixing some ellama things and adding gitlab

This commit is contained in:
Chris Cochrun 2024-04-17 10:10:10 -05:00
parent a05cc4363b
commit 2956f55edf
3 changed files with 67 additions and 5 deletions

View file

@ -28,6 +28,7 @@
- [[#tempel][Tempel]]
- [[#projectile][Projectile]]
- [[#project][Project]]
- [[#gitlab][Gitlab]]
- [[#httpd][HTTPD]]
- [[#navigation][Navigation]]
- [[#window-management][Window Management]]
@ -2149,6 +2150,11 @@ Idk, let's try this i guess
:port 443
:chat-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
(chris/leader-keys
:states '(normal visual)
@ -2924,10 +2930,13 @@ Tempel is another templating system. Also perhaps even more powerful with it's e
(cons #'tempel-complete
completion-at-point-functions)))
(add-hook 'conf-mode-hook 'tempel-setup-capf)
(add-hook 'prog-mode-hook 'tempel-setup-capf)
(add-hook 'text-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,
;; either locally or globally. `expand-abbrev' is bound to C-x '.
;; (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)
(general-def 'insert tempel-map
"C-l" 'tempel-next
"C-h" 'tempel-previous)
)
"C-h" 'tempel-previous))
(use-package tempel-collection)
#+END_SRC
** Projectile
I'm going to use projectile to keep my projects inline.
#+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-switch-project))
#+end_src
** Project
Here are project specific commands
#+begin_src emacs-lisp
@ -2984,6 +2996,19 @@ Here are project specific commands
"p" 'evil-paste-after)
#+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
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
@ -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)))
(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
`(("q" "exit")
("f" "find-file $1")