summary refs log tree commit diff
path: root/.vim/lua/line.lua
diff options
context:
space:
mode:
authorRobert Günzler <r@gnzler.io>2021-02-20 21:27:26 +0100
committerRobert Günzler <r@gnzler.io>2021-04-26 02:09:43 +0200
commit1996ef15613f2d4773017128bba1a719a1b63a19 (patch)
treeaa291b56947f0f710c96c62758990de3b2939bba /.vim/lua/line.lua
parent30451238df36d238fea816f01ca987853c6562a5 (diff)
Move to lua based vimrc
Diffstat (limited to '.vim/lua/line.lua')
-rw-r--r--.vim/lua/line.lua146
1 files changed, 0 insertions, 146 deletions
diff --git a/.vim/lua/line.lua b/.vim/lua/line.lua
deleted file mode 100644
index 278782f..0000000
--- a/.vim/lua/line.lua
+++ /dev/null
@@ -1,146 +0,0 @@
--- statusline
-
-local gl  = require('galaxyline')
-local gls = gl.section
-local gcolors = require('galaxyline.colors')
-
-local colors = {
-  blue = '#5fafd7',
-  orange = '#d7875f',
-  purple = '#af87d7',
-  yellow = '#d7af5f',
-
-  black = '#1c1c1c',
-  grey_dim = '#3a3a3a',
-  grey_dimmer = '#262626',
-  white = '#d0d0d0',
-  white_dim = '#bdc0ba',
-}
-
-local style = {
-  left = {
-    sep = ' ',
-    sep_hl = {colors.white, colors.black},
-  },
-  right = {
-    hl = {colors.white,colors.grey_dimmer},
-    sep = ' ',
-    sep_hl = {colors.grey_dim, colors.grey_dimmer},
-  }
-}
-
-local empty_buffer = function()
-  if vim.fn.empty(vim.fn.expand('%:t')) ~= 1 then
-    return true
-  end
-    return false
-end
-
-local space = function() return ' ' end
-
-gls.left[1] = {
-  ViMode = {
-    provider = function()
-      local m = vim.fn.mode()
-      if m == 'n' then
-        gcolors.set_highlight('GalaxyViMode', {colors.white, colors.grey_dim, 'bold'})
-      elseif m == 'i' then
-        gcolors.set_highlight('GalaxyViMode', {colors.black, colors.blue, 'bold'})
-      elseif m == 'v' or m == 'V' or m == 'CTRL-V' then
-        gcolors.set_highlight('GalaxyViMode', {colors.black, colors.purple, 'bold'})
-      elseif m == 's' or m == 'S' or m == 'CTRL-S' then
-        gcolors.set_highlight('GalaxyViMode', {colors.black, '#ff0000', 'bold'})
-      elseif m == 'R' or m == 'Rc' or m == 'Rv' or m == 'Rx' then
-        gcolors.set_highlight('GalaxyViMode', {colors.black, colors.orange, 'bold'})
-      elseif m == 'c' then
-        gcolors.set_highlight('GalaxyViMode', {colors.yellow, colors.grey_dim, 'bold,italic'})
-      end
-      return '  ' .. m:gsub("^%l*$", string.upper) .. ' '
-    end,
-    separator = style.left.sep,
-    separator_highlight = style.left.sep_hl,
-  },
-}
-
-gls.left[2] = {
-  FileName = {
-    provider = function()
-      local file = vim.fn.expand('%:t')
-      if vim.fn.empty(file) == 1 then return '' end
-      if vim.bo.readonly then
-        return file .. ' '
-      end
-      if vim.o.modifiable then
-        if vim.bo.modified then
-          return file .. ' +'
-        end
-      end
-      return file .. ' '
-    end,
-    condition = empty_buffer,
-    highlight = {colors.white,colors.grey_dimmer},
-    separator = style.left.sep,
-    separator_highlight = style.left.sep_hl,
-  }
-}
-
--- ########################################################## --
-
-gls.right[1] = {
-  Indent = {
-    provider = function()
-      local res = vim.o.expandtab and '→' or '␣'
-      return res
-        .. ' '
-        .. 'ts=' .. vim.o.tabstop
-        .. ' '
-        .. 'sw=' .. vim.o.shiftwidth
-    end,
-    highlight = style.right.hl,
-  },
-}
-
-gls.right[2] = {
-  BufNum = {
-    icon = '% ',
-    provider = function()
-      local nbufs = #vim.fn.getbufinfo({buflisted = 1})
-      local res = vim.fn.bufnr('%') .. '(' .. nbufs .. ')'
-      if vim.fn.tabpagenr() > 1 then
-        res = res .. ':' .. vim.fn.tabpagenr()
-      end
-      return res
-    end,
-    highlight = style.right.hl,
-    separator = style.right.sep,
-    separator_highlight = style.right.sep_hl,
-  },
-}
-
-gls.right[3] = {
-  LineColumn = {
-    icon = ' ',
-    provider = 'LineColumn',
-    highlight = style.right.hl,
-    separator = style.right.sep,
-    separator_highlight = style.right.sep_hl,
-  },
-}
-
-gls.right[4] = {
-  LinePercent = {
-    provider = 'LinePercent',
-    highlight = style.right.hl,
-    separator = style.right.sep,
-    separator_highlight = style.right.sep_hl,
-  }
-}
-
-gls.right[5] = {
-  BufferType = {
-    provider = function() return '  ' .. vim.bo.filetype .. ' ' end,
-    highlight = {colors.white,colors.grey_dim,'bold'},
-    -- separator = style.right.sep,
-    -- separator_highlight = style.right.sep_hl,
-  }
-}