Git Product home page Git Product logo

dep's People

Contributors

luaneko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

dep's Issues

Problem with-- [function] Code to run after the package is loaded into neovim.

require "SetupDep.bootstrap"
require "dep"{
'echasnovski/mini.nvim',
function()
require 'mini.starter'.setup({})
end,
}

--require 'mini.starter'.setup({})

when I run the first part I get ..
[dep] ...pData\Local\nvim-data\site\pack\deps\opt\dep/lua/dep.lua:120: ...pData\Local\nvim-data\site\pack\deps\opt\dep/lua/dep.lua:16: attempt to index local 'id' (a function value) (spec=<function 1>)

When I comment out the function and use require 'mini.starter'.setup({})
everything runs fine.
Am I missing something?
Thx

disable = true prevents packages from being installed and updated

According to the readme:

-- [boolean] Prevents the package from being loaded
disable = true

This implies that marking a package as disabled only prevents it from being loaded into neovim. But it also stops the package from being installed and updated. Is this the intended behavior?

Request: Git command inherit Neovim's environment variables

Problem:
I have some use cases where I want to customize git behavior through either user configuration file or environment variables. Then I found git command spawned by "dep" (through vim.loop.spawn) is not affected by any of those methods. After some digging, I found the environment of the git command is basically empty (by looking at /proc/[pid of git command]/environ file). Thus it's ignoring environment variables, and also ignoring user configuration due to lack of $HOME definition.

(The use case is that I would like to use proxy for git, through http.proxy setting or external commands like proxychains)

Expected:
Git command inherits whatever environment variables Neovim has.

I hope this does not require too much extra work for you, possibly is there another API to do this automatically?

'Loaded' function should be triggered before 'Config' function in plugin spec.

{
  -- [string] Specifies the full name of the package.
  -- This is the only required field; all other fields are optional.
  "user/package",

  -- This should be triggered every time the package is loaded
  -- [function] Code to run after the package is loaded into neovim.
  function()
    require "package".setup(...)
  end,

  -- This should be triggered after install or update 
  -- AFTER the loaded function is triggered
  -- [function] Code to run after the package is installed or updated.
  config = function()
    os.execute(...)
  end,
}

Currently to the best of my ability to tell it appears that config() is ran as soon as the plugin is updated, as in as soon as the new git is pulled or similar. Instead it should be called once the plugin is actually loaded.

As an example my mason spec currently looks like this:

return {
	"williamboman/mason.nvim",
	function()
		require("mason").setup()
	end,
	config = function()
		require("mason").setup()
		vim.cmd("MasonUpdate")
	end,
}

Because the config function is being executed before the 'loaded' function I need to manually load the plugin twice, once if it updates, then a second time for when it would normally be loaded.

This does appear to function fine (although running a plugins setup function twice could possible cause issues with other plugins that I haven't tried) but I feel like this is a much nicer pattern:

return {
	"williamboman/mason.nvim",
	function()
		require("mason").setup()
	end,
	config = function()
		vim.cmd("MasonUpdate")
	end,
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.