1

Cleanup config

This commit is contained in:
Alex Yatskov 2024-04-20 12:16:54 -07:00
parent c0f5d2dfeb
commit dd92d559c8
2 changed files with 6 additions and 6 deletions

View File

@ -14,7 +14,7 @@ local configs = {
} }
} }
local function set_filetype_opts(opts, filetypes) local function set(opts, filetypes)
if opts then if opts then
if type(filetypes) == 'string' then if type(filetypes) == 'string' then
filetypes = {filetypes} filetypes = {filetypes}
@ -36,7 +36,7 @@ local function set_filetype_opts(opts, filetypes)
end end
end end
local function get_filetype_opts() local function get()
local file_config = configs[vim.bo.filetype] local file_config = configs[vim.bo.filetype]
local config = {} local config = {}
@ -54,6 +54,6 @@ local function get_filetype_opts()
end end
return { return {
set_filetype_opts = set_filetype_opts, set = set,
get_filetype_opts = get_filetype_opts, get = get,
} }

View File

@ -1,7 +1,7 @@
local config = require('argonaut.config') local config = require('argonaut.config')
local function setup(opts, filetypes) local function setup(opts, filetypes)
config.set_filetype_opts(opts, filetypes) config.set(opts, filetypes)
end end
local function get_cursor_pos() local function get_cursor_pos()
@ -226,7 +226,7 @@ local function parse_brace_range_params(brace_range)
end end
local function wrap_brace_range(brace_range) local function wrap_brace_range(brace_range)
local opts = config.get_filetype_opts() local opts = config.get()
vim.fn.setline(brace_range.row1, brace_range.indent .. brace_range.prefix) vim.fn.setline(brace_range.row1, brace_range.indent .. brace_range.prefix)