Skip to content

Commit

Permalink
update class names
Browse files Browse the repository at this point in the history
  • Loading branch information
pynappo committed Jan 2, 2025
1 parent 550aec8 commit 2671f76
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions lua/neo-tree/sources/document_symbols/lib/client_filters.lua
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---Utilities function to filter the LSP servers
local utils = require("neo-tree.utils")

---@alias Neotree.LspRespRaw table<integer,{err: lsp.ResponseError?, result: any}>
---@alias neotree.LspRespRaw table<integer,{err: lsp.ResponseError?, result: any}>
local M = {}

---@alias FilterFn fun(client_name: string): boolean

---Filter clients
---@param filter_type "first" | "all"
---@param filter_fn FilterFn
---@param resp Neotree.LspRespRaw
---@param resp neotree.LspRespRaw
---@return table<string, any>
local filter_clients = function(filter_type, filter_fn, resp)
if resp == nil or type(resp) ~= "table" then
Expand Down Expand Up @@ -51,7 +51,7 @@ local ignore = function(ignore)
end

---Main entry point for the filter
---@param resp Neotree.LspRespRaw
---@param resp neotree.LspRespRaw
---@return table<string, any>
M.filter_resp = function(resp)
return {}
Expand Down
4 changes: 2 additions & 2 deletions lua/neo-tree/sources/document_symbols/lib/kinds.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ local kinds_id_to_name = {

local kinds_map = {}

---@class Neotree.LspKindDisplay
---@class neotree.LspKindDisplay
---@field name string Display name
---@field icon string Icon to render
---@field hl string Highlight for the node

---Get how the kind with kind_id should be rendered
---@param kind_id integer the kind_id to be render
---@return Neotree.LspKindDisplay res
---@return neotree.LspKindDisplay res
M.get_kind = function(kind_id)
local kind_name = kinds_id_to_name[kind_id]
return vim.tbl_extend(
Expand Down
16 changes: 8 additions & 8 deletions lua/neo-tree/sources/document_symbols/lib/symbols_utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@ local M = {}
---@alias Loc integer[] a location in a buffer {row, col}, 0-indexed
---@alias LocRange { start: Loc, ["end"]: Loc } a range consisting of two loc

---@class Neotree.SymbolExtra
---@class neotree.SymbolExtra
---@field bufnr integer the buffer containing the symbols,
---@field kind Neotree.LspKindDisplay the kind of each symbol
---@field kind neotree.LspKindDisplay the kind of each symbol
---@field selection_range LocRange the symbol's location
---@field position Loc start of symbol's definition
---@field end_position Loc start of symbol's definition

---@class Neotree.SymbolNode see
---@class neotree.SymbolNode see
---@field id string
---@field name string name of symbol
---@field path string buffer path - should all be the same
---@field type "root"|"symbol"
---@field children Neotree.SymbolNode[]
---@field extra Neotree.SymbolExtra additional info
---@field children neotree.SymbolNode[]
---@field extra neotree.SymbolExtra additional info

---Parse the lsp.Range
---@param range lsp.Range the lsp.Range object to parse
Expand Down Expand Up @@ -85,7 +85,7 @@ end
---containing additional information.
---@param resp_node lsp.DocumentSymbol|lsp.SymbolInformation the LSP response node
---@param id string the id of the current node
---@return Neotree.SymbolNode symb_node the parsed tree
---@return neotree.SymbolNode symb_node the parsed tree
local function parse_resp(resp_node, id, state, parent_search_path)
-- parse all children
local children = {}
Expand All @@ -95,7 +95,7 @@ local function parse_resp(resp_node, id, state, parent_search_path)
table.insert(children, child_node)
end

---@type Neotree.SymbolNode
---@type neotree.SymbolNode
local symbol_node = {
id = id,
name = resp_node.name,
Expand Down Expand Up @@ -125,7 +125,7 @@ local function parse_resp(resp_node, id, state, parent_search_path)
end

---Callback function for lsp request
---@param lsp_resp Neotree.LspRespRaw the response of the lsp client
---@param lsp_resp neotree.LspRespRaw the response of the lsp client
---@param state table the state of the source
local on_lsp_resp = function(lsp_resp, state)
if lsp_resp == nil or type(lsp_resp) ~= "table" then
Expand Down

0 comments on commit 2671f76

Please sign in to comment.