-
-
Notifications
You must be signed in to change notification settings - Fork 13.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
vim-utils: remove vim-addon-manager support #179039
Conversation
c069af8
to
c3540ce
Compare
@MarcWeber You are the main one concerned. You've invested some time in this implementation so I dont want to remove it without your consent. My reason for removing this is that it's the second time I can't do some modification because we support 4 plugins systems for vim. See my first post too. |
@rlupton20 @vquintin I search github with "vam.knownPlugins" and found out you were using vam https://github.com/rlupton20/dotfiles/blob/e81ee1ec9623ee3d0eda99345f0b0e36ce617c16/vim.nix and https://github.com/vquintin/dotfiles/blob/bbd100b999024001ff0021f06b3a5869c8388aa0/nix/.nixpkgs/packages/dev/vim_custom/default.nix . Any hindsight ? you dont seem to use any vam specific feature so would you be fine with me discarding vam to ease the maintainance of vim-related infra in nixpkgs ? |
having this many (complex) options not only is hard to maintain but I cant see the benefit of these options now that vim supports packages
I am going ahead and we can revert if it proves to nag too many users but I would like to avoid that. |
This is an old dotfiles repository. I moved it off github. |
You need to understand that maintaining 4+ managers should be no brainer MarcWeber/vim-addon-manager#188 Having an addon-info.json file allowing dependencies to be declared However packadd fails on differentiating install / load time. The nix code allows having vim-for-user-x and many x. So what exactly is your issue with VAM - why is it causing trouble ? When I created VAM there was no community lead there was no manager. VAM has flaws:
The json based file I thought might look like this.
My past is like
Each time wasting time and pain to write the code. Summing up: https://github.com/MarcWeber/nix-comment-updater So check it out provide feedback. But how to package YouCompleteMe correctly ? So its kind of nightmare. The fix is creating a new platform which Then people would 'fix' the packages and it would just work. If you're intersted on discussing this level let me know. I don't mind VAM being removed. I'll keep local patches. And if you want to unify the mess you need to start on a different level. Pathogen didn't run helptags at the beginning but its what more users knew. I also tried making it easier for the Vim community to organize itself But reality is that Shougas manager was written cause he didnn't know about |
thanks for taking the time to reply.
I've helped with maintaining the (neo)vim nixpkgs infra for a few years and I find this untrue. I've changed (ie., shortened) the path towards nixpkgs-installed and it broke vim-plug. Now I want to associate a specific config to a plugin but it meant updating the 4 package managers which is painful for me. I tried to do so and was able for the others but because vam is so confidential (sorry but I've never met anyone using it, and there was no nixpkgs complaint since its removal, there might be in the next stable release though), I could not muster the courage to do so. So much choice is also not great for if these plugin managers were just maintaing runtimepath then nixpkgs doesn't need them. Like you I am also interested in plugin dependencies, and I have something working that I presented here: |
@teto sorry for the thread necromancy, but i just wanted to point out that the (Ran into this updating my (private repo) system flake to nixos-22.11 and it suddenly is warning about my use of |
BTW: I recently updated vim-addon-manager to allow loading plugin/*.lua code at runtime after startup. Works great :) VAM is simple. It allows defining a function where plugins are found. And it allows giving plugins a name. So you can install by name or by github:name/foo and you can use VAMActivate at any time startup or lazily after having started up. The only problem is that it doesn't install in parallel. But the questions are somewhat different I have. What's the best way to manage Vim on windows without Nix :-) The reason why VAM was cool in the past was allowing to activate stuff as needed at runtime. And that feature still works and also works with neovim and lua files now. But what plugins are that slow today and still in use ? So what's the minimal plugin manager ? Why use one at all ? Why not just set runtimepath and be done then? What I enjoyed was being able to install by name without having to lookup url cause VAM gets vim-pi which translates names to known github urls (which is biased maybe hard to maintain) Whats left eventually is mappings. Activate plugins and mappings only when you need. So the only main use case which is left is like activating vim-addon-sql to run sql queries but had autoload UI Back to you: Do you have use cases for loading plugins at runtime ? I will / can keep vam as private patch. Don't worry about me. Now I have tons of small plugins where I use VAM to activate the others. So I use it as modular sharable vimrc snippets today I can activate by name at runtime. |
The minmial plugin support for to support loading plugins is 1) set runtime path (For startup activation) 2) glob -> source for activation after startup. The glob lines in vim-addon-manager can be found easily. And :helptags is important for documentation (must be run at installation ?). That's all I know which is needed basically. There is another case for lazy activating plugins: Its snippets. Sometimes depending on template engine you use you might want to use and activate different snippet files. That's something which can be done by rtp or by the addon manager cause many engines just look at &rtp and add /snippets. And the question would be how shoud a user be able to activate a referenced plugins installed to store without having to type /nix/store/... ? use github:foo/bar like syntax or even what VAM provides -> name rewriting :) But is it a use case worth taking care of ? So the minimal VIML or lua code to make this all work can be looked up at VAM handling RTP. The big question is: Is it worth having aliases for cases like snippets. Are there cases you activate code at runtime and how do you as user want to call it. And I totally kinda agree that how managers handle post installation hooks (each in his own way) is kinda complicated. And that YCM on Windows eventually requires to be recompiled for each virtual env (?) is yet another story. Does it apply to Linux as well ? .. and ... I feel its not about VAM. Its more about discussing what features are worth preserving / keeping rather than dropping/adding one addon manager. https://github.com/MarcWeber/vim-addon-manager/blob/master/autoload/vam.vim#L315 Are the most relevant lines to reimplement a nix-vim-plugin manager stripped down to the bare minimum. So its less than 25 lines probably. Additionally to that VAM maps a plugin name to a file location to find out whether it exists. So what's important to me is
And VIM kinda allows all. But I agree that the minimal features and the extended features There could be some more cases. Like opening .nim files with Vim says its filetype is .conf. Even for .ts I didn't get typescript. So if you want to change Vim's behavior for filetypes cause the extension is used by multiple languages doing so in a local vimrc (eg vim-addon-local-vimrc) or at runtime eg using VAMActivate might be helpful to some. |
Description of changes
It's hard to maintain this complex software and I dont see the advantages yet, now that vim supports "packages". Even if that were the case it could live somewhere else than nixpkgs, e.g., a vim-specific flake.
#56338
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes