From 91845f8e49e397e266f2676645bdeb98defdcf4d Mon Sep 17 00:00:00 2001 From: John Doty Date: Sat, 6 Apr 2024 08:18:12 -0700 Subject: [PATCH 01/11] Don't track htoprc --- .config/htop/htoprc | 39 --------------------------------------- .gitignore | 1 + 2 files changed, 1 insertion(+), 39 deletions(-) delete mode 100644 .config/htop/htoprc diff --git a/.config/htop/htoprc b/.config/htop/htoprc deleted file mode 100644 index 5284644..0000000 --- a/.config/htop/htoprc +++ /dev/null @@ -1,39 +0,0 @@ -# Beware! This file is rewritten by htop when settings are changed in the interface. -# The parser is also very primitive, and not human-friendly. -fields=0 48 17 18 38 39 2 46 47 49 1 0 -sort_key=47 -sort_direction=-1 -tree_sort_key=0 -tree_sort_direction=1 -hide_kernel_threads=1 -hide_userland_threads=0 -shadow_other_users=0 -show_thread_names=0 -show_program_path=0 -highlight_base_name=0 -highlight_megabytes=1 -highlight_threads=1 -highlight_changes=0 -highlight_changes_delay_secs=5 -find_comm_in_cmdline=1 -strip_exe_from_cmdline=1 -show_merged_command=0 -tree_view=0 -tree_view_always_by_pid=0 -header_margin=1 -detailed_cpu_time=0 -cpu_count_from_one=1 -show_cpu_usage=1 -show_cpu_frequency=0 -show_cpu_temperature=0 -degree_fahrenheit=0 -update_process_names=0 -account_guest_in_cpu_meter=0 -color_scheme=0 -enable_mouse=1 -delay=15 -left_meters=AllCPUs Memory Swap -left_meter_modes=1 1 1 -right_meters=Tasks LoadAverage Uptime -right_meter_modes=2 2 2 -hide_function_bar=0 diff --git a/.gitignore b/.gitignore index 9a89589..decc760 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,4 @@ _viminfo vscode/History vscode/globalStorage vscode/workspaceStorage +.config/htop/htoprc From b0093793a9f13e3af29a42895f67a9e92e37fbed Mon Sep 17 00:00:00 2001 From: John Doty Date: Sat, 6 Apr 2024 08:18:38 -0700 Subject: [PATCH 02/11] Some vs code stuff --- vscode/settings.json | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/vscode/settings.json b/vscode/settings.json index d5572a7..f28feaf 100644 --- a/vscode/settings.json +++ b/vscode/settings.json @@ -88,9 +88,14 @@ "/Users/doty/lacework/services/bazel/rust/clippyallrust.py" ], "remote.SSH.showLoginTerminal": true, - "remote.SSH.remotePlatform": {"coder.doty-dev":"linux","192.168.0.114":"linux","coder-vscode--johndoty--doty-dev":"linux"}, + "remote.SSH.remotePlatform": { + "coder.doty-dev": "linux", + "192.168.0.114": "linux", + "coder-vscode--johndoty--doty-dev": "linux", + "doty-dev.johndoty.devspaces.dev.lacework.engineering": "linux" + }, "java.import.maven.enabled": false, - "remote.autoForwardPortsSource": "process", + "remote.autoForwardPortsSource": "hybrid", "go.toolsManagement.autoUpdate": true, "bazel.queriesShareServer": true, "remote.portsAttributes": { @@ -104,5 +109,7 @@ "[python]": { "editor.formatOnType": true }, - "git.confirmSync": false + "git.confirmSync": false, + "cmake.showOptionsMovedNotification": false, + "jupyter.askForKernelRestart": false } \ No newline at end of file From e1c3728e22edc271f85e747cc41be1229902199f Mon Sep 17 00:00:00 2001 From: John Doty Date: Sat, 6 Apr 2024 08:18:47 -0700 Subject: [PATCH 03/11] lfs for git --- .gitconfig | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitconfig b/.gitconfig index b1e23ea..288ea7c 100644 --- a/.gitconfig +++ b/.gitconfig @@ -16,3 +16,8 @@ user = DeCarabas [safe] directory = /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-core +[filter "lfs"] + clean = git-lfs clean -- %f + smudge = git-lfs smudge -- %f + process = git-lfs filter-process + required = true From d977e49f6ae255760ecbb13e7e6af8732a41eced Mon Sep 17 00:00:00 2001 From: John Doty Date: Sat, 6 Apr 2024 08:19:04 -0700 Subject: [PATCH 04/11] [emacs] More key bindings --- .emacs.d/init.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 3536bf7..96859c3 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -1027,8 +1027,9 @@ Or, uh, Objective C, I guess." ;; Magit stuff ;; ================================================================= (use-package magit :ensure t - :bind ("C-x g" . magit-status)) - + :bind (("C-x g" . magit-status) + ("C-c g" . magit-dispatch) + ("C-c f" . magit-file-dispatch))) ;; ================================================================= ;; Mercurial stuff From 2af4ee6f789bae08ee8055d91d1a2027caacd9e2 Mon Sep 17 00:00:00 2001 From: John Doty Date: Sat, 6 Apr 2024 08:19:14 -0700 Subject: [PATCH 05/11] [emacs] Ensure exec-path-from-shell on macos --- .emacs.d/init.el | 1 + 1 file changed, 1 insertion(+) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 96859c3..b09ae52 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -283,6 +283,7 @@ ;; Fix path loading on MacOS X (when (memq window-system '(mac ns)) + (use-package exec-path-from-shell :ensure t) (exec-path-from-shell-initialize)) ;;; Stefan Monnier . It is the opposite of fill-paragraph From 7d786962641c6111ba6b54f999f4175bb3b7b413 Mon Sep 17 00:00:00 2001 From: John Doty Date: Sat, 6 Apr 2024 08:28:48 -0700 Subject: [PATCH 06/11] [emacs] Swift? --- .emacs.d/init.el | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index b09ae52..b249c7e 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -411,6 +411,12 @@ (cond ((ts/is-deno-project) '("deno" "lsp" :initializationOptions :enable t :lint t)) (t '("typescript-language-server" "--stdio")))) +(defun my-find-swift-lsp () + "Try to find the swift LSP." + ;; On windows with scoop this lives in a weird place. + (or (executable-find "sourcekit-lsp") ;; Support newer clangd + (executable-find "C:/Users/john/scoop/apps/swift/current/Developer/Toolchains/unknown-Asserts-development.xctoolchain/usr/bin/sourcekit-lsp") + "sourcekit-lsp")) (use-package eglot :ensure t :commands (eglot-ensure eglot) @@ -424,6 +430,7 @@ (go-mode . eglot-ensure) ;; 2022-07-29 Add eglot for go (typescript-mode . eglot-ensure) ;; 2023-09-03 Eglot for typescript (typescript-ts-mode . eglot-ensure) ;; 2023-09-03 Eglot for typescript + (swift-mode . eglot-ensure) ;; 2023-11-11 Eglot for swift? ;; 2023-09-10 Respect language-specific formatters ;; @@ -464,9 +471,12 @@ (:check (:command "clippy"))))) ;; -- - (add-hook 'eglot-managed-mode-hook 'my-disable-flycheck-on-eglot) - (remove-hook 'eglot-connect-hook 'eglot-signal-didChangeConfiguration) - (add-hook 'eglot-connect-hook 'my-eglot-connect-hook)) + (add-to-list 'eglot-server-programs + `(swift-mode . ( ,(my-find-swift-lsp) "--sync" "--log-level" "debug"))) + + (add-hook 'eglot-managed-mode-hook 'my-disable-flycheck-on-eglot) + (remove-hook 'eglot-connect-hook 'eglot-signal-didChangeConfiguration) + (add-hook 'eglot-connect-hook 'my-eglot-connect-hook)) ;; NOTE: elgot defers to flymake for error information. (use-package flymake @@ -1298,5 +1308,10 @@ Or, uh, Objective C, I guess." ;; ================================================================= (use-package sql-indent :ensure t) +;; ================================================================= +;; Swift +;; ================================================================= +(use-package swift-mode :ensure t + :mode "\\.swift\\(interface\\)?\\'") ;;; init.el ends here From dcb4fbfc6090d7bb14519d15caccafcf861b11e2 Mon Sep 17 00:00:00 2001 From: John Doty Date: Sat, 6 Apr 2024 08:29:05 -0700 Subject: [PATCH 07/11] [emacs] Fix a typescript bug? --- .emacs.d/init.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index b249c7e..f2550d9 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -984,7 +984,7 @@ Or, uh, Objective C, I guess." ) (use-package add-node-modules-path :ensure t - :hook typescript-mode) + :hook (typescript-mode . add-node-modules-path)) (use-package prettier-js :ensure t :hook (typescript-mode . prettier-js-mode)) From 7910879ff74107630e23173626f129b628b4b0c5 Mon Sep 17 00:00:00 2001 From: John Doty Date: Sat, 6 Apr 2024 08:29:32 -0700 Subject: [PATCH 08/11] [emacs] Swift. --- .emacs.d/custom.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.emacs.d/custom.el b/.emacs.d/custom.el index 498ce87..9ddf610 100644 --- a/.emacs.d/custom.el +++ b/.emacs.d/custom.el @@ -58,7 +58,7 @@ '(org-odd-levels-only t) '(org-todo-keywords '((sequence "TODO" "|" "DONE" "ABANDONED" "DEFERRED"))) '(package-selected-packages - '(flycheck-elm sql-indent eglot-java vterm lsp-pyright blacken nyan-mode earthfile-mode compat adaptive-wrap terraform-mode deadgrep protobuf-mode bazel howm python-mode color-theme-sanityinc-solarized monokai-theme rust-mode tide typescript-mode modus-themes tree-sitter flycheck-rust eglot ink-mode prettier-js zig-mode esup gnu-elpa-keyring-update lsp-hack hack-mode filladapt lsp-ui yaml-mode wgrep fsharp-mode company-lsp cquery mustache-mode clang-format projectile dash-functional mocha add-node-modules-path rjsx-mode xref-js2 js2-refactor company geiser cider clojure-mode graphviz-dot-mode multi-term xterm-color thrift markdown-mode tuareg merlin ag use-package flycheck dockerfile-mode js2-mode web-mode tss switch-window paredit magit lua-mode go-mode go-autocomplete exec-path-from-shell color-theme-monokai auto-complete auto-complete-nxml flymake flyspell json-mode popup ruby-mode company-jedi elm-mode monky color-theme-sanityinc-tomorrow)) + '(swift-mode flycheck-elm sql-indent eglot-java vterm lsp-pyright blacken nyan-mode earthfile-mode compat adaptive-wrap terraform-mode deadgrep protobuf-mode bazel howm python-mode color-theme-sanityinc-solarized monokai-theme rust-mode tide typescript-mode modus-themes tree-sitter flycheck-rust eglot ink-mode prettier-js zig-mode esup gnu-elpa-keyring-update lsp-hack hack-mode filladapt lsp-ui yaml-mode wgrep fsharp-mode company-lsp cquery mustache-mode clang-format projectile dash-functional mocha add-node-modules-path rjsx-mode xref-js2 js2-refactor company geiser cider clojure-mode graphviz-dot-mode multi-term xterm-color thrift markdown-mode tuareg merlin ag use-package flycheck dockerfile-mode js2-mode web-mode tss switch-window paredit magit lua-mode go-mode go-autocomplete exec-path-from-shell color-theme-monokai auto-complete auto-complete-nxml flymake flyspell json-mode popup ruby-mode company-jedi elm-mode monky color-theme-sanityinc-tomorrow)) '(reb-re-syntax 'string) '(rmail-mail-new-frame t) '(safe-local-variable-values From a665de04b6710e020cf5b1645c7f203de99208a7 Mon Sep 17 00:00:00 2001 From: John Doty Date: Sat, 6 Apr 2024 08:29:49 -0700 Subject: [PATCH 09/11] [git] default branch, lfs, and fuck autocrlf --- .gitconfig | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitconfig b/.gitconfig index 288ea7c..309faf5 100644 --- a/.gitconfig +++ b/.gitconfig @@ -17,7 +17,11 @@ [safe] directory = /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-core [filter "lfs"] - clean = git-lfs clean -- %f - smudge = git-lfs smudge -- %f - process = git-lfs filter-process - required = true + clean = git-lfs clean -- %f + smudge = git-lfs smudge -- %f + process = git-lfs filter-process + required = true +[init] + defaultBranch = main +[core] + autocrlf = false From 2967db2f01edbd9b4673d323008cd6f8ef0c82d0 Mon Sep 17 00:00:00 2001 From: John Doty Date: Sat, 6 Apr 2024 08:38:57 -0700 Subject: [PATCH 10/11] [git] always rebase --- .gitconfig.shared | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitconfig.shared b/.gitconfig.shared index cc33735..6551504 100644 --- a/.gitconfig.shared +++ b/.gitconfig.shared @@ -7,6 +7,8 @@ [alias] st = status ci = commit +[pull] + rebase = true [push] default = upstream [init] From 1bc367985b3f98c587823e81dab625948464b4ba Mon Sep 17 00:00:00 2001 From: John Doty Date: Sat, 6 Apr 2024 08:39:20 -0700 Subject: [PATCH 11/11] [git] move lfs to shared, fix shared settings --- .gitconfig | 9 --------- .gitconfig.shared | 5 +++++ 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.gitconfig b/.gitconfig index 309faf5..b1e23ea 100644 --- a/.gitconfig +++ b/.gitconfig @@ -16,12 +16,3 @@ user = DeCarabas [safe] directory = /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-core -[filter "lfs"] - clean = git-lfs clean -- %f - smudge = git-lfs smudge -- %f - process = git-lfs filter-process - required = true -[init] - defaultBranch = main -[core] - autocrlf = false diff --git a/.gitconfig.shared b/.gitconfig.shared index 6551504..624bcd8 100644 --- a/.gitconfig.shared +++ b/.gitconfig.shared @@ -19,3 +19,8 @@ selected = manager [credential "https://git.d0ty.me"] provider = generic +[filter "lfs"] + clean = git-lfs clean -- %f + smudge = git-lfs smudge -- %f + process = git-lfs filter-process + required = true