Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nvim-telescope/telescope-node-modules.nvim
An extension that provides its users with node packages under node_modules directory
https://github.com/nvim-telescope/telescope-node-modules.nvim
Last synced: about 1 month ago
JSON representation
An extension that provides its users with node packages under node_modules directory
- Host: GitHub
- URL: https://github.com/nvim-telescope/telescope-node-modules.nvim
- Owner: nvim-telescope
- Created: 2021-01-27T12:31:35.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-07T02:34:36.000Z (over 2 years ago)
- Last Synced: 2024-05-22T17:30:43.471Z (4 months ago)
- Language: Lua
- Size: 18.6 KB
- Stars: 31
- Watchers: 5
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# telescope-node-modules.nvim
`telescope-node-modules` is an extension for [telescope.nvim][] that provides its users with node packages under `node_modules/` dir.
[telescope.nvim]: https://github.com/nvim-telescope/telescope.nvim
## Installation
```lua
use{
'nvim-telescope/telescope.nvim',
requires = {
'nvim-telescope/telescope-node-modules.nvim',
},
config = function()
require'telescope'.load_extension'node_modules'
end,
}
```## Usage
### list
`:Telescope node_modules list`
List packages under `node_modules` of the current directory. In default, it does actions below when you input keys.
| key | action |
|-------------------|----------------------|
| `` (edit) | `builtin.find_files` |
| `` (split) | `:chdir` to the dir |
| `` (vsplit) | `:lchdir` to the dir |
| `` (tabedit) | `:tchdir` to the dir |#### options
##### `cwd`
Transform the result paths into relative ones with this value as the base dir.
Default value: `vim.fn.getcwd()`
## TODO
* [ ] Asynchronous directory reading
* [x] Show dependency levels of packages
* [ ] More info from `package.json`