1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 20:10:05 +08:00
SpaceVim/bundle/cmp-path
2024-03-15 22:15:55 +08:00
..
after/plugin feat(autocomplete): add nvim-cmp support 2022-01-01 22:13:13 +08:00
lua/cmp_path docs(bundle): update bundle-plugins page 2024-03-15 22:15:55 +08:00
LICENSE feat(autocomplete): add nvim-cmp support 2022-01-01 22:13:13 +08:00
README.md docs(bundle): update bundle-plugins page 2024-03-15 22:15:55 +08:00

cmp-path

nvim-cmp source for filesystem paths.

Setup

require'cmp'.setup {
  sources = {
    { name = 'path' }
  }
}

Configuration

The below source configuration options are available. To set any of these options, do:

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.