New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Broken config on nixos-stable #40
Comments
This is definitely due to the update to support standalone usage. Could you please show your config so I can look into it? |
Can confirm, my config broke as well. Options are working, but everything else including plugins and vi/vim alias stopped working. Here's my config for reference { config, pkgs, nixvim, ... }:
{
# Neovim
programs.nixvim = {
enable = true;
plugins = {
nix.enable = true;
nvim-autopairs.enable = true;
lualine = {
enable = true;
sectionSeparators = {
left = "" ;
right = "" ;
};
componentSeparators = {
left = "" ;
right = "" ;
};
theme = "auto";
};
goyo = {
enable = true;
showLineNumbers = false;
};
lsp = {
enable = true;
servers = {
rust-analyzer.enable = true;
rnix-lsp.enable = true;
};
};
};
options = {
# Indentation
autoindent = true;
tabstop = 4;
shiftwidth = 4;
expandtab = true;
backspace = "indent,eol,start";
# Text
showmatch = true;
mouse = "a";
number = true;
relativenumber = false;
ttyfast = true;
clipboard = "unnamedplus";
# Colors
background = "dark";
termguicolors = true;
};
};
programs.neovim.vimAlias = true;
programs.neovim.viAlias = true;
} |
Alright, this is because I stopped using home-manager for managing plugins (maybe deleting |
I don't have a ~/.local/share/neovim folder on my system, so I guess it would not solve the issue. |
Sorry, I mistyped it 😅 should be on |
Oh its okay, I deleted that folder and tried again but the result was same. Error detected while processing /nix/store/1mkybnq10kfwmcp708nfrd1gi39ab7k8-init.vim:
line 53:
E5108: Error executing lua [string ":lua"]:20: module 'nvim-autopairs' not found:
no field package.preload['nvim-autopairs']
no file '/nix/store/yhwsx7yp5kzm2by5bqz56r393iy7v1js-luajit-2.1.0-2022-04-05-env/share/lua/5.1/nvim-autopairs.lua'
no file '/nix/store/yhwsx7yp5kzm2by5bqz56r393iy7v1js-luajit-2.1.0-2022-04-05-env/share/lua/5.1/nvim-autopairs/init.lua'
no file '/nix/store/yhwsx7yp5kzm2by5bqz56r393iy7v1js-luajit-2.1.0-2022-04-05-env/lib/lua/5.1/nvim-autopairs.so'
stack traceback:
[C]: in function 'require'
[string ":lua"]:20: in main chunk The |
Thanks, I'll look into it! |
I am very confused, as this seems to be working for me... Can you share the output of |
Sure, here. cat $(which nvim)
#! /nix/store/9zm6br2ri10a0b71dll2wrim5bnhg6b6-bash-5.1-p16/bin/bash -e
export NVIM_SYSTEM_RPLUGIN_MANIFEST='/nix/store/b37mm655v10n8ln8bgb6r7hrw6kqr9wf-neovim-0.7.0/rplugin.vim'
export GEM_HOME='/nix/store/8qjl87a5wfjywkl0y6329bfvvjn130ax-neovim-ruby-env/lib/ruby/gems/2.7.0'
PATH=${PATH:+':'$PATH':'}
if [[ $PATH != *':''/nix/store/8qjl87a5wfjywkl0y6329bfvvjn130ax-neovim-ruby-env/bin'':'* ]]; then
PATH=$PATH'/nix/store/8qjl87a5wfjywkl0y6329bfvvjn130ax-neovim-ruby-env/bin'
fi
PATH=${PATH#':'}
PATH=${PATH%':'}
export PATH
LUA_PATH=${LUA_PATH:+';'$LUA_PATH';'}
LUA_PATH=${LUA_PATH/';''/nix/store/yhwsx7yp5kzm2by5bqz56r393iy7v1js-luajit-2.1.0-2022-04-05-env/share/lua/5.1/?/init.lua'';'/';'}
LUA_PATH='/nix/store/yhwsx7yp5kzm2by5bqz56r393iy7v1js-luajit-2.1.0-2022-04-05-env/share/lua/5.1/?/init.lua'$LUA_PATH
LUA_PATH=${LUA_PATH#';'}
LUA_PATH=${LUA_PATH%';'}
export LUA_PATH
LUA_PATH=${LUA_PATH:+';'$LUA_PATH';'}
LUA_PATH=${LUA_PATH/';''/nix/store/yhwsx7yp5kzm2by5bqz56r393iy7v1js-luajit-2.1.0-2022-04-05-env/share/lua/5.1/?.lua'';'/';'}
LUA_PATH='/nix/store/yhwsx7yp5kzm2by5bqz56r393iy7v1js-luajit-2.1.0-2022-04-05-env/share/lua/5.1/?.lua'$LUA_PATH
LUA_PATH=${LUA_PATH#';'}
LUA_PATH=${LUA_PATH%';'}
export LUA_PATH
LUA_CPATH=${LUA_CPATH:+';'$LUA_CPATH';'}
LUA_CPATH=${LUA_CPATH/';''/nix/store/yhwsx7yp5kzm2by5bqz56r393iy7v1js-luajit-2.1.0-2022-04-05-env/lib/lua/5.1/?.so'';'/';'}
LUA_CPATH='/nix/store/yhwsx7yp5kzm2by5bqz56r393iy7v1js-luajit-2.1.0-2022-04-05-env/lib/lua/5.1/?.so'$LUA_CPATH
LUA_CPATH=${LUA_CPATH#';'}
LUA_CPATH=${LUA_CPATH%';'}
export LUA_CPATH
PATH=${PATH:+':'$PATH':'}
PATH=${PATH/':''/nix/store/bj64a4vhys78vy4s4zd9z3jkhsnsl2z6-rnix-lsp-0.2.5/bin'':'/':'}
PATH='/nix/store/bj64a4vhys78vy4s4zd9z3jkhsnsl2z6-rnix-lsp-0.2.5/bin'$PATH
PATH=${PATH#':'}
PATH=${PATH%':'}
export PATH
PATH=${PATH:+':'$PATH':'}
PATH=${PATH/':''/nix/store/wi4lmd8vi0p0f15kkh1pfdl5piwkkscz-rust-analyzer-2022-05-17/bin'':'/':'}
PATH='/nix/store/wi4lmd8vi0p0f15kkh1pfdl5piwkkscz-rust-analyzer-2022-05-17/bin'$PATH
PATH=${PATH#':'}
PATH=${PATH%':'}
export PATH
exec -a "$0" "/nix/store/j9lb8ywy1birhlq22z2qdd0x40j80syf-neovim-unwrapped-0.7.0/bin/nvim" -u /nix/store/k1qbqplgqlrja3c4a7x8n9wpql7s6jcl-init.vim '--cmd' 'let g:loaded_node_provider=0' '--cmd' 'let g:loaded_python_provider=0' '--cmd' 'let g:python3_host_prog='\''/nix/store/b37mm655v10n8ln8bgb6r7hrw6kqr9wf-neovim-0.7.0/bin/nvim-python3'\''' '--cmd' 'let g:ruby_host_prog='\''/nix/store/b37mm655v10n8ln8bgb6r7hrw6kqr9wf-neovim-0.7.0/bin/nvim-ruby'\''' "$@" |
What about the contents of exec -a "$0" "/nix/store/8svf52rgypxxjcwq5l1sjcykmibb7a61-neovim-unwrapped-0.7.2/bin/nvim" -u /nix/store/nba1a1lb19kxzznsbcndzbhcvhll5d4k-init.vim '--cmd' 'let g:loaded_node_provider=0 | let g:loaded_python_provider=0 | let g:python3_host_prog='\''/nix/store/bmap065nim5wh6c37ha9ilgm423db3zq-neovim-0.7.2/bin/nvim-python3'\'' | let g:ruby_host_prog='\''/nix/store/bmap065nim5wh6c37ha9ilgm423db3zq-neovim-0.7.2/bin/nvim-ruby'\''' '--cmd' 'set packpath^=/nix/store/nv8nx8acslxa60fizafdpbzcylbpigsf-vim-pack-dir' '--cmd' 'set rtp^=/nix/store/nv8nx8acslxa60fizafdpbzcylbpigsf-vim-pack-dir' "$@" What version of nixpkgs are you using? |
Here it is " configuration generated by NIX
set nocompatible
colorscheme base16-rose-pine-dawn
lua <<EOF
-- Set up globals {{{
do
local nixvim_globals = {['goyo_linenr'] = 0}
for k,v in pairs(nixvim_globals) do
vim.g[k] = v
end
end
-- }}}
-- Set up options {{{
do
local nixvim_options = {['autoindent'] = true,['background'] = 'light',['backspace'] = 'indent,eol,start',['clipboard'] = 'unnamedplus',['expandtab'] = true,['mouse'] = 'a',['number'] = true,['relativenumber'] = false,['shiftwidth'] = 4,['showmatch'] = true,['tabstop'] = 4,['termguicolors'] = true,['ttyfast'] = true}
for k,v in pairs(nixvim_options) do
vim.o[k] = v
end
end
-- }}}
require('nvim-autopairs').setup({})
require("lualine").setup({['options'] = {['component_separators'] = {['left'] = '',['right'] = ''},['section_separators'] = {['left'] = '',['right'] = ''},['theme'] = 'auto'}})
-- LSP {{{
do
local __lspServers = {'rust_analyzer','rnix'}
local __lspOnAttach = function(client)
end
local __setup = {
on_attach = __lspOnAttach
}
for i,server in ipairs(__lspServers) do
if type(server) == "string" then
require('lspconfig')[server].setup(__setup)
else
local options = server.extraOptions
require('lspconfig')[server.name].setup(options)
end
end
end
-- }}}
EOF My nixpkgs is set to nixos-22.05, although I tried nixos-unstable a few days back and had the same issue if I remember correctly. |
Okay, I created a copy of my wrapper script, and added It fixed it! Is there any reason why it did not set up the packpath in my wrapper script? |
This is probably something to do with the nixos version, I've only tested this in unstable... I'll look into it on |
Can confirm this is an issue on |
I had the same problem, so I vimdiff'd the generated EDIT: indeed moving the colorscheme part to the end only solve the |
Fixed by #44! |
Thanks for the good work guys! 😁 |
Hello, I have just tried to update nixvim in my personal flake. However it seems to be broken, when using the home manager module.
I am getting the following errors
I also noticed that the config file is no longer saved in the
$HOME/.config/
directory, why is that?Anyway, I will continue using an older version until we can fix some of these issues.
The text was updated successfully, but these errors were encountered: