Comments (17)
Fixed by #44!
from nixvim.
Thanks for the good work guys! 😁
from nixvim.
Thanks, I'll look into it!
from nixvim.
This is probably something to do with the nixos version, I've only tested this in unstable... I'll look into it on nixos-22.05
, thanks for clarifying.
from nixvim.
This is definitely due to the update to support standalone usage. Could you please show your config so I can look into it?
from nixvim.
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;
}
from nixvim.
Alright, this is because I stopped using home-manager for managing plugins (maybe deleting ~/.local/share/neovim
will fix it). Though looking at this, I should probably go back to using it considering stuff like programs.neovim.vimAlias
.
from nixvim.
(maybe deleting
~/.local/share/neovim
will fix it).
I don't have a ~/.local/share/neovim folder on my system, so I guess it would not solve the issue.
from nixvim.
(maybe deleting
~/.local/share/neovim
will fix it).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 ~/.local/share/nvim
.
from nixvim.
Sorry, I mistyped it sweat_smile should be on
~/.local/share/nvim
.
Oh its okay, I deleted that folder and tried again but the result was same.
By the way, this is the error that pops up whenever I start neovim.
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 lua/5.1
folder in nix-store only has the jit
folder
from nixvim.
I am very confused, as this seems to be working for me... Can you share the output of cat $(which nvim)
?
from nixvim.
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'\''' "$@"
from nixvim.
What about the contents of /nix/store/k1qbqplgqlrja3c4a7x8n9wpql7s6jcl-init.vim
? Something odd's going on here, because it doesn't seem to be setting the runtimepath of nvim. Here's what the last line of my wrapper script looks like, notice the last arguments:
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?
from nixvim.
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.
from nixvim.
Okay, I created a copy of my wrapper script, and added --cmd 'set packpath^=/nix/store/am8i27dgn79jv6r4q7a4ypfhcnbxgird-vim-pack-dir' '--cmd' 'set rtp^=/nix/store/am8i27dgn79jv6r4q7a4ypfhcnbxgird-vim-pack-dir' "$@"
manually to the end of it after finding the path of vim-pack-dir in my nix-store.
It fixed it! Is there any reason why it did not set up the packpath in my wrapper script?
from nixvim.
Can confirm this is an issue on nixos-22.05
but not on nixos-unstable
from nixvim.
I had the same problem, so I vimdiff'd the generated init.vim
after and before the refactor, and the only difference is that now colorscheme ...
is added to init.vim
before the lua part, including before require
calls that setup the theme, while before the refactor it was at the end with a vim.cmd([[colorscheme ...]])
. That may be the problem, but it wouldn't explain why it works on unstable.
EDIT: indeed moving the colorscheme part to the end only solve the E185: Cannot find color scheme 'nord'
part of the error, and not the following ones.
from nixvim.
Related Issues (20)
- [BUG] Example for plugins.gitsigns.onAttach is wrong / confusing
- [BUG] Unable to set obsidian.followUrlFunc using if statement
- [PLUGIN REQUEST] virt-column.nvim
- [BUG] attribute 'base16-nvim' missing HOT 2
- [BUG] Can't install nixvim, "option ... does not exist" HOT 2
- [BUG] Alpha terminal
- [BUG] Conform plugin does not install enabled formatters
- [PLUGIN REQUEST] indent-o-matic
- [PLUGIN REQUEST] direnv.vim
- [PLUGIN REQUEST] crates.nvim HOT 2
- Running `nix flake show` fails to evaluate on `x86_64-linux` HOT 2
- [BUG] copilot-vim.keymaps do not work properly
- LSP keymaps should use keymap-helpers submodule HOT 2
- [PLUGIN REQUEST] lsp-status.nvim
- [BUG] error: `phpcbf` is now deprecated, use `php-codesniffer` instead which contains both `phpcs` and `phpcbf`. HOT 14
- [PLUGIN REQUEST] vim-sandwich
- [BUG] Treesitter configures custom parser lists incorrectly HOT 4
- plugins/whichkey: Support window and layout fields HOT 1
- [PLUGIN REQUEST] <auto-save fork>
- [BUG] [nvim-cmp] unable to pass a function in sources entryFilter HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nixvim.