-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
neovim, neovimUtils, neovim-qt: drop python2 support #121339
The head ref may contain hidden characters: "neovim-\u{1F525}-python2"
Conversation
@@ -1,5 +1,4 @@ | |||
{ lib, stdenv, mkDerivation, fetchFromGitHub, cmake, doxygen, makeWrapper | |||
, msgpack, neovim, pythonPackages, qtbase, neovim-qt-unwrapped }: | |||
{ stdenv, makeWrapper, neovim, neovim-qt-unwrapped }: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drive-by cleanup of inputs, not used since 3a25004.
it's a bit annoying to break compatibility inside the same neovim release (python2 is dropped in 0.5) but I am not aware of any python2 remote plugins so it should probably be fine ? |
maybe add some warning if python2 is used since it's a breaking change for the same version so it can be surprising. |
Sounds great, though not sure where would be a good spot. |
when |
I've added three asserts/throws, can you check whether that is sufficient? Also extended the release notes for vims python2 support drop with neovim. Both as fixups, will squash them before merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
Hopefully this is just me doing it wrong, but I can't seem to get this to work in my home-manager config. {
programs.neovim = {
enable = true;
package = (import (builtins.fetchTarball {
url =
"https://github.com/mweinelt/nixpkgs/archive/b91ddf1960e1c825a9bcddcbfa67d4eae0e1b971.tar.gz";
sha256 = "0jdw4j0r6fkqhqaac5gr4i5nq35pm49wh98idzckrzhsg5h1b7yn";
}) { config = { allowUnfree = true; }; }).neovim-unwrapped;
extraConfig = ''
if (has("nvim"))
"For Neovim 0.1.3 and 0.1.4 < https://github.com/neovim/neovim/pull/2198 >
let $NVIM_TUI_ENABLE_TRUE_COLOR=1
endif
"For Neovim > 0.1.5 and Vim > patch 7.4.1799 < https://github.com/vim/vim/commit/61be73bb0f965a895bfb064ea3e55476ac175162 >
"Based on Vim patch 7.4.1770 (`guicolors` option) < https://github.com/vim/vim/commit/8a633e3427b47286869aa4b96f2bfc1fe65b25cd >
" < https://github.com/neovim/neovim/wiki/Following-HEAD#20160511 >
if (has("termguicolors"))
set termguicolors
endif
filetype plugin indent on
syntax on
set tabstop=4 shiftwidth=4 expandtab
set clipboard+=unnamedplus
'';
extraPython3Packages = (ps: with ps; [ black isort pylint ]);
plugins = with pkgs.vimPlugins; [
vim-nix
coc-nvim
coc-css
coc-explorer
coc-git
coc-go
coc-html
coc-json
coc-prettier
coc-pyright
coc-rust-analyzer
coc-tsserver
coc-yaml
{
plugin = vim-autoformat;
# https://github.com/Chiel92/vim-autoformat/blob/master/plugin/defaults.vim
config = ''
let g:formatters_javascript = ['prettier']
let g:formatters_json = ['prettier']
let g:formatters_python = ['black']
let g:formatters_typescript = ['prettier']
let g:formatters_yaml = ['prettier']
'';
}
{
plugin = vim-one;
config = ''
set background=dark
colorscheme one
'';
}
vim-lastplace
];
viAlias = true;
vimAlias = true;
vimdiffAlias = true;
withNodeJs = true;
withPython3 = true;
};
} I still end up with:
It seems it should be using the package from your branch since it checks the sha256. |
The only pynvim occurrence that are left are scoped with Squashing now. |
In 2a00e53 pynvim support for python2 was disabled, this broke the neovim build. I really think it is time to let go of python2 support in neovim.
@SCOTT-HAMILTON does this PR work for you ? |
Was able to get it working once I realized |
Nixpkgs did the same in NixOS/nixpkgs#121339.
Nixpkgs did the same in NixOS/nixpkgs#121339.
Nixpkgs did the same in NixOS/nixpkgs#121339.
Nixpkgs did the same in NixOS/nixpkgs#121339.
Nixpkgs did the same in NixOS/nixpkgs#121339.
Nixpkgs did the same in NixOS/nixpkgs#121339.
Motivation for this change
In 2a00e53 pynvim support for python2 was disabled, this broke the
neovim build. I really think it is time to let go of python2 support in
neovim.
Fixes the build for me, I have no regrets.
I'm aware we might need a release notes entry for that. I'm open to suggestions, I've never relied on python2 in neovim.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)