Open thanhnguyen2187 opened 6 months ago
hi @thanhnguyen2187
can you confirm your setup?
and anything else that you customized?
Sorry I missed that. Here is my setup:
23.11
0.9.4
The configuration files for Neovim is generated by Home Manager, but I'm gonna simplify it by providing the relevant generated .vim
file:
Content of completion.lua
and lualine.lua
and firenvim.lua
can be found in my dotfiles repository, but I think they are not relevant.
@jam1015 thoughts on this?
I don't know anything about nix, and I don't use neovim myself
I see this is the slime config (for tmux), but I don't know how neovim feels about vimscript config into lua 🤷
My lua config for tmux works fine with python. My guess is the issue with Nix because if you don't get everything right in Nix there are problems (aspiring to learn Nix soon). I'm not actually a Vim/Neovim expert so I'd like a more minimal config for testing than is shown above, preferably that automatically installs/configures slime, or with instructions to easily install it just for that config.
I think I found a plausible explanation, which is Neovim's load order for configuration files generated by NixOS/Home Manager. This is the result of :scriptnames
:
...
22: /nix/store/5cjkv4mr882rwjhcsasjdn8smi9gy413-vimplugin-jpalardy-vim-slime-4a898d57f41bc35e99173c5a0a8720f1796459b5/ftplugin/python/slime.vim
23: /nix/store/g8ywwhvf14qywy1zfg1fqyzylw4jj81x-neovim-unwrapped-0.9.4/share/nvim/runtime/ftplugin/python.vim
...
48: /nix/store/5cjkv4mr882rwjhcsasjdn8smi9gy413-vimplugin-jpalardy-vim-slime-4a898d57f41bc35e99173c5a0a8720f1796459b5/autoload/slime/config.vim
...
g:slime_config_defaults
was utilized by .../ftplugin/python/slime.vim
before it is defined in .../autoload/slime/config.vim
, and that caused the issue.
I had the same issue. ftplugin is loaded before init.lua. I would suggest initialising
let g:slime_config_defaults = {}
in
vim-slime/ftplugin/python/slime.vim
which fixed it for me.
Hi!
Thanks for the awesome plugin. I'm having a strange error on opening Python files, however:
The important part is:
I tried using the latest version of vim-slime as I thought Home Manager/NixOS's version might have a problem but the error stays the same. What do you think?
Thanks!