mirror of
https://github.com/neovim/neovim.git
synced 2024-09-17 20:58:20 -04:00
Merge cfeea6dec7
into a0d8c2b86e
This commit is contained in:
commit
5c5e2528a5
@ -153,7 +153,8 @@ end
|
||||
|
||||
---@param w integer
|
||||
---@param b integer
|
||||
local function set_dev_properties(w, b)
|
||||
---@param opts nil|{ indent: integer? }
|
||||
local function set_dev_properties(w, b, opts)
|
||||
vim.wo[w].scrolloff = 5
|
||||
vim.wo[w].wrap = false
|
||||
vim.wo[w].foldmethod = 'expr'
|
||||
@ -164,6 +165,11 @@ local function set_dev_properties(w, b)
|
||||
vim.bo[b].buftype = 'nofile'
|
||||
vim.bo[b].bufhidden = 'wipe'
|
||||
vim.bo[b].filetype = 'query'
|
||||
|
||||
opts = opts or {}
|
||||
if opts.indent then
|
||||
vim.bo[b].shiftwidth = opts.indent
|
||||
end
|
||||
end
|
||||
|
||||
--- Updates the cursor position in the inspector to match the node under the cursor.
|
||||
@ -354,7 +360,7 @@ function M.inspect_tree(opts)
|
||||
vim.b[buf].dev_inspect = w
|
||||
vim.b[b].dev_base = win -- base window handle
|
||||
vim.b[b].disable_query_linter = true
|
||||
set_dev_properties(w, b)
|
||||
set_dev_properties(w, b, { indent = treeview.opts.indent })
|
||||
|
||||
local title --- @type string?
|
||||
local opts_title = opts.title
|
||||
|
Loading…
Reference in New Issue
Block a user