mirror of
https://github.com/neovim/neovim.git
synced 2026-03-30 04:12:01 +00:00
docs: news #38464
This commit is contained in:
@@ -23,16 +23,13 @@ local M = {}
|
||||
---
|
||||
--- ```lua
|
||||
--- vim.ui.select({ 'tabs', 'spaces' }, {
|
||||
--- prompt = 'Select tabs or spaces:',
|
||||
--- format_item = function(item)
|
||||
--- return "I'd like to choose " .. item
|
||||
--- end,
|
||||
--- prompt = 'Select tabs or spaces:',
|
||||
--- format_item = function(item)
|
||||
--- return ('I choose %s!'):format(item)
|
||||
--- end,
|
||||
--- }, function(choice)
|
||||
--- if choice == 'spaces' then
|
||||
--- vim.o.expandtab = true
|
||||
--- else
|
||||
--- vim.o.expandtab = false
|
||||
--- end
|
||||
--- vim.o.expandtab = choice == 'spaces'
|
||||
--- vim.print(('Selected "%s" => expandtab=%s'):format(choice, vim.o.expandtab))
|
||||
--- end)
|
||||
--- ```
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user