From c9b7952e4c327405e23b951c162fbc457bc6b787 Mon Sep 17 00:00:00 2001 From: Tomo <68489118+Tomodachi94@users.noreply.github.com> Date: Sat, 6 Apr 2024 16:06:03 -0700 Subject: [PATCH] nvim: properly set python3 path --- home/common/nvim/default.nix | 9 ++++++++- home/common/nvim/lua/tomodachi94/options.lua | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/home/common/nvim/default.nix b/home/common/nvim/default.nix index ebf1ca5..f8fb428 100644 --- a/home/common/nvim/default.nix +++ b/home/common/nvim/default.nix @@ -9,13 +9,20 @@ in EDITOR = "${pkgs.lib.getExe pkgs.neovim}"; VISUAL = "${pkgs.lib.getExe pkgs.neovim}"; }; - xdg.configFile."nvim/lua".source = ./lua; + xdg.configFile."nvim/lua/tomodachi94".source = ./lua/tomodachi94; + xdg.configFile."nvim/lua/keyring".source = ./lua/keyring; xdg.configFile."nvim/snips".source = ./snips; xdg.configFile."nvim/spell".source = ./spell; xdg.configFile."nvim/vimscript".source = ./vimscript; xdg.configFile."nvim/init.lua".source = ./init.lua; xdg.configFile."nvim/lazy-lock.json".source = mkOutOfStoreSymlink "${dotfilesDir}/home/common/nvim/lazy-lock.json"; + xdg.configFile."nvim/lua/generated_vars.lua".text = '' + local vars = {} + vars.python3 = "${pkgs.python310.interpreter}" + return vars + ''; + xdg.dataFile."nvim/lazy/lazy.nvim/doc".source = "${pkgs.vimPlugins.lazy-nvim}/doc"; xdg.dataFile."nvim/lazy/lazy.nvim/lua".source = "${pkgs.vimPlugins.lazy-nvim}/lua"; } diff --git a/home/common/nvim/lua/tomodachi94/options.lua b/home/common/nvim/lua/tomodachi94/options.lua index d74a363..9b00409 100644 --- a/home/common/nvim/lua/tomodachi94/options.lua +++ b/home/common/nvim/lua/tomodachi94/options.lua @@ -1,5 +1,6 @@ ---Setup vanilla Vim options --Plugin options should go into their respective plugin spec files +local vars = require("generated_vars") vim.opt.tabstop = 4 vim.opt.shiftwidth = 4 @@ -19,7 +20,7 @@ vim.opt.clipboard:append { "unnamedplus" } vim.cmd("aunmenu PopUp.How-to\\ disable\\ mouse") vim.cmd("aunmenu PopUp.-1-") -vim.g.python3_host_prog = "/usr/bin/python3" +vim.g.python3_host_prog = vars.python3 --Enable per-filetype indentation settings if vim.fn.has("autocmd") == 1 then