Comments (3)
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.
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.
Cool, thanks for the suggestions. I will likely start with abstractions in 3.0
. Not sure yet.
from package-info.nvim.
Related Issues (20)
- Remove internal json lib usage and use vim.json
- Nest hide options under one option
- Yarn workspaces support HOT 1
- Fetch and display repo release notes HOT 1
- Loading hook in vim-airline HOT 4
- Bug trying to edit a `package.json` with unsaved changes HOT 3
- [BUG] Not in valid package.json file | after refactor HOT 2
- [BUG]: Once a package.json is loaded, every buffer after shows that it is invalid HOT 2
- [BUG] It does nothing HOT 40
- [FEATURE REQUEST] Support nvim-notify HOT 4
- [BUG] setting wrong colors HOT 7
- [FEATURE REQUEST] Update Readme keymap config examples with description HOT 1
- [FEATURE REQUEST] add option to configure the order of detection of package manager HOT 3
- [FEATURE REQUEST] Support monorepo. HOT 3
- [BUG] Plugin doesn't work when lazy loaded HOT 1
- [FEATURE REQUEST] fire autocmd on loading status change HOT 1
- [FEATURE REQUEST] support for bun HOT 1
- [BUG] remove icon for `require('package-info').get_status()` HOT 2
- [BUG] Spinner "not included" HOT 2
- [BUG] Error when key contained in dependencies and devDependencies HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from package-info.nvim.