diff options
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() |