mirror of
https://github.com/stevearc/aerial.nvim
synced 2024-09-16 14:34:08 +02:00
parent
5b788392ec
commit
aad9d05b8c
3 changed files with 5 additions and 0 deletions
|
@ -72,6 +72,9 @@ M.elixir = {
|
|||
local identifier = (utils.get_at_path(match, "identifier") or {}).node
|
||||
if identifier then
|
||||
local name = vim.treesitter.query.get_node_text(identifier, bufnr) or "<parse error>"
|
||||
if name == "defp" then
|
||||
item.scope = "private"
|
||||
end
|
||||
item.kind = M.elixir.kind_map[name] or item.kind
|
||||
if name == "callback" and item.parent then
|
||||
item.parent.kind = "Interface"
|
||||
|
|
|
@ -14,6 +14,7 @@ local config = require("aerial.config")
|
|||
---@field parent? aerial.Symbol
|
||||
---@field selection_range? aerial.Range
|
||||
---@field children? aerial.Symbol[]
|
||||
---@field scope? string
|
||||
|
||||
---@class aerial.BufData
|
||||
---@field bufnr integer
|
||||
|
|
|
@ -34,6 +34,7 @@ describe("treesitter elixir", function()
|
|||
kind = "Function",
|
||||
name = "private_function",
|
||||
level = 1,
|
||||
scope = "private",
|
||||
lnum = 10,
|
||||
col = 2,
|
||||
end_lnum = 11,
|
||||
|
|
Loading…
Reference in a new issue