nvim indent
This commit is contained in:
parent
4d78079475
commit
57537c8370
@ -2,4 +2,4 @@ local opt = vim.opt_local
|
|||||||
|
|
||||||
opt.tabstop = 2
|
opt.tabstop = 2
|
||||||
opt.softtabstop = 2
|
opt.softtabstop = 2
|
||||||
opt.shiftwidth = 2
|
opt.shiftwidth = vim.bo.tabstop
|
||||||
|
|||||||
@ -29,9 +29,9 @@ opt.hidden = true
|
|||||||
|
|
||||||
opt.expandtab = true -- spaces instead of tab
|
opt.expandtab = true -- spaces instead of tab
|
||||||
opt.smarttab = true
|
opt.smarttab = true
|
||||||
opt.tabstop = 4 -- 1 tab = .tabstop spaces
|
opt.tabstop = 4 -- 1 tab appears number spaces
|
||||||
opt.softtabstop = 4
|
opt.softtabstop = 4
|
||||||
opt.shiftwidth = 4 -- width of 1 tab in spaces
|
opt.shiftwidth = vim.bo.tabstop -- insert tab or shift inserting .shiftwidth*.tabstop spaces or .shiftwidth/.tabstop tabs
|
||||||
opt.autoindent = true
|
opt.autoindent = true
|
||||||
opt.smartindent = true
|
opt.smartindent = true
|
||||||
opt.showtabline = 2
|
opt.showtabline = 2
|
||||||
|
|||||||
@ -15,11 +15,10 @@ function get_formatted_virtual_env()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function detect_indent_type()
|
function detect_indent_type()
|
||||||
local shiftwidth = vim.bo.shiftwidth
|
|
||||||
if vim.bo.expandtab then
|
if vim.bo.expandtab then
|
||||||
return shiftwidth .. " spaces"
|
return "indent: " .. vim.bo.tabstop .. "s"
|
||||||
else
|
else
|
||||||
return shiftwidth .. " tab"
|
return "indent: " .. 1 .. "t = " .. vim.bo.tabstop .. "s"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user