~vigoux/complementree.nvim

b8798de2f559587db72c22fb91cf1ecf4229b9b3 — Thomas Vigouroux 1 year, 25 days ago 66e7d63
chore: remove last parts of teal
7 files changed, 0 insertions(+), 235 deletions(-)

D tlconfig.lua
D types/fzy-lua-native.d.tl
D types/fzy.d.tl
D types/luasnip.d.tl
D types/nvim-treesitter/locals.d.tl
D types/nvim-treesitter/ts_utils.d.tl
D types/types.d.tl
D tlconfig.lua => tlconfig.lua +0 -10
@@ 1,10 0,0 @@
return {
  gen_target = '5.1',
  gen_compat = 'off',
  global_env_def = 'types',
  include_dir = {
    'types', 'teal',
  },
  source_dir = 'teal',
  build_dir = "lua",
}

D types/fzy-lua-native.d.tl => types/fzy-lua-native.d.tl +0 -5
@@ 1,5 0,0 @@
local record Fzy
  score: function(string, string, boolean): integer
end

return Fzy

D types/fzy.d.tl => types/fzy.d.tl +0 -17
@@ 1,17 0,0 @@
local record Fzy
  type Choices = record<M>
    add_incremental: function(Choices<M>, {M})
    available: function(Choices<M>): integer
    elements: function(Choices<M>): {{M, integer}}
    search: function(Choices<M>, string)
    selected: function(Choices<M>): M, integer
    next: function(Choices<M>): M, integer
    prev: function(Choices<M>): M, integer
    get: function(Choices<M>, integer): M
  end

  create: function<M>({M}): Choices<M>
  match: function(string, string): number, {integer}
end

return Fzy

D types/luasnip.d.tl => types/luasnip.d.tl +0 -17
@@ 1,17 0,0 @@
local record Luasnip
  record Snippet
    description: {string}
    name: string
    regTrig: boolean
    trigger: string
    wordTrig: boolean
  end

  available: function(): {string: {Snippet}}
  expandable: function(): boolean
  expand: function()
  lsp_expand: function(string)
  get_active_snip: function(): Snippet
end

return Luasnip

D types/nvim-treesitter/locals.d.tl => types/nvim-treesitter/locals.d.tl +0 -17
@@ 1,17 0,0 @@

local record TSLocals
  record LocalCapture
    record Captured
      node: vim.treesitter.TSNode
    end
    var: Captured|nil
    ['function']: Captured|nil
    associated: Captured|nil
    parameter: Captured|nil
  end

  get_definitions: function(integer): {LocalCapture}
  iter_scope_tree: function(vim.treesitter.TSNode, integer|nil): {vim.treesitter.TSNode}
end

return TSLocals

D types/nvim-treesitter/ts_utils.d.tl => types/nvim-treesitter/ts_utils.d.tl +0 -7
@@ 1,7 0,0 @@
local record TSUtils
  get_node_at_cursor: function(integer|nil, boolean|nil): vim.treesitter.TSNode
  get_root_for_position: function(integer, integer, vim.treesitter.TSTree|nil): vim.treesitter.TSNode
  is_in_node_range: function(vim.treesitter.TSNode, integer, integer): boolean
end

return TSUtils

D types/types.d.tl => types/types.d.tl +0 -162
@@ 1,162 0,0 @@
global record CompleteExtraInfo
  source: string
  extra: any
end

global record CompleteItem
  word: string
  abbr: string|nil
  menu: string|nil
  info: string|nil
  kind: string|nil
  icase: integer|nil
  equal: integer|nil
  dup: integer|nil
  empty: integer|nil
  user_data: CompleteExtraInfo
end

global type Source = function(string, integer): {CompleteItem}, string
global type Pipe = function(Source): Source
global type Completor = function(string, integer): boolean

global record vim
  record fn
    record Tag
      name: string
      filename: string
      cmd: string
      kind: string
      static: string
    end

    taglist: function(string, string|nil): {Tag}
    pumvisible: function(): integer
    match: function(string|{string}, string, integer, integer): integer
    mode: function(): string
    getcwd: function(): string
    complete: function(integer, {CompleteItem})
    reverse: function<T>({T}): {T}
  end

  record api
    nvim_feedkeys: function(string, string, boolean)
    nvim_err_writeln: function(string)
    nvim_get_current_buf: function(): integer
    nvim_get_current_line: function(): string
    nvim_replace_termcodes: function(string, boolean, boolean, boolean): string
    nvim_set_option: function(string, any)
    nvim_get_option: function(string): any
    nvim_get_vvar: function(string): any
    nvim_buf_get_option: function(integer, string): any
    nvim_buf_get_lines: function(integer, integer, integer, boolean): {string}
    nvim_buf_set_text: function(integer, integer, integer, integer, integer, {string})
    nvim_win_set_cursor: function(integer, {integer, integer})
    nvim_win_get_cursor: function(integer): {integer, integer}
  end

  record lsp

    record LspPosition
      line: integer
      character: integer
    end

    record LspRange
      start: LspPosition
      ["end"]: LspPosition
    end

    record LspTextEdit
      range: LspRange
      newText: string
    end

    record LspCompletionItem
      label: string
      detail: string|nil
      textEdit: LspTextEdit
      insertTextFormat: integer|nil
      insertText: string|nil
      additionalTextEdits: {LspTextEdit}
      kind: integer
    end

    record LspResult
      result: any
      err: string|nil
    end

    record LspClient
      request_sync: function(string, any, integer, integer): LspResult
      offset_encoding: string|nil
      record server_capabilities
        record completionProvider
          resolveProvider: boolean
        end
      end
    end


    record util
      apply_text_edits: function({LspTextEdit}, integer, string)
      make_position_params: function(): any
      extract_completion_items: function(any): {LspCompletionItem}
    end

    record protocol
      CompletionItemKind: {integer:string}
    end

    buf_request_sync: function(integer, string, any): {integer:LspResult}, string|nil
    get_client_by_id: function(integer): LspClient
  end

  record loop
    record FSIterator
    end
    fs_scandir: function(string): FSIterator
    fs_scandir_next: function(FSIterator): string|nil, string
  end

  record treesitter
    record TSTree
    end

    record TSNode
      named_descendant_for_range: function(TSNode, integer, integer, integer, integer): TSNode
      type: function(TSNode): string
    end

    record TSQuery
      captures: {integer: string}

      iter_captures: function(TSQuery, TSNode, integer, integer|nil, integer|nil, integer|nil, integer|nil): function(): integer, TSNode
    end

    record query
      parse: function(string, string): TSQuery
    end

    get_node_text: function(TSNode, integer|nil): string
  end

  schedule: function(function())
  startswith: function(string, string): boolean
  endswith: function(string, string): boolean
  str_byteindex: function(string, integer, boolean|nil): integer

  tbl_deep_extend: function(string, ...: table): table
  tbl_map: function<T>(function(T), {T})

  list_extend: function<T>({T}, {T}, integer|nil, integer|nil): {T}

  notify: function(string)
  pretty_print: function(...: any)
  inspect: function(...: any): string
  print: function(...: any)
end

global record jit
  os: string
end