aboutsummaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authorCody Hiar <cody@hiar.ca>2021-09-08 10:53:01 -0600
committerCody Hiar <cody@hiar.ca>2021-09-08 10:53:01 -0600
commit706a60acba69cd6174f197be7d023c2ab1876b58 (patch)
tree5bc546cbb4fdd062a981df572d8aa07d050f1957 /init.lua
parent9a17fc3c26a351cd5bdd20351b9ab3ff0ca2e4cb (diff)
removed mode in status line
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua36
1 files changed, 3 insertions, 33 deletions
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', '<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()