Compare commits
No commits in common. "8a6aed69f601e136d3e87c5404cda54a4ca1c533" and "4ff55e1aaf26187328fed43f18033ee249bbe4ce" have entirely different histories.
8a6aed69f6
...
4ff55e1aaf
2 changed files with 30 additions and 50 deletions
|
|
@ -250,24 +250,22 @@ cursor_blink_interval 0
|
||||||
|
|
||||||
#: Terminal bell {{{
|
#: Terminal bell {{{
|
||||||
|
|
||||||
enable_audio_bell no
|
# enable_audio_bell yes
|
||||||
|
|
||||||
#: Enable/disable the audio bell. Useful in environments that require
|
#: Enable/disable the audio bell. Useful in environments that require
|
||||||
#: silence.
|
#: silence.
|
||||||
|
|
||||||
visual_bell_duration 0.10
|
# visual_bell_duration 0.0
|
||||||
|
|
||||||
#: Visual bell duration. Flash the screen when a bell occurs for the
|
#: Visual bell duration. Flash the screen when a bell occurs for the
|
||||||
#: specified number of seconds. Set to zero to disable.
|
#: specified number of seconds. Set to zero to disable.
|
||||||
|
|
||||||
visual_bell_color #fff
|
|
||||||
|
|
||||||
# window_alert_on_bell yes
|
# window_alert_on_bell yes
|
||||||
|
|
||||||
#: Request window attention on bell. Makes the dock icon bounce on
|
#: Request window attention on bell. Makes the dock icon bounce on
|
||||||
#: macOS or the taskbar flash on linux.
|
#: macOS or the taskbar flash on linux.
|
||||||
|
|
||||||
bell_on_tab yes
|
# bell_on_tab yes
|
||||||
|
|
||||||
#: Show a bell symbol on the tab if a bell occurs in one of the
|
#: Show a bell symbol on the tab if a bell occurs in one of the
|
||||||
#: windows in the tab and the window is not the currently focused
|
#: windows in the tab and the window is not the currently focused
|
||||||
|
|
@ -1053,4 +1051,4 @@ macos_option_as_alt both
|
||||||
|
|
||||||
#: }}}
|
#: }}}
|
||||||
|
|
||||||
# }}}
|
# }}}
|
||||||
|
|
@ -362,7 +362,7 @@
|
||||||
(use-package company :ensure t
|
(use-package company :ensure t
|
||||||
:commands company-mode
|
:commands company-mode
|
||||||
:init
|
:init
|
||||||
;; 2023-08-26: Enable company mode globally.
|
;; 2023-08-26: Enable comapny mode globally.
|
||||||
(global-company-mode t)
|
(global-company-mode t)
|
||||||
:config
|
:config
|
||||||
;; 2023-08-26: Enable comapny mode globally.
|
;; 2023-08-26: Enable comapny mode globally.
|
||||||
|
|
@ -402,34 +402,16 @@
|
||||||
(eq major-mode 'c-mode))
|
(eq major-mode 'c-mode))
|
||||||
(eglot-signal-didChangeConfiguration server)))
|
(eglot-signal-didChangeConfiguration server)))
|
||||||
|
|
||||||
(defun ts/server-program (interactive)
|
|
||||||
"Choose which server program to run."
|
|
||||||
(cond ((ts/is-deno-project) '("deno" "lsp" :initializationOptions :enable t :lint t))
|
|
||||||
(t '("typescript-language-server" "--stdio"))))
|
|
||||||
|
|
||||||
|
|
||||||
(use-package eglot :ensure
|
(use-package eglot :ensure
|
||||||
:commands (eglot-ensure eglot)
|
:commands (eglot-ensure eglot)
|
||||||
:hook
|
:hook
|
||||||
(python-mode . eglot-ensure)
|
(python-mode . eglot-ensure)
|
||||||
(rust-mode . eglot-ensure)
|
(rust-mode . eglot-ensure)
|
||||||
(rust-ts-mode . eglot-ensure) ;; 2023-08-26 Add eglot for tree-sitter rust?
|
(rust-ts-mode . eglot-ensure) ;; 2023-08-26 Add eglot for tree-sitter rust?
|
||||||
(c++-mode . eglot-ensure)
|
(c++-mode . eglot-ensure)
|
||||||
(c-mode . eglot-ensure)
|
(c-mode . eglot-ensure)
|
||||||
(go-mode . eglot-ensure) ;; 2022-07-29 Add eglot for go
|
(go-mode . eglot-ensure) ;; 2022-07-29 Add eglot for go
|
||||||
(typescript-mode . eglot-ensure) ;; 2023-09-03 Eglot for typescript
|
(before-save . eglot-format) ;; 2023-05-25 Format buffers on save
|
||||||
(typescript-ts-mode . eglot-ensure) ;; 2023-09-03 Eglot for typescript
|
|
||||||
|
|
||||||
;; 2023-09-10 Respect language-specific formatters
|
|
||||||
;;
|
|
||||||
;; Something inside me *yearns* for the LSP to be the authoritative
|
|
||||||
;; formatter, and therefore to be able to just say "eglot, take care of it"
|
|
||||||
;; but it's just not the case right now. (The inciting incident is that
|
|
||||||
;; prettier and typescript-language-server diagree on how typescript is to
|
|
||||||
;; be formatted, and after much soul-searching I have decided to side with
|
|
||||||
;; prettier.)
|
|
||||||
;;
|
|
||||||
;; (before-save . eglot-format)
|
|
||||||
:bind
|
:bind
|
||||||
("C-c r" . eglot-rename) ;; 2022-08-23 Make rename more accessible
|
("C-c r" . eglot-rename) ;; 2022-08-23 Make rename more accessible
|
||||||
("C-c \\" . eglot-code-actions) ;; 2022-07-29 I want to make code actions easier.
|
("C-c \\" . eglot-code-actions) ;; 2022-07-29 I want to make code actions easier.
|
||||||
|
|
@ -449,9 +431,13 @@
|
||||||
;; (add-to-list 'eglot-server-programs
|
;; (add-to-list 'eglot-server-programs
|
||||||
;; `(python-mode . (,py-executable)))))
|
;; `(python-mode . (,py-executable)))))
|
||||||
|
|
||||||
;; 2023-09-03 Re-work the way that the JS/Deno switch is handled.
|
;; 2022-04-28 Configuration for Deno.
|
||||||
|
(defclass eglot-deno (eglot-lsp-server) ()
|
||||||
|
:documentation "A custom class for deno lsp.")
|
||||||
|
(cl-defmethod eglot-initialization-options ((server eglot-deno))
|
||||||
|
(list :enable t :lint t))
|
||||||
(add-to-list 'eglot-server-programs
|
(add-to-list 'eglot-server-programs
|
||||||
'((js-mode typescript-mode) . ts/server-program))
|
'((js-mode typescript-mode) . (eglot-deno "deno" "lsp")))
|
||||||
;; --
|
;; --
|
||||||
|
|
||||||
(add-hook 'eglot-managed-mode-hook 'my-disable-flycheck-on-eglot)
|
(add-hook 'eglot-managed-mode-hook 'my-disable-flycheck-on-eglot)
|
||||||
|
|
@ -964,23 +950,20 @@ Or, uh, Objective C, I guess."
|
||||||
"Return non-nil if this is a deno project, otherwise nil."
|
"Return non-nil if this is a deno project, otherwise nil."
|
||||||
(locate-dominating-file (buffer-file-name) ".deno"))
|
(locate-dominating-file (buffer-file-name) ".deno"))
|
||||||
|
|
||||||
;; 2023-09-03 Trying eglot instead of TIDE for now.
|
(defun ts/enable-eglot-or-tide ()
|
||||||
;; (defun ts/enable-eglot-or-tide ()
|
"Enable eglot if this is a deno project, otherwise enable tide."
|
||||||
;; "Enable eglot if this is a deno project, otherwise enable tide."
|
(if (ts/is-deno-project)
|
||||||
;; (if (ts/is-deno-project)
|
(eglot-ensure)
|
||||||
;; (eglot-ensure)
|
|
||||||
|
|
||||||
;; ;; Not a deno project; just enable tide and the normal
|
;; Not a deno project; just enable tide and the normal
|
||||||
;; (tide-setup)
|
(tide-setup)
|
||||||
;; (flycheck-mode +1)
|
(flycheck-mode +1)
|
||||||
;; (tide-hl-identifier-mode)
|
(tide-hl-identifier-mode)
|
||||||
;; (eldoc-mode +1)))
|
(eldoc-mode +1)))
|
||||||
|
|
||||||
(use-package typescript-mode :ensure t
|
(use-package typescript-mode :ensure t
|
||||||
;; 2023-09-03 Trying eglot instead of TIDE for now.
|
:config
|
||||||
;; :config
|
(add-hook 'typescript-mode-hook 'ts/enable-eglot-or-tide))
|
||||||
;; (add-hook 'typescript-mode-hook 'ts/enable-eglot-or-tide)
|
|
||||||
)
|
|
||||||
|
|
||||||
(use-package add-node-modules-path :ensure t
|
(use-package add-node-modules-path :ensure t
|
||||||
:hook typescript-mode)
|
:hook typescript-mode)
|
||||||
|
|
@ -988,8 +971,7 @@ Or, uh, Objective C, I guess."
|
||||||
(use-package prettier-js :ensure t
|
(use-package prettier-js :ensure t
|
||||||
:hook (typescript-mode . prettier-js-mode))
|
:hook (typescript-mode . prettier-js-mode))
|
||||||
|
|
||||||
;; 2023-09-03 Trying eglot instead of TIDE for now.
|
(use-package tide :ensure t)
|
||||||
;; (use-package tide :ensure t)
|
|
||||||
|
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
;; Archive mode for appx
|
;; Archive mode for appx
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue