Skip to content
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

Vim remove share/runtime/NAME prefix from the installed folder #136429

Merged
merged 3 commits into from
Sep 12, 2021

Conversation

teto
Copy link
Member

@teto teto commented Sep 2, 2021

Motivation for this change

When looking into plugin issues, there is a hierarchy of 3 folders share/runtime/<PKG_NAME> for no reason ? just makes debugging harder as well as paths longer when patching.

This passes nixpkgs-review.

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • 21.11 Release Notes (or backporting 21.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@teto teto requested a review from jonringer as a code owner September 2, 2021 00:02
@teto teto changed the title Vim remove rtp path Vim remove share/runtime/NAME prefix from the installed folder Sep 2, 2021
@teto teto marked this pull request as draft September 2, 2021 11:02
@teto teto force-pushed the vim-remove-rtpPath branch from 7a0e642 to 481a8dd Compare September 2, 2021 21:22
@teto teto marked this pull request as ready for review September 2, 2021 21:23
@teto
Copy link
Member Author

teto commented Sep 2, 2021

it seems to work just fine with the "native vim plugin manager". I suspect it may break other handlers like pathogen/vam/vim-plug but do we need those ? I wonder what's their added value in nix.

@teto
Copy link
Member Author

teto commented Sep 11, 2021

@MarcWeber the pathogen test passes, but there are no tests for vam. I've no idea if this PR breaks it or not. Could you confirm it doesn't break anything ? Eventually add a test ?

nixpkgs creates a hierarchy of 3 folders share/runtime/<PKG_NAME> for no reason ?
makes debugging harder as well as paths longer when patching so this
removes this nested folders.
@teto teto force-pushed the vim-remove-rtpPath branch from 450f238 to 56f823d Compare September 11, 2021 22:14
Matthieu Coudron added 2 commits September 12, 2021 19:03
The files are installed via build-vim-plugin. Doing that again is a waste of resources, worse it can create errors
@teto
Copy link
Member Author

teto commented Sep 12, 2021

I've added a vim-plug test + checked vam I think it should be ok.
This passes neovim tests and nixpkgs-review work except for the sparkup plugin which is a weird one, no commit since 2012 and the vim files are in a subfolder of the repo so I think noone actually uses that.

Link to currently reviewing PR:
https://github.com/NixOS/nixpkgs/pull/136429

3 packages marked as broken and skipped:
lua52Packages.gitsigns-nvim lua53Packages.gitsigns-nvim vimPlugins.coc-imselect

1 package failed to build:
vimPlugins.sparkup

932 packages built:
lua51Packages.gitsigns-nvim luajitPackages.gitsigns-nvim spacevim vimPlugins.BetterLua-vim vimPlugins.BufOnly vimPlugins.CSApprox vimPlugins.CheckAttach vimPlugins.colorsamplerpack vimPlugins.Coqtail vimPlugins.Cosco vimPlugins.DoxygenToolkit-vim vimPlugins.FixCursorHold-nvim vimPlugins.Gist vimPlugins.Gundo vimPlugins.Hoogle vimPlugins.Improved-AnsiEsc vimPlugins.Jenkinsfile-vim-syntax vimPlugins.LanguageClient-neovim vimPlugins.LanguageTool-nvim vimPlugins.LeaderF vimPlugins.MatchTagAlways vimPlugins.NeoSolarized vimPlugins.NrrwRgn vimPlugins.PreserveNoEOL vimPlugins.QFEnter vimPlugins.Recover-vim vimPlugins.Rename vimPlugins.ReplaceWithRegister vimPlugins.Shade-nvim vimPlugins.ShowMultiBase vimPlugins.SimpylFold vimPlugins.Solarized vimPlugins.SpaceCamp vimPlugins.Spacegray-vim vimPlugins.SudoEdit-vim vimPlugins.Supertab vimPlugins.Syntastic vimPlugins.SyntaxRange vimPlugins.Tabular vimPlugins.Tagbar vimPlugins.nerdcommenter vimPlugins.nerdtree vimPlugins.UltiSnips vimPlugins.VimOrganizer vimPlugins.Vundle-vim vimPlugins.WebAPI vimPlugins.YUNOcommit-vim vimPlugins.Yankring vimPlugins.YouCompleteMe vimPlugins.a-vim vimPlugins.ack-vim vimPlugins.acp vimPlugins.aerial-nvim vimPlugins.agda-vim vimPlugins.airline vimPlugins.alchemist-vim vimPlugins.ale vimPlugins.align vimPlugins.aniseed vimPlugins.ansible-vim vimPlugins.antonys-macro-repeater vimPlugins.arcanist-vim vimPlugins.argtextobj-vim vimPlugins.async-vim vimPlugins.asyncomplete-vim vimPlugins.ats-vim vimPlugins.aurora vimPlugins.auto-git-diff vimPlugins.auto-pairs vimPlugins.auto-session vimPlugins.autoload_cscope-vim vimPlugins.awesome-vim-colorschemes vimPlugins.ayu-vim vimPlugins.barbar-nvim vimPlugins.base16-vim vimPlugins.bats vimPlugins.bclose-vim vimPlugins.bracey-vim vimPlugins.brainfuck-vim vimPlugins.bufdelete-nvim vimPlugins.bufexplorer vimPlugins.bufferline-nvim vimPlugins.calendar vimPlugins.camelcasemotion vimPlugins.caw vimPlugins.chadtree vimPlugins.changeColorScheme-vim vimPlugins.ci_dark vimPlugins.clang_complete vimPlugins.clever-f-vim vimPlugins.clighter8 vimPlugins.cmd-parser-nvim vimPlugins.cmp-buffer vimPlugins.cmp-calc vimPlugins.cmp-emoji vimPlugins.cmp-nvim-lsp vimPlugins.cmp-nvim-lua vimPlugins.cmp-path vimPlugins.cmp-vsnip vimPlugins.cmp_luasnip vimPlugins.coc-clangd vimPlugins.coc-clap vimPlugins.coc-cmake vimPlugins.coc-css vimPlugins.coc-denite vimPlugins.coc-diagnostic vimPlugins.coc-emmet vimPlugins.coc-eslint vimPlugins.coc-explorer vimPlugins.coc-fzf vimPlugins.coc-git vimPlugins.coc-go vimPlugins.coc-highlight vimPlugins.coc-html vimPlugins.coc-java vimPlugins.coc-jest vimPlugins.coc-json vimPlugins.coc-lists vimPlugins.coc-lua vimPlugins.coc-markdownlint vimPlugins.coc-metals vimPlugins.coc-neco vimPlugins.coc-nvim vimPlugins.coc-pairs vimPlugins.coc-prettier vimPlugins.coc-pyright vimPlugins.coc-python vimPlugins.coc-r-lsp vimPlugins.coc-rls vimPlugins.coc-rust-analyzer vimPlugins.coc-smartf vimPlugins.coc-snippets vimPlugins.coc-solargraph vimPlugins.coc-spell-checker vimPlugins.coc-stylelint vimPlugins.coc-tabnine vimPlugins.coc-texlab vimPlugins.coc-tslint vimPlugins.coc-tslint-plugin vimPlugins.coc-tsserver vimPlugins.coc-vetur vimPlugins.coc-vimlsp vimPlugins.coc-vimtex vimPlugins.coc-wxml vimPlugins.coc-yaml vimPlugins.coc-yank vimPlugins.codi-vim vimPlugins.coffeeScript vimPlugins.colorbuddy-nvim vimPlugins.colorizer vimPlugins.command-t vimPlugins.commentary vimPlugins.committia vimPlugins.compe-conjure vimPlugins.compe-latex-symbols vimPlugins.compe-tabnine vimPlugins.compe-tmux vimPlugins.compe-zsh vimPlugins.completion-buffers vimPlugins.completion-nvim vimPlugins.completion-tabnine vimPlugins.completion-treesitter vimPlugins.concealedyank vimPlugins.conflict-marker-vim vimPlugins.conjure vimPlugins.context-filetype vimPlugins.coq-vim vimPlugins.cpsm vimPlugins.crates-nvim vimPlugins.vim-css-color vimPlugins.csv vimPlugins.ctrlp vimPlugins.ctrlp-cmatcher vimPlugins.ctrlp-py-matcher vimPlugins.ctrlp-z vimPlugins.cute-python vimPlugins.dart-vim-plugin vimPlugins.dashboard-nvim vimPlugins.defx-git vimPlugins.defx-icons vimPlugins.defx-nvim vimPlugins.delimitMate vimPlugins.denite vimPlugins.denite-extra vimPlugins.denite-git vimPlugins.deol-nvim vimPlugins.deoplete-clang vimPlugins.deoplete-dictionary vimPlugins.deoplete-emoji vimPlugins.deoplete-fish vimPlugins.deoplete-github vimPlugins.deoplete-go vimPlugins.deoplete-greek vimPlugins.deoplete-jedi vimPlugins.deoplete-julia vimPlugins.deoplete-khard vimPlugins.deoplete-lsp vimPlugins.deoplete-notmuch vimPlugins.deoplete-nvim vimPlugins.deoplete-phpactor vimPlugins.deoplete-rust vimPlugins.deoplete-tabnine vimPlugins.deoplete-ternjs vimPlugins.deoplete-vim-lsp vimPlugins.deoplete-zsh vimPlugins.devdocs-vim vimPlugins.dhall-vim vimPlugins.diagnostic-nvim vimPlugins.diffview-nvim vimPlugins.direnv-vim vimPlugins.doki-theme-vim vimPlugins.dracula-vim vimPlugins.easy-align vimPlugins.easygit vimPlugins.easymotion vimPlugins.echodoc vimPlugins.edge vimPlugins.editorconfig-nvim vimPlugins.editorconfig-vim vimPlugins.eighties vimPlugins.elm-vim vimPlugins.elvish-vim vimPlugins.embark-vim vimPlugins.emmet-vim vimPlugins.emodeline vimPlugins.ensime-vim vimPlugins.extradite vimPlugins.falcon vimPlugins.far-vim vimPlugins.fastfold vimPlugins.fcitx-vim vimPlugins.feline-nvim vimPlugins.fennel-vim vimPlugins.fern-vim vimPlugins.ferret vimPlugins.file-line vimPlugins.flake8-vim vimPlugins.float-preview-nvim vimPlugins.floating-nvim vimPlugins.floobits-neovim vimPlugins.formatter-nvim vimPlugins.forms vimPlugins.friendly-snippets vimPlugins.fruzzy vimPlugins.fugitive vimPlugins.fugitive-gitlab-vim vimPlugins.fwatch-nvim vimPlugins.fzf-checkout-vim vimPlugins.fzf-lsp-nvim vimPlugins.fzf-vim vimPlugins.fzfWrapper vimPlugins.galaxyline-nvim vimPlugins.gen_tags-vim vimPlugins.gentoo-syntax vimPlugins.ghcmod vimPlugins.ghcid vimPlugins.gina-vim vimPlugins.git-blame-nvim vimPlugins.git-messenger-vim vimPlugins.git-worktree-nvim vimPlugins.gitgutter vimPlugins.gitignore-vim vimPlugins.gitlinker-nvim vimPlugins.gitsigns-nvim vimPlugins.gitv vimPlugins.gleam-vim vimPlugins.glow-nvim vimPlugins.golden-ratio vimPlugins.gotests-vim vimPlugins.goto-preview vimPlugins.goyo vimPlugins.gruvbox vimPlugins.gruvbox-community vimPlugins.gruvbox-flat-nvim vimPlugins.gruvbox-material vimPlugins.gruvbox-nvim vimPlugins.gv-vim vimPlugins.haskell-vim vimPlugins.haskellConceal vimPlugins.haskellConcealPlus vimPlugins.hasksyn vimPlugins.hiPairs vimPlugins.hier vimPlugins.himalaya-vim vimPlugins.hlint-refactor vimPlugins.hologram-nvim vimPlugins.hoon-vim vimPlugins.hop-nvim vimPlugins.i3config-vim vimPlugins.iceberg-vim vimPlugins.idris-vim vimPlugins.idris2-vim vimPlugins.increment-activator vimPlugins.incsearch-easymotion-vim vimPlugins.incsearch-vim vimPlugins.indent-blankline-nvim vimPlugins.indentLine vimPlugins.intero-neovim vimPlugins.investigate-vim vimPlugins.iosvkem vimPlugins.ipython vimPlugins.ir_black vimPlugins.is-vim vimPlugins.jdaddy-vim vimPlugins.jedi-vim vimPlugins.jellybeans-nvim vimPlugins.jellybeans-vim vimPlugins.jq-vim vimPlugins.jsonc-vim vimPlugins.julia-vim vimPlugins.kommentary vimPlugins.kotlin-vim vimPlugins.lalrpop-vim vimPlugins.last256 vimPlugins.latex-box vimPlugins.latex-live-preview vimPlugins.lazygit-nvim vimPlugins.lean-vim vimPlugins.lens-vim vimPlugins.lessspace-vim vimPlugins.lexima-vim vimPlugins.lf-vim vimPlugins.lh-brackets vimPlugins.lh-vim-lib vimPlugins.lightline-ale vimPlugins.lightline-bufferline vimPlugins.lightline-gruvbox-vim vimPlugins.lightline-vim vimPlugins.lightspeed-nvim vimPlugins.limelight-vim vimPlugins.lir-nvim vimPlugins.lispdocs-nvim vimPlugins.lsp-colors-nvim vimPlugins.lsp-rooter-nvim vimPlugins.lsp-status-nvim vimPlugins.lsp_extensions-nvim vimPlugins.lsp_signature-nvim vimPlugins.lspkind-nvim vimPlugins.lspsaga-nvim vimPlugins.lualine-lsp-progress vimPlugins.lualine-nvim vimPlugins.luasnip vimPlugins.lush-nvim vimPlugins.lushtags vimPlugins.maktaba vimPlugins.markdown-preview-nvim vimPlugins.matchit-zip vimPlugins.mattn-calendar-vim vimPlugins.mayansmoke vimPlugins.meson vimPlugins.minimap-vim vimPlugins.minsnip-nvim vimPlugins.mkdx vimPlugins.molokai vimPlugins.moonlight-nvim vimPlugins.multiple-cursors vimPlugins.ncm2 vimPlugins.ncm2-bufword vimPlugins.ncm2-cssomni vimPlugins.ncm2-dictionary vimPlugins.ncm2-github vimPlugins.ncm2-html-subscope vimPlugins.ncm2-jedi vimPlugins.ncm2-markdown-subscope vimPlugins.ncm2-neoinclude vimPlugins.ncm2-neosnippet vimPlugins.ncm2-path vimPlugins.ncm2-syntax vimPlugins.ncm2-tagprefix vimPlugins.ncm2-tmux vimPlugins.ncm2-ultisnips vimPlugins.ncm2-vim vimPlugins.necoGhc vimPlugins.neco-look vimPlugins.neco-syntax vimPlugins.neco-vim vimPlugins.neocomplete vimPlugins.neodark-vim vimPlugins.neoformat vimPlugins.neogit vimPlugins.neoinclude vimPlugins.neomake vimPlugins.neomru vimPlugins.neon vimPlugins.neorg vimPlugins.neoscroll-nvim vimPlugins.neosnippet vimPlugins.neosnippet-snippets vimPlugins.neoterm vimPlugins.neovim-ayu vimPlugins.neovim-fuzzy vimPlugins.neovim-sensible vimPlugins.neoyank-vim vimPlugins.nerdtree-git-plugin vimPlugins.neuron-vim vimPlugins.nginx-vim vimPlugins.nim-vim vimPlugins.nlua-nvim vimPlugins.nnn-vim vimPlugins.nord-nvim vimPlugins.nord-vim vimPlugins.nterm-nvim vimPlugins.null-ls-nvim vimPlugins.numb-nvim vimPlugins.nvcode-color-schemes-vim vimPlugins.nvim-ale-diagnostic vimPlugins.nvim-autopairs vimPlugins.nvim-base16 vimPlugins.nvim-bqf vimPlugins.nvim-bufdel vimPlugins.nvim-cm-racer vimPlugins.nvim-cmp vimPlugins.nvim-colorizer-lua vimPlugins.nvim-compe vimPlugins.nvim-completion-manager vimPlugins.nvim-dap vimPlugins.nvim-dap-ui vimPlugins.nvim-dap-virtual-text vimPlugins.nvim-expand-expr vimPlugins.nvim-gdb vimPlugins.nvim-gps vimPlugins.nvim-highlite vimPlugins.nvim-hlslens vimPlugins.nvim-hs-vim vimPlugins.nvim-jdtls vimPlugins.nvim-lightbulb vimPlugins.nvim-lspconfig vimPlugins.nvim-lsputils vimPlugins.nvim-nonicons vimPlugins.nvim-notify vimPlugins.nvim-peekup vimPlugins.nvim-scrollview vimPlugins.nvim-solarized-lua vimPlugins.nvim-spectre vimPlugins.nvim-terminal-lua vimPlugins.nvim-tree-lua vimPlugins.nvim-treesitter vimPlugins.nvim-treesitter-context vimPlugins.nvim-treesitter-pyfold vimPlugins.nvim-treesitter-refactor vimPlugins.nvim-treesitter-textobjects vimPlugins.nvim-ts-context-commentstring vimPlugins.nvim-ts-rainbow vimPlugins.nvim-web-devicons vimPlugins.nvim-whichkey-setup-lua vimPlugins.nvim-yarp vimPlugins.nvim_context_vt vimPlugins.nvimdev-nvim vimPlugins.oceanic-material vimPlugins.oceanic-next vimPlugins.one-nvim vimPlugins.onedark-nvim vimPlugins.onedark-vim vimPlugins.onehalf vimPlugins.open-browser vimPlugins.open-browser-github-vim vimPlugins.packer-nvim vimPlugins.palenight-vim vimPlugins.papercolor-theme vimPlugins.pathogen vimPlugins.pear-tree vimPlugins.pears-nvim vimPlugins.peskcolor-vim vimPlugins.pig-vim vimPlugins.plantuml-syntax vimPlugins.playground vimPlugins.plenary-nvim vimPlugins.polyglot vimPlugins.pony-vim-syntax vimPlugins.popfix vimPlugins.popup-nvim vimPlugins.presence-nvim vimPlugins.prettyprint vimPlugins.prev_indent vimPlugins.psc-ide-vim vimPlugins.purescript-vim vimPlugins.python-mode vimPlugins.python-syntax vimPlugins.quick-scope vimPlugins.quickfix-reflector-vim vimPlugins.quickfixstatus vimPlugins.quickrun vimPlugins.rainbow vimPlugins.rainbow_parentheses vimPlugins.random-vim vimPlugins.range-highlight-nvim vimPlugins.ranger-vim vimPlugins.readline-vim vimPlugins.refactoring-nvim vimPlugins.registers-nvim vimPlugins.repeat vimPlugins.rhubarb vimPlugins.riv vimPlugins.rnvimr vimPlugins.robotframework-vim vimPlugins.rspec-vim vimPlugins.rtorrent-syntax-file vimPlugins.rust-tools-nvim vimPlugins.rust-vim vimPlugins.sad-vim vimPlugins.salt-vim vimPlugins.scrollbar-nvim vimPlugins.securemodelines vimPlugins.self vimPlugins.semantic-highlight-vim vimPlugins.semshi vimPlugins.sensible vimPlugins.seoul256-vim vimPlugins.shabadou-vim vimPlugins.sideways-vim vimPlugins.signature vimPlugins.skim vimPlugins.skim-vim vimPlugins.sky-color-clock-vim vimPlugins.sleuth vimPlugins.smartpairs-vim vimPlugins.snap vimPlugins.snipmate vimPlugins.snippets-nvim vimPlugins.solidity vimPlugins.sonokai vimPlugins.sourcemap vimPlugins.spacevim vimPlugins.specs-nvim vimPlugins.splice-vim vimPlugins.split-term-vim vimPlugins.splitjoin-vim vimPlugins.sqlite-lua vimPlugins.srcery-vim vimPlugins.sslsecure-vim vimPlugins.stan-vim vimPlugins.starsearch-vim vimPlugins.stylishHaskell vimPlugins.suda-vim vimPlugins.surround vimPlugins.sved vimPlugins.swift-vim vimPlugins.symbols-outline-nvim vimPlugins.table-mode vimPlugins.tabmerge vimPlugins.tabnine-vim vimPlugins.taboo-vim vimPlugins.tabpagebuffer vimPlugins.tabpagecd vimPlugins.tagalong-vim vimPlugins.taglist vimPlugins.targets-vim vimPlugins.taskwiki vimPlugins.tcomment_vim vimPlugins.telescope-dap-nvim vimPlugins.telescope-frecency-nvim vimPlugins.telescope-fzf-native-nvim vimPlugins.telescope-fzf-writer-nvim vimPlugins.telescope-fzy-native-nvim vimPlugins.telescope-nvim vimPlugins.telescope-project-nvim vimPlugins.telescope-symbols-nvim vimPlugins.telescope-z-nvim vimPlugins.tender-vim vimPlugins.terminus vimPlugins.termwrapper-nvim vimPlugins.tern_for_vim vimPlugins.thesaurus_query-vim vimPlugins.thumbnail vimPlugins.tlib vimPlugins.tmux-complete-vim vimPlugins.tmuxNavigator vimPlugins.tmuxline-vim vimPlugins.todo-comments-nvim vimPlugins.todo-txt-vim vimPlugins.toggleterm-nvim vimPlugins.tokyonight-nvim vimPlugins.traces-vim vimPlugins.train-nvim vimPlugins.tremor-vim vimPlugins.trouble-nvim vimPlugins.tslime vimPlugins.tsuquyomi vimPlugins.twilight-nvim vimPlugins.typescript-vim vimPlugins.undotree vimPlugins.unicode-vim vimPlugins.unite vimPlugins.utl-vim vimPlugins.vCoolor-vim vimPlugins.vader-vim vimPlugins.verilog_systemverilog-vim vimPlugins.vim-DetectSpellLang vimPlugins.vim-LanguageTool vimPlugins.vim-ReplaceWithRegister vimPlugins.vim-ReplaceWithSameIndentRegister vimPlugins.vim-abolish vimPlugins.vim-addon-actions vimPlugins.vim-addon-async vimPlugins.vim-addon-background-cmd vimPlugins.vim-addon-commenting vimPlugins.vim-addon-completion vimPlugins.vim-addon-errorformats vimPlugins.vim-addon-goto-thing-at-cursor vimPlugins.vim-addon-local-vimrc vimPlugins.vim-addon-manager vimPlugins.vim-addon-mru vimPlugins.vim-addon-mw-utils vimPlugins.vim-addon-nix vimPlugins.vim-addon-other vimPlugins.vim-addon-php-manual vimPlugins.vim-addon-signs vimPlugins.vim-addon-sql vimPlugins.vim-addon-syntax-checker vimPlugins.vim-addon-toggle-buffer vimPlugins.vim2nix vimPlugins.vim-addon-xdebug vimPlugins.vim-after-object vimPlugins.vim-airline-clock vimPlugins.vim-airline-themes vimPlugins.vim-alias vimPlugins.vim-android vimPlugins.vim-anzu vimPlugins.vim-apm vimPlugins.vim-asterisk vimPlugins.vim-auto-save vimPlugins.vim-autoformat vimPlugins.vim-automkdir vimPlugins.vim-autoswap vimPlugins.vim-bazel vimPlugins.vim-bbye vimPlugins.vim-beancount vimPlugins.vim-better-whitespace vimPlugins.vim-bracketed-paste vimPlugins.vim-bsv vimPlugins.vim-buffergator vimPlugins.vim-bufferline vimPlugins.vim-bufkill vimPlugins.vim-capslock vimPlugins.vim-carbon-now-sh vimPlugins.vim-choosewin vimPlugins.vim-clang-format vimPlugins.vim-clap vimPlugins.vim-clojure-highlight vimPlugins.vim-clojure-static vimPlugins.vim-closer vimPlugins.vim-closetag vimPlugins.vim-code-dark vimPlugins.vim-codefmt vimPlugins.vim-colemak vimPlugins.vim-colorschemes vimPlugins.vim-colorstepper vimPlugins.vim-concourse vimPlugins.vim-cool vimPlugins.vim-cpp-enhanced-highlight vimPlugins.vim-crates vimPlugins.vim-csharp vimPlugins.vim-cue vimPlugins.vim-cursorword vimPlugins.vim-dadbod vimPlugins.vim-dadbod-completion vimPlugins.vim-dadbod-ui vimPlugins.vim-dasht vimPlugins.vim-deus vimPlugins.vim-devicons vimPlugins.vim-diminactive vimPlugins.vim-dirdiff vimPlugins.vim-dirvish vimPlugins.vim-dirvish-git vimPlugins.vim-dispatch vimPlugins.vim-dispatch-neovim vimPlugins.vim-docbk vimPlugins.vim-docbk-snippets vimPlugins.vim-easyescape vimPlugins.vim-easytags vimPlugins.vim-elixir vimPlugins.vim-elm-syntax vimPlugins.vim-emoji vimPlugins.vim-endwise vimPlugins.vim-erlang-compiler vimPlugins.vim-erlang-omnicomplete vimPlugins.vim-erlang-runtime vimPlugins.vim-erlang-tags vimPlugins.vim-eunuch vimPlugins.vim-exchange vimPlugins.vim-expand-region vimPlugins.vim-fetch vimPlugins.vim-fireplace vimPlugins.vim-fish vimPlugins.vim-flagship vimPlugins.vim-flake8 vimPlugins.vim-flatbuffers vimPlugins.vim-floaterm vimPlugins.vim-flog vimPlugins.vim-flutter vimPlugins.vim-fsharp vimPlugins.vim-ft-diff_fold vimPlugins.vim-gh-line vimPlugins.vim-ghost vimPlugins.vim-gista vimPlugins.vim-git vimPlugins.vim-gitbranch vimPlugins.vim-github-dashboard vimPlugins.vim-glsl vimPlugins.vim-gnupg vimPlugins.vim-go vimPlugins.vim-grammarous vimPlugins.vim-graphql vimPlugins.vim-grepper vimPlugins.vim-gruvbox8 vimPlugins.vim-gui-position vimPlugins.vim-gutentags vimPlugins.vim-hardtime vimPlugins.vim-haskell-module-name vimPlugins.vim-hcl vimPlugins.vim-hdevtools vimPlugins.vim-helm vimPlugins.vim-hexokinase vimPlugins.vim-highlightedyank vimPlugins.vim-hindent vimPlugins.vim-hocon vimPlugins.vim-html-template-literals vimPlugins.vim-husk vimPlugins.vim-hybrid vimPlugins.vim-hybrid-material vimPlugins.vim-iced-coffee-script vimPlugins.vim-illuminate vimPlugins.vim-indent-guides vimPlugins.vim-indent-object vimPlugins.vim-indentwise vimPlugins.vim-indexed-search vimPlugins.vim-isort vimPlugins.vim-jack-in vimPlugins.vim-janah vimPlugins.vim-javacomplete2 vimPlugins.vim-javascript vimPlugins.vim-javascript-syntax vimPlugins.vim-jinja vimPlugins.vim-jsbeautify vimPlugins.vim-jsdoc vimPlugins.vim-json vimPlugins.vim-jsonnet vimPlugins.vim-jsx-pretty vimPlugins.vim-jsx-typescript vimPlugins.vim-kitty-navigator vimPlugins.vim-lastplace vimPlugins.vim-lawrencium vimPlugins.vim-leader-guide vimPlugins.vim-lean vimPlugins.vim-ledger vimPlugins.vim-lfe vimPlugins.vim-lightline-coc vimPlugins.vim-lion vimPlugins.vim-liquid vimPlugins.vim-localvimrc vimPlugins.vim-logreview vimPlugins.vim-loves-dafny vimPlugins.vim-lsc vimPlugins.vim-lsp vimPlugins.vim-lsp-cxx-highlight vimPlugins.vim-lua vimPlugins.vim-manpager vimPlugins.vim-markbar vimPlugins.vim-markdown vimPlugins.vim-markdown-composer vimPlugins.vim-markdown-toc vimPlugins.vim-matchup vimPlugins.vim-mergetool vimPlugins.vim-merginal vimPlugins.vim-metamath vimPlugins.vim-misc vimPlugins.vim-monokai vimPlugins.vim-monokai-pro vimPlugins.vim-move vimPlugins.vim-mucomplete vimPlugins.vim-mundo vimPlugins.vim-nerdtree-syntax-highlight vimPlugins.vim-nerdtree-tabs vimPlugins.vim-nftables vimPlugins.vim-niceblock vimPlugins.vim-ninja-feet vimPlugins.vim-nix vimPlugins.vim-nong-theme vimPlugins.vim-numbertoggle vimPlugins.vim-obsession vimPlugins.vim-ocaml vimPlugins.vim-one vimPlugins.vim-opencl vimPlugins.vim-operator-replace vimPlugins.vim-operator-surround vimPlugins.vim-operator-user vimPlugins.vim-orgmode vimPlugins.vim-ormolu vimPlugins.vim-osc52 vimPlugins.vim-oscyank vimPlugins.vim-over vimPlugins.vim-packer vimPlugins.vim-pager vimPlugins.vim-pandoc vimPlugins.vim-pandoc-after vimPlugins.vim-pandoc-syntax vimPlugins.vim-parinfer vimPlugins.vim-pasta vimPlugins.vim-peekaboo vimPlugins.vim-pencil vimPlugins.vim-phabricator vimPlugins.vim-pico8-syntax vimPlugins.vim-plug vimPlugins.vim-plugin-AnsiEsc vimPlugins.vim-pony vimPlugins.vim-poweryank vimPlugins.vim-prettier vimPlugins.vim-projectionist vimPlugins.vim-prosession vimPlugins.vim-protobuf vimPlugins.vim-ps1 vimPlugins.vim-pug vimPlugins.vim-puppet vimPlugins.vim-python-pep8-indent vimPlugins.vim-qf vimPlugins.vim-qml vimPlugins.vim-racer vimPlugins.vim-racket vimPlugins.vim-ragtag vimPlugins.vim-rails vimPlugins.vim-rooter vimPlugins.vim-rsi vimPlugins.vim-ruby vimPlugins.vim-salve vimPlugins.vim-sandwich vimPlugins.vim-sayonara vimPlugins.vim-scala vimPlugins.vim-scouter vimPlugins.vim-scriptease vimPlugins.vim-sexp vimPlugins.vim-sexp-mappings-for-regular-people vimPlugins.vim-shellcheck vimPlugins.vim-signify vimPlugins.vim-simpledb vimPlugins.vim-slash vimPlugins.vim-slime vimPlugins.vim-smali vimPlugins.vim-smalls vimPlugins.vim-smoothie vimPlugins.vim-smt2 vimPlugins.vim-sneak vimPlugins.vim-snippets vimPlugins.vim-sort-motion vimPlugins.vim-sourcetrail vimPlugins.vim-speeddating vimPlugins.vim-spirv vimPlugins.vim-startify vimPlugins.vim-startuptime vimPlugins.vim-strip-trailing-whitespace vimPlugins.vim-stylishask vimPlugins.vim-subversive vimPlugins.vim-swap vimPlugins.vim-tbone vimPlugins.vim-terraform vimPlugins.vim-terraform-completion vimPlugins.vim-test vimPlugins.vim-textobj-comment vimPlugins.vim-textobj-function vimPlugins.vim-textobj-haskell vimPlugins.vim-textobj-multiblock vimPlugins.vim-textobj-user vimPlugins.vim-textobj-variable-segment vimPlugins.vim-themis vimPlugins.vim-tmux vimPlugins.vim-tmux-clipboard vimPlugins.vim-tmux-focus-events vimPlugins.vim-togglelist vimPlugins.vim-toml vimPlugins.vim-tpipeline vimPlugins.vim-trailing-whitespace vimPlugins.vim-tsx vimPlugins.vim-twig vimPlugins.vim-twiggy vimPlugins.vim-ultest vimPlugins.vim-unicoder vimPlugins.vim-unimpaired vimPlugins.vim-vagrant vimPlugins.vinegar vimPlugins.vim-visual-increment vimPlugins.vim-visual-multi vimPlugins.vim-visualstar vimPlugins.vim-vsnip vimPlugins.vim-vsnip-integ vimPlugins.vim-vue vimPlugins.vim-wakatime vimPlugins.watchdogs vimPlugins.vim-wayland-clipboard vimPlugins.vim-which-key vimPlugins.vim-wordmotion vimPlugins.vim-wordy vimPlugins.vim-xdebug vimPlugins.vim-xkbswitch vimPlugins.vim-xtabline vimPlugins.vim-yaml vimPlugins.vim-yapf vimPlugins.vim2hs vimPlugins.vim_current_word vimPlugins.vimacs vimPlugins.vimade vimPlugins.vimagit vimPlugins.vimelette vimPlugins.vimfiler-vim vimPlugins.vimoutliner vimPlugins.vimpreviewpandoc vimPlugins.vimproc vimPlugins.vimsence vimPlugins.vimshell vimPlugins.vimspector vimPlugins.vimtex vimPlugins.vimux vimPlugins.vimway-lsp-diag-nvim vimPlugins.vimwiki vimPlugins.vis vimPlugins.vissort-vim vimPlugins.vista-vim vimPlugins.wal-vim vimPlugins.which-key-nvim vimPlugins.wilder-nvim vimPlugins.wildfire-vim vimPlugins.wmgraphviz-vim vimPlugins.wombat256 vimPlugins.workflowish vimPlugins.wstrip-vim vimPlugins.xptemplate vimPlugins.xterm-color-table vimPlugins.yats-vim vimPlugins.zeavim vimPlugins.zenburn vimPlugins.zephyr-nvim vimPlugins.zig-vim vimPlugins.zoomwintab-vim vimacs

@teto teto merged commit ed77db8 into NixOS:master Sep 12, 2021
@teto teto deleted the vim-remove-rtpPath branch September 12, 2021 17:58
@figsoda

This comment has been minimized.

@figsoda

This comment has been minimized.

@teto
Copy link
Member Author

teto commented Sep 12, 2021

will look into it, it looked fine with home-manager. Is this your config https://github.com/figsoda/dotfiles/blob/main/lib/nvim/default.nix ?

@figsoda
Copy link
Member

figsoda commented Sep 12, 2021

I'm sorry I didn't realize my config was not on the same version of nixpkgs, everything is fine now

@rvolosatovs
Copy link
Member

rvolosatovs commented Sep 14, 2021

This PR broke my neovim setup with:

Error detected while processing /nix/store/v9kzjnggildi4871b7133vn80n268qk9-init.vim:
line   49:
E185: Cannot find color scheme 'base16-tomorrow-night'
line  341:
E5108: Error executing lua [string ":lua"]:3: module 'lsp_extensions' not found:
        no field package.preload['lsp_extensions']
        no file '/nix/store/qk5s59q876lln54n5dbicr77zzh0hhqd-luajit-2.1.0-2021-08-12-env/share/lua/5.1/lsp_extensions.lua'
        no file '/nix/store/qk5s59q876lln54n5dbicr77zzh0hhqd-luajit-2.1.0-2021-08-12-env/share/lua/5.1/lsp_extensions/init.lua'
        no file '/nix/store/qk5s59q876lln54n5dbicr77zzh0hhqd-luajit-2.1.0-2021-08-12-env/lib/lua/5.1/lsp_extensions.so'

Config: https://github.com/rvolosatovs/infrastructure/blob/7f301f9375a1df69ec41cbe7c1ad0c11feff9fbc/nixpkgs/neovim/config.nix#L5-L354
Plugins are setup via vim-plug though, which, I believe is the cause: https://github.com/rvolosatovs/infrastructure/blob/7f301f9375a1df69ec41cbe7c1ad0c11feff9fbc/nixpkgs/neovim/default.nix#L8-L47

I'm quite sure we should not be silently breaking setups of everyone depending on supported features.
I propose to either remove the other plugin systems with appropriate documentation on how to migrate (although are we sure that the existing functionality covers all the use cases?) or revert this PR

@teto
Copy link
Member Author

teto commented Sep 14, 2021

There has been changes to both lua and vim infra. Could you share what nixpkgs you are using. Also why are you using vim-plug, your config doesnt seem to take advantage of it ?
I dont think nixpkgs should provide this many options when packpath covers 90% of the needs, it should live in a 3rd party project like home-manager. But I dont want this PR to be the reason why we removed support for it so now I would rather fix the issue than revert that. As a quickfix, you could probably switch to the native packages (you are already using opt, replace configure.plug.plugins with configure.packages.plugins.opt.
https://github.com/rvolosatovs/infrastructure/blob/7f301f9375a1df69ec41cbe7c1ad0c11feff9fbc/nixpkgs/neovim/default.nix#L3

@rvolosatovs
Copy link
Member

Also why are you using vim-plug, your config doesnt seem to take advantage of it ?

The original reason was #56338 (comment)

Could you share what nixpkgs you are using

With neovim built off 8b13843 (parent of this PR merge commit) everything worked fine and off ed77db8 I could reproduce the error.

@midchildan
Copy link
Member

midchildan commented Sep 14, 2021

This PR unfortunately broke my current setup too. I don't use the Nixpkgs Vim wrappers for plugin management and mostly use plain vim-plug to manage plugins outside of Nix. However, for a few plugins that rely on native binaries, I install them through Nix into the user profile and refer to them by path. This approach now seems infeasible because plugins now collide with each other when installed into a single profile.

error: builder for '/nix/store/39z81igy5pclbwaixzbwrzdrkdxjk1bx-home-manager-path.drv' failed with exit code 25;
       last 1 log lines:
       > collision between `/nix/store/ls4jzi8smll06kpbj0fajk970mvwqs1q-vimplugin-coc-cmake-0.1.1/README.md' and `/nix/store/k0apqcjvvadslga711dgdr1q3djxbkhj-vimplugin-coc-clangd-0.14.1/README.md'
       For full logs, run 'nix log /nix/store/39z81igy5pclbwaixzbwrzdrkdxjk1bx-home-manager-path.drv'.
error: 1 dependencies of derivation '/nix/store/1jsdi1grrv69d74gf8wga9injakr4f1i-home-manager-generation.drv' failed to build

@teto teto mentioned this pull request Sep 14, 2021
12 tasks
@teto
Copy link
Member Author

teto commented Sep 14, 2021

@rvolosatovs the vimrc generated by vim-plug looks fine here, for instance the binary from

  nvim_with_plug = neovim.override {
    extraName = "-with-plug";
    configure.plug.plugins = with pkgs.vimPlugins; [
      base16-vim
    ];
    configure.customRC = ''
      color base16-tomorrow-night
      set background=dark
    '';
  };

can load 'base16-tomorrow-night' unlike the error you see (try nix-build -A neovim.tests.run_nvim_with_plug) . I've opened #137885 to look for solutions.

@midchildan you haven't shared your nix expression ? You could generate an init.vim via home-manager (using packpath and all) and in the customrc source another manual file. For instance my neovim config (a frankenstein config) installs plugins via nix/Plug and packer.nvim. See https://github.com/teto/home/blob/2715a6196e167dfa6854dc3257c62073f7aa26ea/hm/profiles/neovim.nix#L453

@midchildan
Copy link
Member

midchildan commented Sep 15, 2021

The Nix expressions I use for (Neo)Vim aren't particularly interesting. I only use it to install Neovim and a handful of plugins with Home Manager's home.packages option.

I'm mostly concerned about this PR effectively disabling the ability to install vim plugins in the same way as other Nix packages, which I believe to be a quite disruptive change. I'm aware that users can work around the new behavior, and if this change becomes permanent, I'd create wrapper packages for each vim plugins I use to simulate previous behavior. However, if the cost of retaining the previous behavior in Nixpkgs is three additional subdirectories in the resulting packages, I'd prefer the previous behavior be restored.

@rvolosatovs
Copy link
Member

@rvolosatovs the vimrc generated by vim-plug looks fine here, for instance the binary from

  nvim_with_plug = neovim.override {
    extraName = "-with-plug";
    configure.plug.plugins = with pkgs.vimPlugins; [
      base16-vim
    ];
    configure.customRC = ''
      color base16-tomorrow-night
      set background=dark
    '';
  };

can load 'base16-tomorrow-night' unlike the error you see (try nix-build -A neovim.tests.run_nvim_with_plug) . I've opened #137885 to look for solutions.

Hmm, weird! In any case, I switched to native plugin manager yesterday (rvolosatovs/nixelium@24d6bca) and so far have not encountered any issues

@teto
Copy link
Member Author

teto commented Sep 15, 2021

Good for you. I will add the test nevertheless and if there is another vim-plug user that has a similar problem, hopefully we can reproduce the issue and I can fix this.

@midchildan nix-env is full of issues and there are dozens of better ways to do this, you can write the path to the nix store directly, you can wrap neovim to see the different binaries, you can generate a packdir via nix and reference it, sometimes configure the plugins to specify a binary, I dont think your usecase should influence the simplification I've made here. This is part of an attempt to automatically hande dependencies of lua plugins in nix.

@midchildan
Copy link
Member

I wasn't referring to nix-env specifically, though. In my case, it's Home Manager.

But that aside, I guess the next ideal solution for me personally would be to create a packdir and link to it in ~/.vim/pack. I'm currently thinking of making changes in Nixpkgs to expose the following code that creates a packdir from Nix packages:

packDir = (packages:
stdenv.mkDerivation {
name = "vim-pack-dir";
src = ./.;
installPhase = lib.concatStringsSep "\n" (lib.flatten (lib.mapAttrsToList packageLinks packages));
preferLocalBuild = true;
}
);

@minijackson
Copy link
Member

Hello!

I think this PR broke help tags for vim plugins. From my investigation, it seems that the move-docs setup hook is called, and moves the $out/doc folder into $out/share/doc, and messes up the vim-gen-doc hook.

Another (really minor) break from my config, is that now every vim plugin now needs to have the pname attribute, which wasn't my case, since I used writeTextDir to generate a plugin on the fly.

Thanks for the work as always!

@teto
Copy link
Member Author

teto commented Sep 16, 2021

thanks for the report. Will try to fix & add a test for this later today.

@teto
Copy link
Member Author

teto commented Sep 16, 2021

@midchildan btw I will make vimUtils.packDir public in my next branch (if you don't want to go through the whole PR thing)

@minijackson this patch should restore the generation of tag

diff --git a/pkgs/misc/vim-plugins/vim-gen-doc-hook.sh b/pkgs/misc/vim-plugins/vim-gen-doc-hook.sh
index cbf666f8b74..d5f0a00ebcc 100644
--- a/pkgs/misc/vim-plugins/vim-gen-doc-hook.sh
+++ b/pkgs/misc/vim-plugins/vim-gen-doc-hook.sh
@@ -5,7 +5,7 @@ echo "Sourcing vim-gen-doc-hook"
 vimPluginGenTags() {
     echo "Executing vimPluginGenTags"
 
-    target="$out/@rtpPath@/$pname"
+    target="$out/@rtpPath@"
     mkdir -p $out/@rtpPath@
 
     # build help tags
@@ -16,7 +16,7 @@ vimPluginGenTags() {
         exit 1
         fi
     else
-        echo "No docs available"
+        echo "No docs available for $target"
     fi

@midchildan
Copy link
Member

midchildan commented Sep 16, 2021

@teto Thanks. Looking forward to it!

@jlesquembre jlesquembre mentioned this pull request Sep 17, 2021
12 tasks
midchildan added a commit to midchildan/dotfiles that referenced this pull request Sep 17, 2021
After NixOS/nixpkgs#136429, vim plugins are no longer installed in
~/.nix-profile/share/vim-plugins. So instead create a packdir and place
it in ~/.vim/pack.

This change also introduces a new Home Manager option,
'dotfiles.vim.plugins.opt' and 'dotfiles.vim.plugins.start' to manage
vim plugins.
@anirudhb
Copy link
Contributor

#138349 should fix the issue for the vim-plug side. Looks like vim-plug doesn't like the /..

stasjok added a commit to stasjok/dotfiles that referenced this pull request Oct 1, 2021
* https://channels.nixos.org/ doesn't have recent enough version yet,
  so I picked Hydra evaluation https://hydra.nixos.org/eval/1709299
  and downloaded nixexprs archive from github.
* They removed /share/vim-plugins prefix from vimPlugins,
  so I can't install separate plugins anymore (they collide with
  each other). For now I'm just using previous nixexprs for vimPlugins.
  See: NixOS/nixpkgs#136429
  Will need to do it differently.
@ben0x539
Copy link
Contributor

ben0x539 commented Oct 2, 2021

ok i quite enjoyed being able to nix-env -i vim plugins

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants