use nvim_get_option_value instead of nvim{,_buf,_win}_get_option

This commit is contained in:
hrsh7th
2024-05-17 22:56:28 +09:00
parent abacd4cb7f
commit 5260e5e8ec
5 changed files with 5 additions and 5 deletions

View File

@@ -43,7 +43,7 @@ context.new = function(prev_context, option)
self.cache = cache.new()
self.prev_context = prev_context or context.empty()
self.option = option or { reason = types.cmp.ContextReason.None }
self.filetype = vim.api.nvim_buf_get_option(0, 'filetype')
self.filetype = vim.api.nvim_get_option_value('filetype', { buf = 0 })
self.time = vim.loop.now()
self.bufnr = vim.api.nvim_get_current_buf()