diff --git a/.emacs.d/custom.el b/.emacs.d/custom.el index d23c871..0c178eb 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 - '(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 omnisharp 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 csharp-mode color-theme-monokai auto-complete auto-complete-nxml flymake flyspell json-mode popup ruby-mode company-jedi elm-mode monky color-theme-sanityinc-tomorrow)) + '(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 omnisharp 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 csharp-mode 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 diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 686a025..d1210a7 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -363,6 +363,9 @@ (rust-mode . eglot-ensure) (c++-mode . eglot-ensure) (c-mode . eglot-ensure) + (go-mode . eglot-ensure) ;; 2022-07-29 Add eglot for go + :bind + ("C-c \\" . eglot-code-actions) ;; 2022-07-29 I want to make code actions easier. :config (let ((cpp-executable (or my-cppls-fbcode-executable my-clangd-executable))) @@ -819,6 +822,24 @@ Or, uh, Objective C, I guess." ;; ================================================================= ;; Go (#golang) Mode ;; ================================================================= +(require 'project) + +;;----- +;; 2022-07-28 Forgot why I added this configuration; disabling it because it +;; makes it very slow, and .git is accurate anyways. +;; +;; (defun project-find-go-module (dir) +;; "A function for finding the dominating go.mod file in DIR for a go project." +;; (when-let ((root (locate-dominating-file dir "go.mod"))) +;; (cons 'go-module root))) + +;; (cl-defmethod project-root ((project (head go-module))) +;; "Shrug PROJECT." +;; (cdr project)) + +;; (add-hook 'project-find-functions #'project-find-go-module) +;;----- + (use-package go-mode :ensure t :mode "\\.go\\'" :config @@ -1146,5 +1167,9 @@ Or, uh, Objective C, I guess." (add-hook 'after-save-hook 'howm-mode-set-buffer-name) ) +;; ================================================================= +;; Protocol Buffers +;; ================================================================= +(use-package protobuf-mode :ensure) ;;; init.el ends here diff --git a/.profile b/.profile index 9a2dc0d..4944e65 100644 --- a/.profile +++ b/.profile @@ -21,6 +21,10 @@ if [ -d "$HOME/bin" ] ; then PATH="$HOME/bin:$PATH" fi +if [ -d "$HOME/go/bin" ] ; then + PATH="$HOME/go/bin:$PATH" +fi + # if we have a local cargo then grab it if [ -f "$HOME/.cargo/env" ] ; then . "$HOME/.cargo/env" diff --git a/bin/buildifier b/bin/buildifier new file mode 100755 index 0000000..46937c7 Binary files /dev/null and b/bin/buildifier differ diff --git a/bin/gopackagesdriver.sh b/bin/gopackagesdriver.sh new file mode 100755 index 0000000..e7b058a --- /dev/null +++ b/bin/gopackagesdriver.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +GOPACKAGESDRIVER_BAZEL_BUILD_FLAGS=--strategy=GoStdlibList=local +exec bazel run -- @io_bazel_rules_go//go/tools/gopackagesdriver "${@}" diff --git a/install.sh b/install.sh index 10dd03c..1dca0f2 100755 --- a/install.sh +++ b/install.sh @@ -10,6 +10,9 @@ cd $MY_PATH # Run the basic setup. python3 "./setup.py" +# Un-minimize this installation +yes | sudo unminimize + # # OK this stuff here is better in bash, and also is specific to setting up # # coder.com instances, so. Add packages that I want in my coder image. sudo apt update diff --git a/vscode/settings.json b/vscode/settings.json index 57e5ab0..22b03b6 100644 --- a/vscode/settings.json +++ b/vscode/settings.json @@ -1,6 +1,8 @@ { "breadcrumbs.enabled": true, - "editor.rulers": [80], + "editor.rulers": [ + 80 + ], "editor.formatOnSave": true, "editor.formatOnPaste": true, "editor.minimap.enabled": false, @@ -38,7 +40,7 @@ "interactive-smartlog.pull": "arc pull", "interactive-smartlog.fetch": "jf get", "[json]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" + "editor.defaultFormatter": "vscode.json-language-features" }, "[javascript]": { "editor.defaultFormatter": "esbenp.prettier-vscode" @@ -74,5 +76,15 @@ "folders": [] } ], - "hg.jumpToNextConflictOnSave": "Jump On Save And Open ISL When Done" -} + "hg.jumpToNextConflictOnSave": "Jump On Save And Open ISL When Done", + "rust-analyzer.checkOnSave.overrideCommand": [ + "python3", + "/Users/doty/lacework/services/bazel/rust/clippyallrust.py", + ], + "bazel.buildifierFixOnFormat": true, + "bazel.enableCodeLens": true, + "rust-analyzer.cargo.buildScripts.overrideCommand": [ + "python3", + "/Users/doty/lacework/services/bazel/rust/clippyallrust.py", + ], +} \ No newline at end of file