1
0
Fork 0

Compare commits

..

No commits in common. "29c0e79b8c60af8095710d93c93572c6802bbc66" and "bccdcc849dbdf98d7f972df3fadfff808951c6d3" have entirely different histories.

6 changed files with 17 additions and 77 deletions

View file

@ -36,38 +36,13 @@
(use-package orderless :straight t (use-package orderless :straight t
:custom :custom
(orderless-matching-styles '(orderless-literal-prefix orderless-literal orderless-regexp))) (orderless-matching-styles '(orderless-literal-prefix orderless-literal orderless-regexp)))
(use-package consult :straight t
:bind (("C-c r r" . consult-ripgrep)
("C-c r g" . consult-grep)))
(use-package yasnippet :straight t (use-package yasnippet :straight t
:hook ((prog-mode . yas-minor-mode))) :hook ((prog-mode . yas-minor-mode)))
(use-package yasnippet-snippets :straight t) (use-package yasnippet-snippets :straight t)
(use-package consult :straight t
:bind (("C-c r r" . consult-ripgrep)
("C-c r g" . consult-grep)
("C-c r f" . consult-ripgrep-file)))
(defun consult-ripgrep-file (&optional initial)
"Search with `rg' in the current file with INITIAL input."
(interactive)
(cond
((buffer-file-name)
(let* ((file (buffer-file-name))
(builder (consult--ripgrep-make-builder (list file))))
(consult--read
(consult--process-collection builder
:transform (consult--grep-format builder)
:file-handler t)
:prompt "Ripgrep (current file): "
:lookup #'consult--lookup-member
:state (consult--grep-state)
:initial initial
:add-history (thing-at-point 'symbol)
:require-match t
:category 'consult-grep
:group #'consult--prefix-group
:history '(:input consult--grep-history)
:sort nil)))
(t (user-error "Buffer not visiting a file"))))
(provide 'priime-completion) (provide 'priime-completion)
;;; priime-completion.el ends here ;;; priime-completion.el ends here

View file

@ -8,8 +8,9 @@
;;; Font ;;; Font
(defvar priime--font-config (defvar priime--font-config
(cond ((eq system-type 'gnu/linux) '("JetBrains Mono Medium" "Roboto" 12 0.8)) (cond ((string= (system-name) "minji") '("JetBrains Mono Medium" "Roboto" 10 0.9))
((eq system-type 'darwin) '("JetBrains Mono Medium" "Verdana" 12 1)) ((eq system-type 'gnu/linux) '("Roboto Mono Medium" "Roboto" 12 0.8))
((eq system-type 'darwin) '("Menlo" "Verdana" 12 1))
(t '("Roboto Mono" "Roboto" 10 0.8)))) (t '("Roboto Mono" "Roboto" 10 0.8))))
(defvar priime-fixed-font (-first-item priime--font-config)) (defvar priime-fixed-font (-first-item priime--font-config))

View file

@ -120,10 +120,6 @@
(use-package auctex :straight t) (use-package auctex :straight t)
(use-package cdlatex :straight t) (use-package cdlatex :straight t)
(use-package yaml-mode :straight t) (use-package yaml-mode :straight t)
(use-package swift-mode :straight t
:custom-face (swift-mode:keyword-face ((t (:inherit nano-strong))))
:hook ((swift-mode . electric-pair-local-mode)
(swift-mode . electric-indent-local-mode)))
;; From https://www.ovistoica.com/blog/2024-7-05-modern-emacs-typescript-web-tsx-config ;; From https://www.ovistoica.com/blog/2024-7-05-modern-emacs-typescript-web-tsx-config
(use-package treesit (use-package treesit

View file

@ -7,7 +7,7 @@
:custom :custom
(eglot-events-buffer-config '(:size 0 :format full)) (eglot-events-buffer-config '(:size 0 :format full))
:custom-face (eglot-inlay-hint-face ((t (:height 1.0)))) :custom-face (eglot-inlay-hint-face ((t (:height 1.0))))
:hook ((racket-mode rust-mode irony-mode tuareg-mode python-mode tsx-ts-mode nix-mode swift-mode) . eglot-ensure) :hook ((racket-mode rust-mode irony-mode tuareg-mode python-mode tsx-ts-mode nix-mode) . eglot-ensure)
:bind (:map eglot-mode-map :bind (:map eglot-mode-map
("C-c l r" . eglot-rename) ("C-c l r" . eglot-rename)
("C-c l a" . eglot-code-actions) ("C-c l a" . eglot-code-actions)
@ -16,8 +16,7 @@
(fset #'jsonrpc--log-event #'ignore) (fset #'jsonrpc--log-event #'ignore)
:config :config
(add-to-list 'eglot-server-programs '(nix-mode "nil")) (add-to-list 'eglot-server-programs '(nix-mode "nil"))
(add-to-list 'eglot-server-programs '(python-mode . ("basedpyright-langserver" "--stdio"))) (add-to-list 'eglot-server-programs '(python-mode . ("basedpyright-langserver" "--stdio"))))
(add-to-list 'eglot-server-programs '(swift-mode "sourcekit-lsp")))
(use-package eglot-booster (use-package eglot-booster
:straight (eglot-booster :type git :host github :repo "jdtsmith/eglot-booster") :straight (eglot-booster :type git :host github :repo "jdtsmith/eglot-booster")
:after (eglot) :after (eglot)

View file

@ -11,8 +11,7 @@
"i" #'org-roam-node-insert "i" #'org-roam-node-insert
"t" #'org-roam-tag-add "t" #'org-roam-tag-add
"s" #'org-save-all-org-buffers "s" #'org-save-all-org-buffers
"w" #'org-switch-workspace "w" #'org-switch-workspace)
"l" #'org-log)
(defun org-switch-workspace (&optional workspace-name) (defun org-switch-workspace (&optional workspace-name)
"Switch the current org-roam-directory to WORKSPACE-NAME." "Switch the current org-roam-directory to WORKSPACE-NAME."
@ -30,17 +29,6 @@
(setq org-roam-db-location (cddr (assoc workspace-name org-workspaces-alist))) (setq org-roam-db-location (cddr (assoc workspace-name org-workspaces-alist)))
(org-roam-db-sync nil))) (org-roam-db-sync nil)))
(defun org-log ()
"Add a new entry to the log."
(interactive)
(let* ((log-file-id "77f70d99-0674-43fb-8d64-f04cfa6cb495")
(log-file (org-roam-node-from-id log-file-id)))
(org-roam-node-visit log-file)
(beginning-of-buffer)
(org-next-visible-heading 1)
(org-insert-heading)
(org-timestamp '(16))))
(defun org-roam-migrate () (defun org-roam-migrate ()
"Migrate a regular org file into an org-roam file in my format." "Migrate a regular org file into an org-roam file in my format."
(interactive) (interactive)

View file

@ -48,37 +48,18 @@
(kill-new target-link) (kill-new target-link)
target-link)) target-link))
(defun git-link--format-line-prefix (filepath) (defun git-link-priime-dev (hostname dirname filename branch commit start end)
"Format the prefix for line spec using FILEPATH."
(concat
(when (git-link--should-render-plain filepath)
"?plain=1")
"#"))
(defun git-link--format-line-range (start end)
"Format the line from START to END."
(format "L%s-L%s" start end))
(defun git-link--format-line-start (start)
"Format the line START."
(format "L%s" start))
(defun git-link--format-line-suffix (filepath start end)
"Common helper function for formatting the line suffix at the end of a URL."
(when start
(concat (git-link--format-line-prefix filepath)
(if end
(git-link--format-line-range start end)
(git-link--format-line-start start)))))
(defun git-link-priime-dev (hostname projname filepath branch commit start end)
"git-link configuration for my own forge." "git-link configuration for my own forge."
(format "%s/%s/src/commit/%s/%s" (format "%s/%s/src/commit/%s/%s"
hostname hostname
projname dirname
(or branch commit) (or branch commit)
(concat filepath (concat filename
(git-link--format-line-suffix filepath start end)))) (when start
(concat (if (git-link--should-render-plain filename) "?plain=1#" "#")
(if end
(format "L%s-L%s" start end)
(format "L%s" start)))))))
(add-to-list 'git-link-remote-alist '("git.priime.dev" git-link-priime-dev)) (add-to-list 'git-link-remote-alist '("git.priime.dev" git-link-priime-dev))