back to lsp mode, i can't get eglot configured correctly
This commit is contained in:
parent
75ef779bfe
commit
67ec5b1c18
3 changed files with 33 additions and 72 deletions
100
config.el
100
config.el
|
@ -21,7 +21,6 @@
|
|||
(custom-set-faces
|
||||
'(default ((t (:background "#111111"))))
|
||||
'(hl-line ((t (:background "#222222"))))
|
||||
;; '(solair-default-face ((t (:background "#111111"))))
|
||||
'(cursor ((t (:background "#FCFCFA" :foreground "black"))))
|
||||
'(line-number ((t (:foreground "#424242"))))
|
||||
'(mu4e-highlight-face ((t (:inherit nil :background "gray26" :foreground "gray85")))))
|
||||
|
@ -66,18 +65,12 @@
|
|||
|
||||
;; Modeline
|
||||
;; - add current workspace name
|
||||
; - add major mode icon
|
||||
;; - add major mode icon
|
||||
(after! doom-modeline
|
||||
(setq doom-modeline-persp-name t
|
||||
doom-modeline-major-mode-icon t)
|
||||
(setq doom-modeline-total-line-number t))
|
||||
|
||||
(defun +default/insert-snippet ()
|
||||
(interactive)
|
||||
(cond ((modulep! :completion vertico)
|
||||
(call-interactively #'consult-yasnippet))
|
||||
(t (call-interactively #'yas-insert-snippet))))
|
||||
|
||||
;; some global settings
|
||||
(setq shell-file-name (executable-find "bash"))
|
||||
(setq dired-vc-rename-file t) ; renaming and changing files in dired now integrates with magit
|
||||
|
@ -87,7 +80,7 @@
|
|||
|
||||
;; reduce which-key waiting
|
||||
(after! which-key
|
||||
(setq which-key-idle-delay 0.3))
|
||||
(setq which-key-idle-delay 0.2))
|
||||
|
||||
;; some defaults for cursor size, scrolling, and buffer handling
|
||||
(setq x-stretch-cursor t
|
||||
|
@ -136,7 +129,6 @@
|
|||
(setq css-fontify-colors nil))
|
||||
|
||||
;; web-mode settings
|
||||
;; (add-hook! web-mode (web-mode-toggle-current-element-highlight))
|
||||
(after! web-mode
|
||||
(setq web-mode-enable-css-colorization nil)
|
||||
(setq web-mode-markup-indent-offset 2)
|
||||
|
@ -157,27 +149,22 @@
|
|||
(setq projectile-enable-caching t)
|
||||
(setq projectile-indexing-method 'hybrid)
|
||||
(setq projectile-project-search-path '(("~/projects" . 4) ("~/source" . 2) ("~/music" . 3)))
|
||||
(setq projectile-globally-ignored-buffers
|
||||
'("*scratch*"
|
||||
"*lsp-log*"))
|
||||
(add-to-list 'projectile-globally-ignored-directories "~/Music/_samples"))
|
||||
|
||||
;; projectile ignoring buffers by their major mode
|
||||
(setq projectile-globally-ignored-modes
|
||||
'("erc-mode"
|
||||
"help-mode"
|
||||
"completion-list-mode"
|
||||
"Buffer-menu-mode"
|
||||
"gnus-.*-mode"
|
||||
"occur-mode"))
|
||||
|
||||
;; mouse support for vertico buffers
|
||||
(after! vertico
|
||||
(vertico-mouse-mode))
|
||||
|
||||
;; modes
|
||||
(use-package! kbd-mode :defer t)
|
||||
|
||||
(setq auto-mode-alist (delete '("\\.svelte\\'" . web-mode) auto-mode-alist))
|
||||
(add-to-list 'auto-mode-alist '("\\.svelte\\'" . svelte-mode))
|
||||
(add-to-list 'auto-mode-alist '("\\.vs\\'" . glsl-mode))
|
||||
(add-to-list 'auto-mode-alist '("\\.fs\\'" . glsl-mode))
|
||||
(add-to-list 'auto-mode-alist '("\\.ino\\'" . arduino-mode))
|
||||
(add-to-list 'auto-mode-alist '("\\.ino\\'" . platformio-mode))
|
||||
(add-to-list 'auto-mode-alist '("\\.lsx\\'" . lisp-mode))
|
||||
|
||||
(after! lsp-mode
|
||||
(setq lsp-signature-render-documentation nil)
|
||||
|
||||
|
@ -244,21 +231,12 @@
|
|||
|
||||
(after! lisp-markup
|
||||
(add-hook! 'lisp-mode 'lisp-markup-minor-mode))
|
||||
(add-to-list 'auto-mode-alist '("\\.lsx\\'" . lisp-mode))
|
||||
|
||||
(after! nix-mode
|
||||
(set-formatter! 'alejandra '("alejandra" "--quiet") :modes '(nix-mode))
|
||||
(setopt lsp-nix-nixd-server-path "nixd"
|
||||
lsp-nix-nixd-formatting-command [ "nixpkgs-alejandra"]))
|
||||
|
||||
;; add platformio to ino files
|
||||
(add-to-list 'auto-mode-alist '("\\.ino\\'" . arduino-mode))
|
||||
(add-to-list 'auto-mode-alist '("\\.ino\\'" . platformio-mode))
|
||||
|
||||
(after! gcode-mode
|
||||
(add-hook! 'gcode-mode-hook 'eldoc-mode))
|
||||
|
||||
;; override aggressive key shortcuts for alt-l/r
|
||||
(use-package! drag-stuff
|
||||
:defer t)
|
||||
|
||||
|
@ -267,14 +245,30 @@
|
|||
|
||||
(use-package! eglot-booster
|
||||
:after eglot
|
||||
:config (eglot-booster-mode))
|
||||
:config
|
||||
(eglot-booster-mode))
|
||||
|
||||
(after! eglot
|
||||
(add-to-list 'eglot-server-programs '(svelte-mode . ("svelteserver" "--stdio")))
|
||||
(add-to-list 'eglot-server-programs '(scad-mode . ("openscad-lsp" "--stdio"))))
|
||||
|
||||
(add-to-list 'eglot-server-programs '(scad-mode . ("openscad-lsp" "--stdio")))
|
||||
(setq-default eglot-workspace-configuration
|
||||
'(:nixd (:formatting (:command ["alejandra"]))))
|
||||
'(:nixd (:formatting (:command ["alejandra"])))))
|
||||
|
||||
(use-package! colorful-mode
|
||||
:custom
|
||||
(colorful-use-prefix t)
|
||||
;; (colorful-only-strings 'only-prog)
|
||||
(css-fontify-colors nil)
|
||||
:config
|
||||
(global-colorful-mode t)
|
||||
(add-to-list 'global-colorful-modes 'helpful-mode)
|
||||
(add-to-list 'global-colorful-modes 'nix-mode)
|
||||
(setq css-fontify-colors nil
|
||||
web-mode-enable-css-colorization nil))
|
||||
|
||||
(use-package! magit-todos
|
||||
:after magit
|
||||
:config (magit-todos-mode 1))
|
||||
|
||||
;; load additional config files
|
||||
(load! "obsidian-config.el")
|
||||
|
@ -290,18 +284,6 @@
|
|||
(setq delete-active-region t) ; delete selected stuff!
|
||||
(+global-word-wrap-mode +1) ; default to soft word wrap
|
||||
|
||||
(use-package! colorful-mode
|
||||
:custom
|
||||
(colorful-use-prefix t)
|
||||
;; (colorful-only-strings 'only-prog)
|
||||
(css-fontify-colors nil)
|
||||
:config
|
||||
(global-colorful-mode t)
|
||||
(add-to-list 'global-colorful-modes 'helpful-mode)
|
||||
(add-to-list 'global-colorful-modes 'nix-mode)
|
||||
(setq css-fontify-colors nil
|
||||
web-mode-enable-css-colorization nil))
|
||||
|
||||
(add-hook! 'post-command-hook
|
||||
(lambda ()
|
||||
"delete colorful overlay on active mark"
|
||||
|
@ -321,25 +303,3 @@
|
|||
(beg (region-beginning))
|
||||
(end (region-end)))
|
||||
(font-lock-flush beg end))))
|
||||
|
||||
(use-package! magit-todos
|
||||
:after magit
|
||||
:config (magit-todos-mode 1))
|
||||
|
||||
(defun +workspaces-associate-frame-fn (frame &optional _new-frame-p)
|
||||
"Create a blank, new perspective and associate it with FRAME."
|
||||
(when persp-mode
|
||||
(with-selected-frame frame
|
||||
(if (not (cdr-safe (persp-frame-list-without-daemon)))
|
||||
(+workspace-switch +workspaces-main t)
|
||||
(+workspace-switch (format "#%s" (+workspace--generate-id)) t))
|
||||
(unless (doom-real-buffer-p (current-buffer))
|
||||
(switch-to-buffer (doom-fallback-buffer)))
|
||||
(set-frame-parameter frame 'workspace (+workspace-current-name))
|
||||
;; ensure every buffer has a buffer-predicate
|
||||
(persp-set-frame-buffer-predicate frame))
|
||||
(run-at-time 0.1 nil #'+workspace/display)))
|
||||
|
||||
(add-to-list 'auto-mode-alist '("\\.svelte\\'" . svelte-mode))
|
||||
(add-to-list 'auto-mode-alist '("\\.vs\\'" . glsl-mode))
|
||||
(add-to-list 'auto-mode-alist '("\\.fs\\'" . glsl-mode))
|
||||
|
|
2
init.el
2
init.el
|
@ -72,7 +72,7 @@
|
|||
ein ; tame Jupyter notebooks with emacs
|
||||
(eval +overlay) ; run code, run (also, repls)
|
||||
(lookup +dictionary +offline +docsets) ; navigate your code and its documentation
|
||||
(lsp +eglot) ; M-x vscode
|
||||
(lsp +peak) ; M-x vscode
|
||||
magit ; a git porcelain for Emacs
|
||||
make ; run make tasks from Emacs
|
||||
pdf ; pdf enhancements
|
||||
|
|
|
@ -104,3 +104,4 @@
|
|||
:host github
|
||||
:repo "axelf4/hotfuzz"))
|
||||
|
||||
(package! nushell-mode :recipe (:host github :repo "mrkkrp/nushell-mode"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue