Skip to content

Commit c9c390b

Browse files
committed
Various tweaks
1 parent 944a155 commit c9c390b

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

.config/nvim/init.lua

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ opt.smartcase = true
178178
opt.infercase = true
179179

180180
-- Display
181-
opt.list = true
181+
opt.list = false
182182
opt.listchars = { tab = '» ', extends = '', precedes = '', nbsp = '·', trail = '·' }
183183
opt.matchtime = 2
184184
opt.showmatch = true
@@ -242,7 +242,8 @@ map('n', '\\a', ':set formatoptions-=a<CR>:echo "autowrap disabled"<CR>')
242242
map('n', '\\b', ':set nocin tw=80<CR>:set formatoptions+=a<CR>')
243243

244244
-- Tab settings
245-
map('n', '\\M', ':set noexpandtab tabstop=8 softtabstop=4 shiftwidth=4<CR>')
245+
map('n', '\\M', ':set noexpandtab tabstop=4 softtabstop=4 shiftwidth=4<CR>')
246+
map('n', '\\N', ':set noexpandtab tabstop=2 softtabstop=2 shiftwidth=2<CR>')
246247
map('n', '\\T', ':set expandtab tabstop=8 shiftwidth=8 softtabstop=4<CR>')
247248
map('n', '\\m', ':set expandtab tabstop=2 shiftwidth=2 softtabstop=2<CR>')
248249
map('n', '\\t', ':set expandtab tabstop=4 shiftwidth=4 softtabstop=4<CR>')
@@ -254,6 +255,7 @@ map('n', '\\q', ':nohlsearch<CR>')
254255
map('n', '\\s', ':setlocal invspell<CR>')
255256
map('n', '\\u', ':setlocal list!<CR>:setlocal list?<CR>')
256257
map('n', '\\w', ':setlocal wrap!<CR>:setlocal wrap?<CR>')
258+
map('n', '\\R', ':source $MYVIMRC<CR>:echo "init.lua reloaded"<CR>')
257259
map('n', '\\x', ':cclose<CR>')
258260
map('n', '\\z', ':w<CR>:!open %<CR><CR>')
259261

@@ -571,8 +573,8 @@ pcall(function()
571573
require('lualine').setup({
572574
options = {
573575
theme = 'onedark',
574-
component_separators = { left = '|', right = '|' },
575-
section_separators = { left = '', right = '' },
576+
component_separators = { left = '', right = '' },
577+
section_separators = { left = '\u{e0b0}', right = '\u{e0b2}' },
576578
disabled_filetypes = {
577579
statusline = { 'NvimTree' },
578580
},
@@ -581,7 +583,16 @@ pcall(function()
581583
lualine_a = { 'mode' },
582584
lualine_b = { 'branch', 'diff', 'diagnostics' },
583585
lualine_c = { 'filename' },
584-
lualine_x = { 'encoding', 'fileformat', 'filetype' },
586+
lualine_x = {
587+
function()
588+
if vim.bo.expandtab then
589+
return 'spaces:' .. vim.bo.shiftwidth
590+
else
591+
return 'tab:' .. vim.bo.tabstop
592+
end
593+
end,
594+
'encoding', 'fileformat', 'filetype',
595+
},
585596
lualine_y = { 'progress' },
586597
lualine_z = { 'location' },
587598
},

0 commit comments

Comments
 (0)