1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
--- @module pasta.config
--- 設定モジュール
---
--- @pasta_config(pasta.toml)から設定値を取得するためのラッパーモジュール。
--- セクションとキーを指定して設定値を取得し、存在しない場合はデフォルト値を返す。
---
--- @usage
--- local config = require("pasta.config")
--- local value = config.get("ghost", "spot_newlines", 1.5)
-- @pasta_configはRust側で登録されるモジュール
-- テスト環境など利用不可の場合は空テーブルを使用
local ok, pasta_config = pcall
if not ok
--- @class PastaConfig
local PASTA_CONFIG =
--- 設定値を取得
---
--- @param section string セクション名(必須)
--- @param key string キー名
--- @param default any デフォルト値(設定が存在しない場合に返す)
--- @return any 設定値またはデフォルト値
return PASTA_CONFIG