summaryrefslogtreecommitdiffstats
path: root/.config/nvim/lua/statusline.lua
blob: d510532d33e522a58fc406256d5ab89ea36736a0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
-- Lua statusline imported into the main init

local fn = vim.fn
local api = vim.api

local modes = {
  ["n"] = "NORMAL",
  ["no"] = "NORMAL",
  ["v"] = "VISUAL",
  ["V"] = "VISUAL LINE",
  [""] = "VISUAL BLOCK",
  ["s"] = "SELECT",
  ["S"] = "SELECT LINE",
  [""] = "SELECT BLOCK",
  ["i"] = "INSERT",
  ["ic"] = "INSERT",
  ["R"] = "REPLACE",
  ["Rv"] = "VISUAL REPLACE",
  ["c"] = "COMMAND",
  ["cv"] = "VIM EX",
  ["ce"] = "EX",
  ["r"] = "PROMPT",
  ["rm"] = "MOAR",
  ["r?"] = "CONFIRM",
  ["!"] = "SHELL",
  ["t"] = "TERMINAL",
}

-- Original Statusline
vim.cmd [[
  set statusline=
  set statusline+=%7*\[%n]                                  "buffernr
  set statusline+=%1*\ %<%t\                                "File+path
  set statusline+=%3*\ %y\                                  "FileType
  set statusline+=%4*\ %{''.(&fenc!=''?&fenc:&enc).''}      "Encoding
  set statusline+=%5*\ %{(&bomb?\",BOM\":\"\")}\            "Encoding2
  set statusline+=%6*\ %{&ff}\                              "FileFormat (dos/unix..)
  set statusline+=%7*\ %=\ row:%l/%L\ (%03p%%)\             "Rownumber/total (%)
  set statusline+=%9*\ col:%03c\                            "Colnr
  set statusline+=%0*\ %m%r%w\                             "Modified? Readonly? Top/bot.
]]
--