-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
vimPlugins: Refactor coc-* plugins and fix coc-go #96993
Conversation
There are 32 vim plugins, all related to the coc.nvim LSP plugin, that are actually node packages and are included in nodePackages. In NixOS#82578, those vim plugins were made to point at the corresponding node packages, which fixed issues where the sources weren't being compiled properly with Javascript build systems. The way each of those vim plugins wraps its corresponding node package is identical, so I factored that out into a function and eliminated the duplication. In addition, for some reason coc-go got missed, which led to it not working correctly for me. I included it in my list of packages to wrap, so that fixes that issue.
Because these plugins use the node packages as their source, there's no reason to pull their sources from GitHub only to have it be overriden. This will trigger the removal of these plugins from generated.nix the next time update.py is run.
I realized this accomplishes the same thing as #82723, but also does the refactor and removes them from vim-plugin-names. |
I also think this would resolve #64560, or rather, that it has already been resolved except for the issue of |
do you mind adding some documentation to the vimplugin docs which mention the exception around coc node modules? |
Yup I can do that. |
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.
diff LGTM
gets rid of a bunch of boilerplate
https://github.com/NixOS/nixpkgs/pull/96993
25 packages built:
vimPlugins.clang_complete vimPlugins.coc-explorer vimPlugins.coc-go vimPlugins.coc-markdownlint vimPlugins.completion-nvim vimPlugins.csv-vim vimPlugins.denite-nvim vimPlugins.deol-nvim vimPlugins.nvim-lspconfig vimPlugins.nvim-treesitter vimPlugins.tagbar vimPlugins.vim-clap vimPlugins.vim-dirvish vimPlugins.vim-floaterm vimPlugins.vim-flutter vimPlugins.vim-html-template-literals vimPlugins.vim-lsp vimPlugins.vim-monokai vimPlugins.vim-polyglot vimPlugins.vim-sneak vimPlugins.vim-test vimPlugins.vim-vsnip vimPlugins.vimspector vimPlugins.vimtex vimPlugins.zenburn
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.
Generally looks good to me, though I'm not very familiar with how coc was handled in the past and I have never used it.
]; | ||
nodePackage2VimPackage = name: buildVimPluginFrom2Nix { | ||
pname = name; | ||
inherit (nodePackages.${name}) version; |
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.
Would it make sense to inherit meta
(description and license) as well?
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.
Oh that's a very good idea.
@jbaum98 Right now CoC plugins can be accessed via |
Yes, they'll still be available in |
@gvolpe Yea, I re-did my home-manager off this PR and it seems that the plugin names have stayed "the same" |
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.
LGTM
Result of nixpkgs-review pr 96993 1
25 packages built:
- vimPlugins.clang_complete
- vimPlugins.coc-explorer
- vimPlugins.coc-go
- vimPlugins.coc-markdownlint
- vimPlugins.completion-nvim
- vimPlugins.csv-vim
- vimPlugins.denite-nvim
- vimPlugins.deol-nvim
- vimPlugins.nvim-lspconfig
- vimPlugins.nvim-treesitter
- vimPlugins.tagbar
- vimPlugins.vim-clap
- vimPlugins.vim-dirvish
- vimPlugins.vim-floaterm
- vimPlugins.vim-flutter
- vimPlugins.vim-html-template-literals
- vimPlugins.vim-lsp
- vimPlugins.vim-monokai
- vimPlugins.vim-polyglot
- vimPlugins.vim-sneak
- vimPlugins.vim-test
- vimPlugins.vim-vsnip
- vimPlugins.vimspector
- vimPlugins.vimtex
- vimPlugins.zenburn
Wait! I wanted to inherit |
that shouldn't cause any rebuilds, :) just open a PR! xD |
sorry, I'm trying to do a "last call" of merges before branchoff |
Motivation for this change
I had an issue getting
coc-go
to work.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)Result of
nixpkgs-review
125 packages built:
- vimPlugins.Tagbar (vimPlugins.tagbar)
- vimPlugins.clang_complete
- vimPlugins.coc-explorer
- vimPlugins.coc-go
- vimPlugins.coc-markdownlint
- vimPlugins.completion-nvim
- vimPlugins.csv (vimPlugins.csv-vim)
- vimPlugins.denite (vimPlugins.denite-nvim)
- vimPlugins.deol-nvim
- vimPlugins.nvim-lspconfig
- vimPlugins.nvim-treesitter
- vimPlugins.polyglot (vimPlugins.vim-polyglot)
- vimPlugins.vim-clap
- vimPlugins.vim-dirvish
- vimPlugins.vim-floaterm
- vimPlugins.vim-flutter
- vimPlugins.vim-html-template-literals
- vimPlugins.vim-lsp
- vimPlugins.vim-monokai
- vimPlugins.vim-sneak
- vimPlugins.vim-test
- vimPlugins.vim-vsnip
- vimPlugins.vimspector
- vimPlugins.vimtex
- vimPlugins.zenburn