99--- @field label_trailing_slash boolean
1010--- @field get_cwd fun ( context : blink.cmp.Context ): string
1111--- @field show_hidden_files_by_default boolean
12+ --- @field ignore_root_slash boolean
1213
1314--- @class blink.cmp.Source
1415--- @field opts blink.cmp.PathOpts
@@ -23,12 +24,14 @@ function path.new(opts)
2324 label_trailing_slash = true ,
2425 get_cwd = function (context ) return vim .fn .expand ((' #%d:p:h' ):format (context .bufnr )) end ,
2526 show_hidden_files_by_default = false ,
27+ ignore_root_slash = false ,
2628 })
2729 require (' blink.cmp.config.utils' ).validate (' sources.providers.path' , {
2830 trailing_slash = { opts .trailing_slash , ' boolean' },
2931 label_trailing_slash = { opts .label_trailing_slash , ' boolean' },
3032 get_cwd = { opts .get_cwd , ' function' },
3133 show_hidden_files_by_default = { opts .show_hidden_files_by_default , ' boolean' },
34+ ignore_root_slash = { opts .ignore_root_slash , ' boolean' },
3235 }, opts )
3336
3437 self .opts = opts
@@ -43,7 +46,7 @@ function path:get_completions(context, callback)
4346
4447 local lib = require (' blink.cmp.sources.path.lib' )
4548
46- local dirname = lib .dirname (self .opts . get_cwd , context )
49+ local dirname = lib .dirname (self .opts , context )
4750 if not dirname then return callback ({ is_incomplete_forward = false , is_incomplete_backward = false , items = {} }) end
4851
4952 local include_hidden = self .opts .show_hidden_files_by_default
0 commit comments