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 plugins #61796

Merged
merged 5 commits into from May 22, 2019
Merged

Vim plugins #61796

merged 5 commits into from May 22, 2019

Conversation

teto
Copy link
Member

@teto teto commented May 21, 2019

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Copy link
Member

@timokau timokau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any idea about the darwin failure?

pkgs/misc/vim-plugins/overrides.nix Outdated Show resolved Hide resolved
sha256 = "0cqgrfyaq9nck1y6mb63gmwgdrxqzgdgns5gjshpp1xzfq6asrqj";
};
in super.coc-nvim.overrideAttrs(old: {
# you still need to enable the node js provider in your nvim config
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any way to notify the user of this at runtime? Could be confusing otherwise.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be happy to know but I can't think of any. Ideally the vim infrastructure could enrich the vimrc config. Might be possible after my neovim PR but that will take ages and coc.nvim is really really good so even if it can only be managed imperatively it's a fundation :p

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't we patch coc.nvim?

My fear is that users try to install it and then lose a lot of time debugging before they find that comment.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe one could patch coc.nvim g:coc_node_path but I don't think we should as it's best to use the nodejs provider in neovim (I don't know how it works on vim, maybe they just set g:coc_node_path): it means setting neovim with withNodeJs.
Anyway you can't get anything with this kind of plugins out of the box, so anyway the users will have to configure them. I would rather spend time on #55635

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean it feels hackish while solving very little (and maybe add confusion as to why the neovim node provider isn't used). It's not possible to provide an out of the box experience for coc.nvim. If you want I can add some documentation on the wiki.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought more in the direction of giving a useful error message when the user hasn't made the appropriate configuration changes.

Anyway you can't get anything with this kind of plugins out of the box

So this is the case with e.g. vim-plug too, not just a nix issue?

Anyway, I don't want to block this. Feel free to merge if you think this is fine as is.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wish I could enforce the config but it's not possible yet so let's merge.
You can run :checkhealth for warnings.
It's an LSP plugin, actually the most popular so user have to configure the language servers anyway/possibly install yarn to get extensions so it's involving see #56091 . Rather than having it sit for too long, let's start small and improve things little by little.

@teto
Copy link
Member Author

teto commented May 21, 2019

the darwin failure is quite strange, there does not seem to be any warning :s a fluke ?

teto added 5 commits May 21, 2019 22:47
Also factorized version so that it needs to be changed in only one location.
you still need to enable the node js provider in your nvim config
yarn is optional.
Run :checkhealth within neovim if you have any doubt.
@teto
Copy link
Member Author

teto commented May 21, 2019

@GrahamcOfBorg build vimPlugins.LanguageClient-neovim, vimPlugins.coc-nvim, vimPlugins.nvim-hs-vim, vimPlugins.vim-lion

@teto
Copy link
Member Author

teto commented May 21, 2019

the rebase fixed the failure. @timokau Ready to merge IMO

@teto teto merged commit 86d2c68 into NixOS:master May 22, 2019
@teto teto deleted the vimPlugins branch May 22, 2019 13:00
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.

None yet

2 participants