Coder Social home page Coder Social logo

Comments (3)

vuki656 avatar vuki656 commented on May 14, 2024

Hey, thanks for opening an issue.

I plan on supporting custom package managers per project in #25, would something similar where you specify the command as well help?

As for the interface, it's a bit tricky since not all package files have the same format, for example, cargo.toml is not in the same format as package.json, so the parsing differs.

It's definitely on the to-do list down the line. I want to provide a great experience for package.json and npm first with deleting/adding/upgrading etc... After that is finished, I'll try to abstract as much functionality as possible and have it work with other languages/package managers. Thanks for the suggestion.

from package-info.nvim.

Anexen avatar Anexen commented on May 14, 2024

I plan on supporting custom package managers per project in #25, would something similar where you specify the command as well help?

Yes, it would be great.

Regarding other languages. I understand that every tool has its own format and now it's hard to support something different from package.json, but we can introduce some abstractions for future use. As soon as there are abstractions for parsing packages and command output, I can help with adding other tools. Here is an example configuration

setup{
   ...
   autostart = true,
   package_managers = {
      ["package.json"] = {
          exe = "npm",
          args = {"--prefix", vim.fn.getcwd() .. "/ui",  "outdated"},
          parser = parsers["package.json"], -- built-in package.json parser
          transformer = transformers["npm"], -- built-in `npm outdated` transformer
      },
      ["Cargo.toml"] = {
          command = "~/.local/bin/cargo"
          args = { "outdated" }, 
          parser = parsers["Cargo.toml"], -- built-in Cargo.toml parser,
          transformer = function ... end -- custom `cargo outdated` transformer
      }
}

from package-info.nvim.

vuki656 avatar vuki656 commented on May 14, 2024

Cool, thanks for the suggestions. I will likely start with abstractions in 3.0. Not sure yet.

from package-info.nvim.

Related Issues (20)

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.