Skip to content

Commit

Permalink
fix: docs access to value
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioRibera committed Dec 26, 2023
1 parent c6434d3 commit 650d286
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lua/cmp-dotenv/dotenv.lua
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,16 @@ function M.as_completion()
end
local opts = option.get()

for key, value in pairs(M.env_variables) do
for key, v in pairs(M.env_variables) do
table.insert(M.completion_items, {
label = key,
-- Evaluate the environment variable if `eval_on_confirm` is true
insertText = opts.eval_on_confirm and value or key,
insertText = opts.eval_on_confirm and v.value or key,
word = key,
-- Show documentation if `show_documentation_window` is true
documentation = opts.show_documentation and {
kind = opts.documentation_kind,
value = value.docs .. '\n\nContent: ' .. value,
value = v.docs .. '\n\nContent: ' .. v.value,
},
kind = opts.item_kind,
})
Expand Down

0 comments on commit 650d286

Please sign in to comment.