Compare commits

...

3 commits

Author SHA1 Message Date
3078e8d39d [vscode] nonsense 2025-04-19 08:57:25 -07:00
a43f1b15be [emacs] PLEASE STOP FIGHTING I BEG YOU 2025-04-19 08:57:25 -07:00
79f7b59a56 [emacs] Various C# amendments 2025-04-19 08:57:25 -07:00
3 changed files with 28 additions and 29 deletions

View file

@ -12,8 +12,7 @@
'(c-label-minimum-indentation 0) '(c-label-minimum-indentation 0)
'(c-label-offset -4) '(c-label-offset -4)
'(clojure-build-tool-files '(clojure-build-tool-files
'("project.clj" "build.boot" "build.gradle" "build.gradle.kts" "deps.edn" '("project.clj" "build.boot" "build.gradle" "build.gradle.kts" "deps.edn" "shadow-cljs.edn" "TARGETS"))
"shadow-cljs.edn" "TARGETS"))
'(comint-input-ignoredups t) '(comint-input-ignoredups t)
'(comint-prompt-read-only t) '(comint-prompt-read-only t)
'(comint-scroll-to-bottom-on-input t) '(comint-scroll-to-bottom-on-input t)
@ -59,38 +58,23 @@
'(org-odd-levels-only t) '(org-odd-levels-only t)
'(org-todo-keywords '((sequence "TODO" "|" "DONE" "ABANDONED" "DEFERRED"))) '(org-todo-keywords '((sequence "TODO" "|" "DONE" "ABANDONED" "DEFERRED")))
'(package-selected-packages '(package-selected-packages
'(adaptive-wrap add-node-modules-path ag auto-complete auto-complete-nxml '(gptel fish-mode editorconfig jsonnet-mode scala-ts-mode adaptive-wrap add-node-modules-path ag auto-complete auto-complete-nxml bazel blacken cider clang-format clojure-mode color-theme-monokai color-theme-sanityinc-solarized color-theme-sanityinc-tomorrow company company-jedi company-lsp compat cquery dash-functional deadgrep dockerfile-mode doom-themes earthfile-mode eglot eglot-java elm-mode esup exec-path-from-shell filladapt flycheck flycheck-elm flycheck-rust flymake flyspell fsharp-mode geiser gnu-elpa-keyring-update go-autocomplete go-mode graphviz-dot-mode hack-mode haxe-mode howm ink-mode js2-mode js2-refactor json-mode lsp-hack lsp-pyright lsp-ui lua-mode magit markdown-mode merlin mocha modus-themes monky monokai-theme multi-term mustache-mode nyan-mode paredit popup prettier-js projectile protobuf-mode python-mode rjsx-mode ruby-mode rust-mode sql-indent swift-mode switch-window terraform-mode thrift tide tree-sitter tss tuareg typescript-mode use-package vterm web-mode wgrep xref-js2 xterm-color yaml-mode zig-mode))
bazel blacken cider clang-format clojure-mode
color-theme-monokai color-theme-sanityinc-solarized
color-theme-sanityinc-tomorrow company company-jedi
company-lsp compat cquery dash-functional deadgrep
dockerfile-mode doom-themes earthfile-mode eglot
eglot-java elm-mode esup exec-path-from-shell filladapt
flycheck flycheck-elm flycheck-rust flymake flyspell
fsharp-mode geiser gnu-elpa-keyring-update go-autocomplete
go-mode graphviz-dot-mode hack-mode haxe-mode howm
ink-mode js2-mode js2-refactor json-mode lsp-hack
lsp-pyright lsp-ui lua-mode magit markdown-mode merlin
mocha modus-themes monky monokai-theme multi-term
mustache-mode nyan-mode paredit popup prettier-js
projectile protobuf-mode python-mode rjsx-mode ruby-mode
rust-mode sql-indent swift-mode switch-window
terraform-mode thrift tide tree-sitter tss tuareg
typescript-mode use-package vterm web-mode wgrep xref-js2
xterm-color yaml-mode zig-mode))
'(reb-re-syntax 'string) '(reb-re-syntax 'string)
'(rmail-mail-new-frame t) '(rmail-mail-new-frame t)
'(safe-local-variable-values '(safe-local-variable-values
'((docker-image-name . "onceandfuture") '((docker-image-name . "onceandfuture")
(eval ignore-errors (eval ignore-errors "Write-contents-functions is a buffer-local alternative to before-save-hook"
"Write-contents-functions is a buffer-local alternative to before-save-hook"
(add-hook 'write-contents-functions (add-hook 'write-contents-functions
(lambda nil (delete-trailing-whitespace) nil)) (lambda nil
(delete-trailing-whitespace)
nil))
(require 'whitespace) (require 'whitespace)
"Sometimes the mode needs to be toggled off and on." "Sometimes the mode needs to be toggled off and on."
(whitespace-mode 0) (whitespace-mode 1)) (whitespace-mode 0)
(whitespace-mode 1))
(whitespace-line-column . 80) (whitespace-line-column . 80)
(whitespace-style face trailing lines-tail) (require-final-newline . t))) (whitespace-style face trailing lines-tail)
(require-final-newline . t)))
'(scroll-conservatively 1) '(scroll-conservatively 1)
'(scroll-step 1) '(scroll-step 1)
'(sd-user-email "johndoty@microsoft.com") '(sd-user-email "johndoty@microsoft.com")

View file

@ -333,11 +333,13 @@
;; 2023-08-26 Wow, like what am I even doing? This goes at the top of the ;; 2023-08-26 Wow, like what am I even doing? This goes at the top of the
;; various things because we're going to be playing with modes and whatnot. ;; various things because we're going to be playing with modes and whatnot.
(when (functionp 'tree-sitter-mode) (when (and (functionp 'treesit-available-p) (treesit-available-p))
(require 'treesit)
(setq treesit-language-source-alist (setq treesit-language-source-alist
'( '(
(bash "https://github.com/tree-sitter/tree-sitter-bash") (bash "https://github.com/tree-sitter/tree-sitter-bash")
(cmake "https://github.com/uyha/tree-sitter-cmake") (cmake "https://github.com/uyha/tree-sitter-cmake")
(csharp "https://github.com/tree-sitter/tree-sitter-c-sharp")
(css "https://github.com/tree-sitter/tree-sitter-css") (css "https://github.com/tree-sitter/tree-sitter-css")
(elisp "https://github.com/Wilfred/tree-sitter-elisp") (elisp "https://github.com/Wilfred/tree-sitter-elisp")
(go "https://github.com/tree-sitter/tree-sitter-go") (go "https://github.com/tree-sitter/tree-sitter-go")
@ -358,6 +360,7 @@
(add-to-list 'major-mode-remap-alist '(rust-mode . rust-ts-mode)) (add-to-list 'major-mode-remap-alist '(rust-mode . rust-ts-mode))
(add-to-list 'major-mode-remap-alist '(scala-mode . scala-ts-mode)) (add-to-list 'major-mode-remap-alist '(scala-mode . scala-ts-mode))
(add-to-list 'major-mode-remap-alist '(csharp-mode . csharp-ts-mode))
) )
(defun install-known-tree-sitter-grammars () (defun install-known-tree-sitter-grammars ()
@ -447,6 +450,12 @@
(executable-find "C:/Users/john/scoop/apps/swift/current/Developer/Toolchains/unknown-Asserts-development.xctoolchain/usr/bin/sourcekit-lsp") (executable-find "C:/Users/john/scoop/apps/swift/current/Developer/Toolchains/unknown-Asserts-development.xctoolchain/usr/bin/sourcekit-lsp")
"sourcekit-lsp")) "sourcekit-lsp"))
(defun my-eglot-format-before-save ()
"Format with eglot when I'm in a buffer that supports it."
(when (or (eq major-mode 'csharp-mode)
(eq major-mode 'csharp-ts-mode))
(eglot-format)))
(use-package eglot :ensure t (use-package eglot :ensure t
:commands (eglot-ensure eglot) :commands (eglot-ensure eglot)
:hook :hook
@ -462,6 +471,8 @@
(swift-mode . eglot-ensure) ;; 2023-11-11 Eglot for swift? (swift-mode . eglot-ensure) ;; 2023-11-11 Eglot for swift?
(scala-mode . eglot-ensure) ;; 2024-09-24 Eglot for scala (scala-mode . eglot-ensure) ;; 2024-09-24 Eglot for scala
(scala-ts-mode . eglot-ensure) ;; 2024-09-24 Eglot for scala (scala-ts-mode . eglot-ensure) ;; 2024-09-24 Eglot for scala
(csharp-mode . eglot-ensure) ;; 2025-04-19 Eglot for csharp
(csharp-ts-mode . eglot-ensure) ;; 2025-04-19 Eglot for csharp
;; 2023-09-10 Respect language-specific formatters ;; 2023-09-10 Respect language-specific formatters
;; ;;
@ -472,7 +483,8 @@
;; be formatted, and after much soul-searching I have decided to side with ;; be formatted, and after much soul-searching I have decided to side with
;; prettier.) ;; prettier.)
;; ;;
;; (before-save . eglot-format) ;; 2025-04-19 Use a custom function that is conditional on mode.
(before-save . my-eglot-format-before-save)
: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.
@ -694,6 +706,7 @@ Or, uh, Objective C, I guess."
:config :config
;; 2023-09-03 Stop using omnisharp ;; 2023-09-03 Stop using omnisharp
;; 2025-04-19 Still not using omnisharp, use it through eglot maybe
;; (use-package omnisharp :ensure t ;; (use-package omnisharp :ensure t
;; :commands omnisharp-mode ;; :commands omnisharp-mode
;; :bind (:map omnisharp-mode-map ;; :bind (:map omnisharp-mode-map

View file

@ -111,5 +111,7 @@
}, },
"git.confirmSync": false, "git.confirmSync": false,
"cmake.showOptionsMovedNotification": false, "cmake.showOptionsMovedNotification": false,
"jupyter.askForKernelRestart": false "jupyter.askForKernelRestart": false,
"dotnet.automaticallyCreateSolutionInWorkspace": false,
"dotnet.useLegacyDotnetResolution": false
} }