~vigoux/complementree.nvim

ed0b4505538956341d299ecab50d7705fa94e82f — Thomas Vigouroux 2 years ago d4a0036
fix(treesitter): use a more generic prefix
2 files changed, 2 insertions(+), 2 deletions(-)

M lua/complementree/sources.lua
M teal/complementree/sources.tl
M lua/complementree/sources.lua => lua/complementree/sources.lua +1 -1
@@ 388,7 388,7 @@ function Sources.treesitter_matches(opts)
   local _config = options.get({}, opts)

   return cached('treesitter', function(line_to_cursor, _lnum)
      local prefix = utils.prefix.vim_keyword(line_to_cursor)
      local prefix = utils.prefix.lua_regex('%S*$', line_to_cursor)
      local defs = tslocals.get_definitions(0)

      local items = {}

M teal/complementree/sources.tl => teal/complementree/sources.tl +1 -1
@@ 388,7 388,7 @@ function Sources.treesitter_matches(opts: TreesitterOptions): Source
  local _config = options.get({} as TreesitterOptions, opts)

  return cached('treesitter', function(line_to_cursor: string, _lnum: integer): {CompleteItem}, string
    local prefix = utils.prefix.vim_keyword(line_to_cursor)
    local prefix = utils.prefix.lua_regex('%S*$', line_to_cursor)
    local defs = tslocals.get_definitions(0)

    local items: {CompleteItem} = {}