diff options
| author | Mike Vink <ivi@vinkies.net> | 2023-12-27 11:38:23 +0100 |
|---|---|---|
| committer | Mike Vink <ivi@vinkies.net> | 2023-12-27 11:38:23 +0100 |
| commit | e11e6e48a83f65035e1cd2a30254f2ccc24e9aa0 (patch) | |
| tree | e201239f20be7939a8000ad34f634b90fcdad948 | |
| parent | 3bc7d9d09462d73c81e7f98290a63e82a74a1a05 (diff) | |
add zoxide
| -rw-r--r-- | mut/neovim/fnl/conf/events.fnl | 13 | ||||
| -rw-r--r-- | mut/neovim/fnl/conf/pkgs/lspconfig.fnl | 3 | ||||
| -rw-r--r-- | mut/neovim/fnl/conf/settings.fnl | 2 | ||||
| -rw-r--r-- | profiles/core/configuration.nix | 1 | ||||
| -rw-r--r-- | profiles/core/home.nix | 1 | ||||
| -rw-r--r-- | profiles/core/neovim.nix | 1 |
6 files changed, 20 insertions, 1 deletions
diff --git a/mut/neovim/fnl/conf/events.fnl b/mut/neovim/fnl/conf/events.fnl index a2e51be..f48f1b9 100644 --- a/mut/neovim/fnl/conf/events.fnl +++ b/mut/neovim/fnl/conf/events.fnl @@ -12,6 +12,19 @@ :pattern ["*"] :callback attach}) +(local oil (require :oil)) +(event + :User + {:group "conf#events" + :pattern ["ZoxideDirChanged"] + :callback #(vim.schedule #(oil.open (vim.fn.getcwd)))}) + +(event + :BufWritePost + {:group "conf#events" + :pattern ["*.rs"] + :callback #(vim.cmd (.. "Compile! rustfmt " (vim.fn.expand "%")))}) + (event :BufReadPost {:pattern ["*"] diff --git a/mut/neovim/fnl/conf/pkgs/lspconfig.fnl b/mut/neovim/fnl/conf/pkgs/lspconfig.fnl index e324f5c..0a463ad 100644 --- a/mut/neovim/fnl/conf/pkgs/lspconfig.fnl +++ b/mut/neovim/fnl/conf/pkgs/lspconfig.fnl @@ -2,7 +2,8 @@ (local configs (require :lspconfig.configs)) (lspconfig.rust_analyzer.setup - {:settings + {:autostart false + :settings {:rust-analyzer {:cargo {:buildScripts {:enable true}} :procMacro {:enable true :attributes {:enable true}} diff --git a/mut/neovim/fnl/conf/settings.fnl b/mut/neovim/fnl/conf/settings.fnl index e670010..54a9959 100644 --- a/mut/neovim/fnl/conf/settings.fnl +++ b/mut/neovim/fnl/conf/settings.fnl @@ -18,6 +18,8 @@ loaded_tutor false loaded_zipPlugin false + zoxide_use_select true + zoxide_hook "pwd" mapleader " " maplocalleader " " dirvish_mode ":sort | sort ,^.*[^/]$, r") diff --git a/profiles/core/configuration.nix b/profiles/core/configuration.nix index e447d76..4694974 100644 --- a/profiles/core/configuration.nix +++ b/profiles/core/configuration.nix @@ -52,6 +52,7 @@ iputils inetutils usbutils + zoxide ]; nix.package = pkgs.nixUnstable; diff --git a/profiles/core/home.nix b/profiles/core/home.nix index 1bcb392..726a041 100644 --- a/profiles/core/home.nix +++ b/profiles/core/home.nix @@ -124,6 +124,7 @@ [[ -f ~/.nix-profile/etc/profile.d/nix.sh ]] && . ~/.nix-profile/etc/profile.d/nix.sh # source some workspace specific stuff [[ -f ~/env.sh ]] && . ~/env.sh + eval "$(zoxide init bash)" export COLORTERM=truecolor export GPG_TTY="$(tty)" export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) diff --git a/profiles/core/neovim.nix b/profiles/core/neovim.nix index f5b50fb..6a47682 100644 --- a/profiles/core/neovim.nix +++ b/profiles/core/neovim.nix @@ -58,6 +58,7 @@ vim-oscyank venn-nvim gv-vim + zoxide-vim # Coding fzf-lua |
