From 706a60acba69cd6174f197be7d023c2ab1876b58 Mon Sep 17 00:00:00 2001 From: Cody Hiar Date: Wed, 8 Sep 2021 10:53:01 -0600 Subject: removed mode in status line --- init.lua | 36 +++--------------------------------- 1 file changed, 3 insertions(+), 33 deletions(-) (limited to 'init.lua') diff --git a/init.lua b/init.lua index f068e9d..d8f8a66 100644 --- a/init.lua +++ b/init.lua @@ -96,7 +96,7 @@ map('i', 'jj', '', options) -- Visually select last copied text map('n', 'gp', "`[v`]", options) -map('n', 'ps', 'PackerSync', options) +map('n', 'ps', 'source ~/.config/nvim/init.luaPackerSync', options) map('n', 'ff', 'Telescope find_files', options) map('n', 'fb', 'Telescope buffers', options) map('n', 'fj', 'Telescope jumplist', options) @@ -151,39 +151,9 @@ map('n', 'm', 'Ranger', options) map('n', 'n', 'RangerWorkingDirectory', options) map('', 's', 'HopChar2', options) --- Status Line --- https://icyphox.sh/blog/nvim-lua/ -local mode_map = { - ['n'] = 'normal', - ['no'] = 'n·operator pending', - ['v'] = 'visual', - ['V'] = 'v·line', - [''] = 'v·block', - ['s'] = 'select', - ['S'] = 's·line', - [''] = 's·block', - ['i'] = 'insert', - ['R'] = 'replace', - ['Rv'] = 'v·replace', - ['c'] = 'command', - ['cv'] = 'vim ex', - ['ce'] = 'ex', - ['r'] = 'prompt', - ['rm'] = 'more', - ['r?'] = 'confirm', - ['!'] = 'shell', - ['t'] = 'terminal' -} - -local function mode() - local m = vim.api.nvim_get_mode().mode - if mode_map[m] == nil then return m end - return '[' .. mode_map[m] .. '] ' -end -local stl = { +local status_line = { '%#PrimaryBlock#', - mode(), '%#SecondaryBlock#', '%#Blanks#', '%f', @@ -195,7 +165,7 @@ local stl = { '%{&filetype}', } -vim.o.statusline = table.concat(stl) +vim.o.statusline = table.concat(status_line) return require('packer').startup(function() -- cgit v1.2.3