Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hrsh7th/cmp-path
nvim-cmp source for path
https://github.com/hrsh7th/cmp-path
nvim-cmp
Last synced: about 2 months ago
JSON representation
nvim-cmp source for path
- Host: GitHub
- URL: https://github.com/hrsh7th/cmp-path
- Owner: hrsh7th
- License: mit
- Created: 2021-08-03T14:50:23.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-05T09:42:46.000Z (10 months ago)
- Last Synced: 2024-06-25T22:41:42.435Z (3 months ago)
- Topics: nvim-cmp
- Language: Lua
- Homepage:
- Size: 41 KB
- Stars: 560
- Watchers: 12
- Forks: 54
- Open Issues: 32
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cmp-path
nvim-cmp source for filesystem paths.
# Setup
```lua
require'cmp'.setup {
sources = {
{ name = 'path' }
}
}
```## Configuration
The below source configuration options are available. To set any of these options, do:
```lua
cmp.setup({
sources = {
{
name = 'path',
option = {
-- Options go into this table
},
},
},
})
```### trailing_slash (type: boolean)
_Default:_ `false`
Specify if completed directory names should include a trailing slash. Enabling this option makes this source behave like Vim's built-in path completion.
### label_trailing_slash (type: boolean)
_Default:_ `true`
Specify if directory names in the completion menu should include a trailing slash.
### get_cwd (type: function)
_Default:_ returns the current working directory of the current buffer
Specifies the base directory for relative paths.