tamton-aquib / staline.nvim

A modern lightweight statusline and bufferline plugin for neovim in lua.
MIT License
380 stars 17 forks source link

Visual Block Mode not working #69

Closed matofu closed 6 months ago

matofu commented 6 months ago

How do I configure the symbol and color for visual block mode? Whenever I enter the mode, staline uses the default colors and symbols. I looked into staline/config.lua, and tried finding the option for visual block mode, but each one I tried (V and ['']) did not work.

Here is my config:

require('staline').setup({
   defaults = {
      fg = '#292c3c',
      true_colors = true,
      inactive_color = '#babbf1',
      line_column = ' [%l/%L] :%c',
   },

   mode_colors = {
      n = '#8caaee',
      i = '#a6d189',
      ic = '#a6d189',
      c = '#ef9f76',
      v = '#ca9ee6',
   },

   mode_icons = {
      n = 'NORMAL 󰋜 ',
      i = 'INSERT 󰏫 ',
      ic = 'INSERT 󰏫 ',
      c = 'COMMAND  ',
      v = 'VISUAL 󰈈 ',
      V = 'eeeee', -- both of these are not working
      [''] = 'eeee'
   },

   lsp_symbols = {
      Error = ' ',
      Warn = ' ',
      Hint = '󰌶 ',
      Info = '󰋽 ',
   },

   sections = {
      left = { '- ', '-mode', 'left_sep', 'branch' },
      mid  = { 'file_name', 'lsp' },
      right = { 'cool_symbol', 'right_sep', '-line_column', '- ' },
   },

})

require('stabline').setup({
   inactive_fg = '#babbf1',
})

Here is an annotated screenshot:

CleanShot 2024-05-18 at 00 42 01@2x

matofu commented 6 months ago

This is the first ever issue I have ever filed on Github. Sorry if it is bad or unnecessary.

tamton-aquib commented 6 months ago

Heyyo @matofu,

The visual block key in the table can be a bit confusing at first. Basically: "v" is visual mode "V" is visual line mode "" is visual block mode

Visual block is just a unicode character. When inserted into vim, it will show something like ^V.

Try copy pasting this into the visual blocks place:

      [""] = 'eeee'
matofu commented 6 months ago

Thank you! I was so confused. Sorry for the trouble.