Skip to content

Commit

Permalink
nvim: properly set python3 path
Browse files Browse the repository at this point in the history
  • Loading branch information
tomodachi94 committed Apr 6, 2024
1 parent ac5e0ef commit c9b7952
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
9 changes: 8 additions & 1 deletion home/common/nvim/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
3 changes: 2 additions & 1 deletion home/common/nvim/lua/tomodachi94/options.lua
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down

0 comments on commit c9b7952

Please sign in to comment.