Skip to content

Commit 860575a

Browse files
committed
Removed global scope argument from nvim_get_option_value
1 parent 76bdb0c commit 860575a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lua/markdown-toc/utils.lua

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ function M.process_heading(content, filepath, heading_level_to_match)
2727
local current_buffer = vim.api.nvim_buf_get_name(0)
2828
local relative_path = get_relative_path(current_buffer, filepath)
2929

30-
local expandtab =
31-
vim.api.nvim_get_option_value('expandtab', { scope = 'global' })
30+
local expandtab = vim.api.nvim_get_option_value('expandtab', {})
3231

3332
for _, line in ipairs(lines) do
3433
local heading_level, heading_text = line:match('^(#+)%s*(.+)')
@@ -37,8 +36,7 @@ function M.process_heading(content, filepath, heading_level_to_match)
3736

3837
local indent = string.rep('\t', level)
3938
if expandtab then
40-
local tabstop =
41-
vim.api.nvim_get_option_value('tabstop', { scope = 'global' })
39+
local tabstop = vim.api.nvim_get_option_value('tabstop', {})
4240
indent = string.rep(' ', level * tabstop)
4341
end
4442

0 commit comments

Comments
 (0)