From 1fee72709fb75b2bb12fc707889f4f172bb3dc63 Mon Sep 17 00:00:00 2001 From: Daniel Kempkens Date: Wed, 1 Jan 2025 16:53:39 +0100 Subject: [PATCH] nvim: use zsh as default shell --- home/config/nvim/init.fnl | 2 +- home/config/nvim/nifoc/repl.fnl | 4 ++-- home/programs/nvim/default.nix | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/home/config/nvim/init.fnl b/home/config/nvim/init.fnl index d25f9ee..477eda9 100644 --- a/home/config/nvim/init.fnl +++ b/home/config/nvim/init.fnl @@ -2,7 +2,7 @@ g vim.g] ;; Preamble (vim.cmd.filetype "plugin indent on") - (set o.shell :/bin/sh) + (set o.shell _G.nifoc_default_shell) ;; Various Options (set o.spelllang [:en :de]) (set o.showmode false) diff --git a/home/config/nvim/nifoc/repl.fnl b/home/config/nvim/nifoc/repl.fnl index 18bf1d9..7311fb1 100644 --- a/home/config/nvim/nifoc/repl.fnl +++ b/home/config/nvim/nifoc/repl.fnl @@ -23,6 +23,7 @@ (local ruby #[(exe :irb)]) (local typescript #[(exe :node)]) (local zsh #[(exe :zsh)]) + (local default-shell #[_G.nifoc_default_shell]) ;; Map filetype to REPL (local repl-map {: elixir : erlang @@ -36,8 +37,7 @@ : zsh}) (fn mod.open-shell [] - (let [shell (. repl-map :zsh)] - (open-split shell))) + (open-split default-shell)) (fn mod.open-repl [] (let [ft vim.bo.filetype diff --git a/home/programs/nvim/default.nix b/home/programs/nvim/default.nix index f77c99c..97f791d 100644 --- a/home/programs/nvim/default.nix +++ b/home/programs/nvim/default.nix @@ -67,7 +67,10 @@ in extraLuaConfig = /* lua */ '' vim.loader.enable() + + _G.nifoc_default_shell = '${pkgs.zsh.outPath}/bin/zsh' _G.nvim_treesitter_parser_directory = os.getenv("HOME") .. "/.local/share/nvim/nvim-treesitter_parser" + vim.opt.runtimepath:prepend(_G.nvim_treesitter_parser_directory) require('nifoc.nix')