Skip to content

Commit

Permalink
Add Options class annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
monkoose committed Apr 1, 2024
1 parent 77ad296 commit 24e6e7a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
10 changes: 10 additions & 0 deletions lua/neocodeium/options.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
---@class Options
---@field enabled boolean
---@field bin? string
---@field manual boolean
---@field server { api_url?: string, portal_url?: string }
---@field log_file? string
---@field show_label boolean
---@field max_lines integer
---@field filetypes table<string, boolean>
local defaults = {
enabled = true,
bin = nil,
Expand All @@ -17,6 +26,7 @@ local defaults = {
local M = { options = {} }

function M.setup(opts)
---@type Options
M.options = vim.tbl_deep_extend("force", defaults, opts or {})
end

Expand Down
1 change: 0 additions & 1 deletion lua/neocodeium/renderer.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
-- Imports ------------------------------------------------- {{{1

local log = require("neocodeium.log")
local utils = require("neocodeium.utils")
local types = require("neocodeium.types")
local options = require("neocodeium.options").options
Expand Down

0 comments on commit 24e6e7a

Please sign in to comment.