;; icomplete ;; (use-package icomplete ;; :disable ;; :ensure nil ;; :demand t ;; :bind (:map icomplete-minibuffer-map ;; ("C-S-s" . kill-line) ;; ("C-j" . icomplete-forward-completions) ;; ("C-k" . icomplete-backward-completions) ;; ("DEL" . icomplete-fido-backward-updir) ;; ("M-DEL". delete-backward-char) ;; ("M-RET" . icomplete-force-complete-and-exit) ;; ("TAB" . icomplete-force-complete) ;; ("" . abort-recursive-edit) ;; ("C-;" . embark-dwim) ;; ("C-." . embark-act) ;; ("" . backward-char) ;; ("" . forward-char)) ;; :hook (icomplete-minibuffer-setup . my/icomplete-setup-hook-func) ;; :init ;; (defun my/icomplete-setup-hook-func () ;; (setq truncate-lines t)) ;; (setq completion-ignore-case t ;; read-file-name-completion-ignore-case t ;; read-buffer-completion-ignore-case t ;; enable-recursive-minibuffers t ;; minibuffer-prompt-properties '(read-only t ;; cursor-intangible t ;; face minibuffer-prompt) ;; ;;completions-detailed t ;; icomplete-compute-delay 0 ;; icomplete-scroll t) ;; (defun my/crm-indicator (args) ;; (cons (format "[CRM%s] %s" ;; (replace-regexp-in-string ;; "\\`\\[.*?]\\*\\|\\[.*?]\\*\\'" "" ;; crm-separator) ;; (car args)) ;; (cdr args))) ;; (advice-add #'completing-read-multiple :filter-args #'my/crm-indicator) ;; (defun my/marginalia-trim-right (list) ;; (cl-loop for (cand prefix suffix) in list collect ;; (list cand prefix (string-trim-right suffix)))) ;; (advice-add #'marginalia--align :filter-return #'my/marginalia-trim-right) ;; :config ;; (set-face-attribute 'icomplete-selected-match nil :inherit 'region) ;; (fido-mode 1) ;; (fido-vertical-mode 1)) ;; lsp-mode ;; (use-package consult-lsp) ;; (use-package lsp-mode ;; :hook (((c-ts-mode c++-ts-mode java-ts-mode rust-ts-mode python-ts-mode ;; latex-mode markdown-mode blueprint-ts-mode) . lsp-mode) ;; (lsp-mode . my/-setup-lsp-mode-buffer)) ;; :init ;; (setq lsp-completion-provider :none ;; lsp-headerline-breadcrumb-enable nil ;; lsp-inlay-hint-enable nil ;; lsp-signature-doc-lines 1) ;; (defun my/-setup-lsp-mode-buffer () ;; "Called by `lsp-mode-hook' to setup lsp-mode buffers." ;; (evil-define-key '(normal visual motion) 'local ;; "gR" #'lsp-rename ;; "gA" #'lsp-execute-code-action ;; "gs" #'consult-lsp-symbols) ;; (setq-local evil-lookup-func #'lsp-describe-thing-at-point))) ;; vterm ;; (use-package vterm ;; :hook (vterm-mode . with-editor-export-editor) ;; :init ;; (defvar my/project-vterm-hash-table (make-hash-table :test 'equal) ;; "Hash table that maps project root dirs to vterm buffers.") ;; (defun my/project-vterm (prompt) ;; "Switch to or create a vterm buffer in the current projects root." ;; (interactive (list t)) ;; (if-let ((proj (project-current prompt)) ;; (default-directory (project-root proj))) ;; (if-let ((vterm-buff (gethash default-directory ;; my/project-vterm-hash-table)) ;; ((buffer-live-p vterm-buff))) ;; (switch-to-buffer vterm-buff) ;; (puthash default-directory ;; (vterm (concat "*vterm for project " default-directory "*")) ;; my/project-vterm-hash-table)))) ;; (defun my/project-vterm-or-default () ;; "Open a vterm for the current project, otherwise, open a normal vterm." ;; (interactive) ;; (unless (my/project-vterm nil) ;; (if-let ((vterm-buff (gethash nil my/project-vterm-hash-table)) ;; ((buffer-live-p vterm-buff))) ;; (switch-to-buffer vterm-buff) ;; (puthash nil (vterm vterm-buffer-name) my/project-vterm-hash-table))))) ;; ai stuff (also mostly fun) ;; (use-package ellama ;; :defer nil ;; :custom ;; (ellama-sessions-directory (no-littering-expand-var-file-name ;; "ellama-sessions")) ;; (ellama-major-mode 'markdown-mode) ;; fix text inserting at top of buffer ;; (ellama-session-file-extension "md") ;; (ellama-nick-prefix "##") ;; (ellama-keymap-prefix "C-c m") ;; :hook (ellama-session-mode . my/-ellama-startup-hook) ;; :init ;; (defun my/-ellama-startup-hook () ;; "Hook to do stuff in llama buffers." ;; (auto-fill-mode -1))) ;; sly ;; (use-package sly ;; :hook (lisp-mode . my/-lisp-mode-autoconnect-sly) ;; :bind (:map sly-mode-map ;; ("C-c e" . my/sly-show-notes-at-point)) ;; :autoload sly-connected-p ;; :init ;; (defun my/-lisp-mode-autoconnect-sly () ;; (unless (sly-connected-p) ;; (sly))) ;; (defun my/sly-notes-at-point (pos &optional buffer) ;; "Returns the sly notes at POS in BUFFER. ;; If BUFFER is nil, the current buffer is used." ;; (with-current-buffer (or buffer (current-buffer)) ;; (cl-loop for overlay in (overlays-at pos) ;; for note = (overlay-get overlay 'sly-note) ;; when note ;; collect note))) ;; (defun my/sly-show-notes-at-point () ;; "Show all sly notes at point in a floating window." ;; (interactive) ;; (my/floating-tooltip " *sly-note-posframe*" ;; (with-output-to-string ;; (dolist (note (my/sly-notes-at-point (point))) ;; (when-let (msg (plist-get note :message)) ;; (princ "ยท") ;; (princ msg) ;; (terpri)))))) ;; (setq inferior-lisp-program "/usr/bin/sbcl") ;; :config ;; (sly-symbol-completion-mode -1))