diff options
author | Cody Hiar <cody@hiar.ca> | 2021-09-08 10:53:01 -0600 |
---|---|---|
committer | Cody Hiar <cody@hiar.ca> | 2021-09-08 10:53:01 -0600 |
commit | 706a60acba69cd6174f197be7d023c2ab1876b58 (patch) | |
tree | 5bc546cbb4fdd062a981df572d8aa07d050f1957 /init.lua | |
parent | 9a17fc3c26a351cd5bdd20351b9ab3ff0ca2e4cb (diff) |
removed mode in status line
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 36 |
1 files changed, 3 insertions, 33 deletions
@@ -96,7 +96,7 @@ map('i', 'jj', '<esc>', options) -- Visually select last copied text map('n', 'gp', "`[v`]", options) -map('n', '<leader>ps', '<cmd>PackerSync<cr>', options) +map('n', '<leader>ps', '<cmd>source ~/.config/nvim/init.lua<cr><cmd>PackerSync<cr>', options) map('n', '<leader>ff', '<cmd>Telescope find_files<cr>', options) map('n', '<leader>fb', '<cmd>Telescope buffers<cr>', options) map('n', '<leader>fj', '<cmd>Telescope jumplist<cr>', options) @@ -151,39 +151,9 @@ map('n', '<leader>m', '<cmd>Ranger<cr>', options) map('n', '<leader>n', '<cmd>RangerWorkingDirectory<cr>', options) map('', '<leader>s', '<cmd>HopChar2<cr>', 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() |