added relativenumber option & statusline option (#279)
This commit is contained in:
parent
e663122638
commit
fa965c9797
|
@ -13,6 +13,7 @@ M.ui = {
|
||||||
hidden_statusline = {
|
hidden_statusline = {
|
||||||
-- these are filetypes, not pattern matched
|
-- these are filetypes, not pattern matched
|
||||||
"NvimTree",
|
"NvimTree",
|
||||||
|
-- "terminal",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,6 +28,8 @@ M.options = {
|
||||||
timeoutlen = 400,
|
timeoutlen = 400,
|
||||||
clipboard = "unnamedplus",
|
clipboard = "unnamedplus",
|
||||||
number = true,
|
number = true,
|
||||||
|
-- relative numbers in normal mode tool at the bottom of options.lua
|
||||||
|
relativenumber = false,
|
||||||
numberwidth = 2,
|
numberwidth = 2,
|
||||||
expandtab = true,
|
expandtab = true,
|
||||||
shiftwidth = 2,
|
shiftwidth = 2,
|
||||||
|
|
|
@ -13,7 +13,7 @@ M.ui = {
|
||||||
hidden_statusline = {
|
hidden_statusline = {
|
||||||
-- these are filetypes, not pattern matched
|
-- these are filetypes, not pattern matched
|
||||||
"NvimTree",
|
"NvimTree",
|
||||||
"toggleterm",
|
-- "terminal",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,6 +28,7 @@ M.options = {
|
||||||
timeoutlen = 400,
|
timeoutlen = 400,
|
||||||
clipboard = "unnamedplus",
|
clipboard = "unnamedplus",
|
||||||
number = true,
|
number = true,
|
||||||
|
relativenumber = false,
|
||||||
numberwidth = 2,
|
numberwidth = 2,
|
||||||
expandtab = true,
|
expandtab = true,
|
||||||
shiftwidth = 2,
|
shiftwidth = 2,
|
||||||
|
|
|
@ -27,7 +27,7 @@ opt.fillchars = { eob = " " }
|
||||||
-- Numbers
|
-- Numbers
|
||||||
opt.number = options.number
|
opt.number = options.number
|
||||||
opt.numberwidth = options.numberwidth
|
opt.numberwidth = options.numberwidth
|
||||||
-- opt.relativenumber = true
|
opt.relativenumber = options.relativenumber
|
||||||
|
|
||||||
-- Indenline
|
-- Indenline
|
||||||
opt.expandtab = options.expandtab
|
opt.expandtab = options.expandtab
|
||||||
|
@ -67,8 +67,15 @@ for _, plugin in pairs(disabled_built_ins) do
|
||||||
g["loaded_" .. plugin] = 1
|
g["loaded_" .. plugin] = 1
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Don't show status line on certain windows
|
-- Use relative & absolute line numbers in 'n' & 'i' modes respectively
|
||||||
|
-- vim.cmd[[ au InsertEnter * set norelativenumber ]]
|
||||||
|
-- vim.cmd[[ au InsertLeave * set relativenumber ]]
|
||||||
|
|
||||||
|
-- Don't show any numbers inside terminals
|
||||||
vim.cmd [[ au TermOpen term://* setlocal nonumber norelativenumber ]]
|
vim.cmd [[ au TermOpen term://* setlocal nonumber norelativenumber ]]
|
||||||
|
|
||||||
|
-- Don't show status line on certain windows
|
||||||
|
vim.cmd [[ au TermOpen term://* setfiletype terminal ]]
|
||||||
vim.cmd [[ let hidden_statusline = luaeval('require("chadrc").ui.hidden_statusline') | autocmd BufEnter,BufWinEnter,WinEnter,CmdwinEnter,TermEnter * nested if index(hidden_statusline, &ft) >= 0 | set laststatus=0 | else | set laststatus=2 | endif ]]
|
vim.cmd [[ let hidden_statusline = luaeval('require("chadrc").ui.hidden_statusline') | autocmd BufEnter,BufWinEnter,WinEnter,CmdwinEnter,TermEnter * nested if index(hidden_statusline, &ft) >= 0 | set laststatus=0 | else | set laststatus=2 | endif ]]
|
||||||
|
|
||||||
-- Open a file from its last left off position
|
-- Open a file from its last left off position
|
||||||
|
|
Loading…
Reference in New Issue