diff options
| author | Nicholas Rodrigues Lordello <[email protected]> | 2023-10-31 15:59:17 +0100 |
|---|---|---|
| committer | Nicholas Rodrigues Lordello <[email protected]> | 2023-12-12 23:30:28 +0100 |
| commit | 7ee13d421e052a7ea7a2c26ac3548e7269fb97f0 (patch) | |
| tree | fde354fb812a879c8bfe4ebab83c27606f3ed3a4 | |
| parent | 695308c876fefc9b4de441e32f3ed21deaedfa29 (diff) | |
Fixes for new setup
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | config/emacs/early-init.el | 6 | ||||
| -rw-r--r-- | config/emacs/init.el | 4 | ||||
| -rw-r--r-- | config/emacs/sanemacs.el | 2 | ||||
| -rw-r--r-- | config/nvim/ftplugin/rust.lua | 2 | ||||
| -rw-r--r-- | config/nvim/init.lua | 12 | ||||
| -rw-r--r-- | config/nvim/lua/config/keys.lua | 4 | ||||
| -rw-r--r-- | config/nvim/lua/config/lsp.lua | 4 |
8 files changed, 18 insertions, 17 deletions
@@ -1,3 +1,2 @@ config/emacs/bookmarks -config/emacs/eln-cache/ config/nvim/plugin/packer_compiled.lua diff --git a/config/emacs/early-init.el b/config/emacs/early-init.el index fd05197..c624f5b 100644 --- a/config/emacs/early-init.el +++ b/config/emacs/early-init.el @@ -9,3 +9,9 @@ ;;; Configure native-comp cache direactory (when (boundp 'native-comp-eln-load-path) (startup-redirect-eln-cache "~/.cache/emacs/eln-cache")) + +;;; Suppress native-comp warnings on startup +(setq warning-suppress-log-types '((comp) (bytecomp))) + +;;; HACK: Work around native compilation errors on macOS... +(setenv "LIBRARY_PATH" "/opt/local/lib/gcc12/gcc/arm64-apple-darwin23/12.3.0") diff --git a/config/emacs/init.el b/config/emacs/init.el index c8ba54b..22cffc1 100644 --- a/config/emacs/init.el +++ b/config/emacs/init.el @@ -1,5 +1,5 @@ (load "~/.config/emacs/sanemacs.el" nil t) -(load "~/.config/emacs/gtd.el" nil t) +;;(load "~/.config/emacs/gtd.el" nil t) (load "~/.config/emacs/macos.el" nil t) (use-package which-key @@ -10,7 +10,7 @@ ;;; TODO(nlordell): ;;; 1. Try out `meow` modal editing mode ;;; 2. Use built-in tree-sitter support (v29) -;;; 3. Simplify GTD.el to match what I do in ~/WEEK.md +;;; 3. Simplify GTD.el to match what I do in Journal.md ;;; 4. Emacs over devcontainers/docker with TRAMP ;;; <https://happihacking.com/blog/posts/2023/dev-containers-emacs/> ;;; 5. Investigate other potential sane Emacs defaults diff --git a/config/emacs/sanemacs.el b/config/emacs/sanemacs.el index a896c8b..ad478d5 100644 --- a/config/emacs/sanemacs.el +++ b/config/emacs/sanemacs.el @@ -8,9 +8,7 @@ (if (fboundp 'scroll-bar-mode) (scroll-bar-mode -1)) (column-number-mode) (fset 'yes-or-no-p 'y-or-n-p) -(put 'inhibit-startup-echo-area-message 'saved-value t) ;; hacky workaround (setq - inhibit-startup-echo-area-message (user-login-name) inhibit-startup-screen t initial-major-mode 'fundamental-mode initial-scratch-message "" diff --git a/config/nvim/ftplugin/rust.lua b/config/nvim/ftplugin/rust.lua index 81fe66b..7fb8970 100644 --- a/config/nvim/ftplugin/rust.lua +++ b/config/nvim/ftplugin/rust.lua @@ -7,7 +7,7 @@ keys.register({ b = {"<cmd>!cargo build<cr>", "Build"}, c = {"<cmd>!cargo clippy<cr>", "Check"}, C = {"<cmd>!cargo clippy --workspace --all-features --all-targets<cr>", "Check Workspace"}, - F = {"<cmd>!cargo +nightly fmt --version >/dev/null && cargo +nightly fmt --all || cargo fmt --all<cr>", "Format Workspace"}, + F = {"<cmd>!cargo fmt --all<cr>", "Format Workspace"}, r = {"<cmd>!cargo run<cr>", "Run"}, t = {"<cmd>!cargo test<cr>", "Test"}, T = {"<cmd>!cargo test --workspace --all-features<cr>", "Test Workspace"}, diff --git a/config/nvim/init.lua b/config/nvim/init.lua index c133c05..ef9b595 100644 --- a/config/nvim/init.lua +++ b/config/nvim/init.lua @@ -20,13 +20,6 @@ packer.startup(function (use) require("config.keys").setup() end, } - -- TODO: conflicts with leader key - --[=[ - use { - "ggandor/lightspeed.nvim", - requires = "tpope/vim-repeat", - } - --]=] use { "neovim/nvim-lspconfig", config = function () @@ -55,10 +48,12 @@ packer.startup(function (use) "c", "comment", "fennel", + "hare", "javascript", "lua", "ocaml", "rust", + "solidity", "typescript", }, highlight = {enable = true}, @@ -66,7 +61,6 @@ packer.startup(function (use) } end, } - use "rebelot/kanagawa.nvim" use "tpope/vim-commentary" use { "tpope/vim-surround", @@ -106,8 +100,6 @@ set.opts { } vim.cmd [[ - colorscheme kanagawa - " TODO: make this prettier. call matchadd('ColorColumn', '\%81v.') ]] diff --git a/config/nvim/lua/config/keys.lua b/config/nvim/lua/config/keys.lua index 783f27a..ecf5890 100644 --- a/config/nvim/lua/config/keys.lua +++ b/config/nvim/lua/config/keys.lua @@ -6,6 +6,10 @@ local function setup() }) keys.register({ + a = { + name = "lsp", + x = {"<cmd>LspStart<cr>", "Start LSP server"}, + }, f = { name = "find", b = {"<cmd>Telescope buffers<cr>", "Buffer"}, diff --git a/config/nvim/lua/config/lsp.lua b/config/nvim/lua/config/lsp.lua index f716790..6498a83 100644 --- a/config/nvim/lua/config/lsp.lua +++ b/config/nvim/lua/config/lsp.lua @@ -31,7 +31,8 @@ local function on_attach(client, buffer) end local function setup() - lspconfig.rust_analyzer.setup{ + lspconfig.rust_analyzer.setup { + autostart = false, on_attach = on_attach, settings = { ["rust-analyzer.checkOnSave.command"] = "clippy", @@ -39,6 +40,7 @@ local function setup() } lspconfig.denols.setup { + autostart = false, on_attach = on_attach, init_options = { lint = true, |
