summaryrefslogtreecommitdiff
path: root/.config/emacs
diff options
context:
space:
mode:
authorJackJ30 <jackqjamison@proton.me>2025-01-05 17:12:04 -0500
committerJackJ30 <jackqjamison@proton.me>2025-01-05 17:12:04 -0500
commit1e356fe361d4ef2a6ba83ca73ab61a4449355be3 (patch)
treede88e760ea53d4f9b32ee24249a5ec15c0f931df /.config/emacs
parent582143746c383562fe6ea70f217a6668333dbc9a (diff)
lsp and development improvements
Diffstat (limited to '.config/emacs')
-rw-r--r--.config/emacs/init.el2
-rw-r--r--.config/emacs/settings.org70
2 files changed, 44 insertions, 28 deletions
diff --git a/.config/emacs/init.el b/.config/emacs/init.el
index 1a569d2..abe934a 100644
--- a/.config/emacs/init.el
+++ b/.config/emacs/init.el
@@ -8,7 +8,7 @@
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(package-selected-packages
- '(diminish evil-nerd-commenter expand-region flycheck color-identifiers-mode consult doom-themes lsp-ui lsp-mode rainbow-delimiters yasnippet-snippets markdown-mode yasnippet no-littering vertico orderless marginalia vc-use-package miasma-theme kind-icon dracula-theme corfu)))
+ '(multiple-cursors diminish evil-nerd-commenter expand-region flycheck color-identifiers-mode consult doom-themes lsp-ui lsp-mode rainbow-delimiters yasnippet-snippets markdown-mode yasnippet no-littering vertico orderless marginalia vc-use-package miasma-theme kind-icon dracula-theme corfu)))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
diff --git a/.config/emacs/settings.org b/.config/emacs/settings.org
index 7308fb2..aa2c5d5 100644
--- a/.config/emacs/settings.org
+++ b/.config/emacs/settings.org
@@ -47,6 +47,7 @@
backup-inhibited t)
(setf dired-kill-when-opening-new-dired-buffer t)
+ (setq dired-listing-switches "-alh --group-directories-first")
(setq dired-dwim-target t)
#+END_SRC
@@ -83,7 +84,6 @@
(use-package diminish
:diminish flymake-mode
:diminish flycheck-mode
- :diminish yas-minor-mode
:diminish eldoc-mode)
#+END_SRC
* Themeing
@@ -181,7 +181,8 @@
#+BEGIN_SRC emacs-lisp
(use-package yasnippet
:config
- (yas-global-mode t))
+ (yas-global-mode t)
+ :diminish yas-minor-mode)
(use-package yasnippet-snippets)
@@ -190,29 +191,34 @@
** LSP
#+BEGIN_SRC emacs-lisp
- (use-package lsp-mode
- :commands (lsp lsp-deferred)
- :init
- (setq lsp-keymap-prefix "C-c l"
- lsp-headerline-breadcrumb-enable nil
- lsp-lens-enable nil)
- (defun my/lsp-mode-setup-completion ()
- (setf (alist-get 'styles (alist-get 'lsp-capf completion-category-defaults))
- '(orderless))) ;; Configure orderless
- :hook ((lsp-completion-mode . my/lsp-mode-setup-completion)
- (c-mode . lsp-deferred)
- (c++-mode . lsp-deferred)
- (python-mode . lsp-deferred)
- (csharp-mode . lsp-deferred))
-
- :custom
- (lsp-completion-provider :none) ; corfu
- (lsp-idle-delay 0.2)
- )
-
- (use-package lsp-ui
- :hook (lsp-mode . lsp-ui-mode)
- :bind ("C-c r" . lsp-ui-peek-find-references))
+ (use-package lsp-mode
+ :commands (lsp lsp-deferred)
+ :init
+ (setq lsp-keymap-prefix "C-c l"
+ lsp-headerline-breadcrumb-enable nil
+ lsp-lens-enable nil
+ lsp-completion-enable-additional-text-edit nil)
+ (defun my/lsp-mode-setup-completion ()
+ (setf (alist-get 'styles (alist-get 'lsp-capf completion-category-defaults))
+ '(orderless))) ;; Configure orderless
+ :hook ((lsp-completion-mode . my/lsp-mode-setup-completion)
+ (c-mode . lsp-deferred)
+ (c++-mode . lsp-deferred)
+ (python-mode . lsp-deferred)
+ (csharp-mode . lsp-deferred))
+
+ :custom
+ (lsp-completion-provider :none) ; corfu
+ (lsp-idle-delay 0.2)
+
+ )
+
+ (use-package lsp-ui
+ :hook (lsp-mode . lsp-ui-mode)
+ :bind (
+ ("C-c r" . lsp-ui-peek-find-references)
+ ("C-c d" . lsp-ui-peek-find-definitions)
+ ))
#+END_SRC
@@ -259,7 +265,8 @@
c-basic-offset 4
tab-width 8
indent-tabs-mode t)
- (c-set-offset 'arglist-intro '+))
+ (c-set-offset 'arglist-intro '+)
+ (add-to-list 'c-offsets-alist '(arglist-close . c-lineup-close-paren)))
(add-hook 'c-mode-common-hook 'my-c-mode-common-hook)
#+END_SRC
@@ -297,14 +304,23 @@
orig-result)))
(advice-add 'lsp-resolve-final-command :around #'lsp-booster--advice-final-command)
#+END_SRC
-* Util and Keybinds
+** Util and Keybinds
#+BEGIN_SRC emacs-lisp
(use-package expand-region
:bind("C-=" . er/expand-region))
+ (use-package multiple-cursors
+ :bind (:map global-map
+ ("C->" . 'mc/mark-next-like-this)
+ ("C-<" . 'mc/mark-previous-like-this)
+ ("C-c C->" . 'mc/mark-all-like-this)
+ :map mc/keymap
+ ("<return>" . nil)))
+
(use-package evil-nerd-commenter
:bind ("M-;" . evilnc-comment-or-uncomment-lines))
(global-set-key (kbd "C-c e") 'consult-flymake)
+ (global-set-key (kbd "C-c f") 'ff-find-other-file)
#+END_SRC