Browse Source

option for user to configure the cmdheight and number_width as per their liking. (#764)

* few of my changes

* option for user configuration of cmdheight and number_width
Ramiz Sarfaraj 4 năm trước cách đây
mục cha
commit
5e2a0df7ef
2 tập tin đã thay đổi với 4 bổ sung1 xóa
  1. 2 0
      lua/default-config.lua
  2. 2 1
      lua/settings.lua

+ 2 - 0
lua/default-config.lua

@@ -12,6 +12,8 @@ O = {
   wrap_lines = false,
   number = true,
   relative_number = true,
+  number_width = 4,
+  cmdheight = 2,
   cursorline = true,
   shell = "bash",
   timeoutlen = 100,

+ 2 - 1
lua/settings.lua

@@ -23,7 +23,7 @@ vim.g.colors_name = O.colorscheme
 
 opt.backup = false -- creates a backup file
 opt.clipboard = "unnamedplus" -- allows neovim to access the system clipboard
-opt.cmdheight = 2 -- more space in the neovim command line for displaying messages
+opt.cmdheight = O.cmdheight -- more space in the neovim command line for displaying messages
 opt.colorcolumn = "99999" -- fix indentline for now
 opt.completeopt = { "menuone", "noselect" }
 opt.conceallevel = 0 -- so that `` is visible in markdown files
@@ -56,5 +56,6 @@ opt.tabstop = 4 -- insert 4 spaces for a tab
 opt.cursorline = O.cursorline -- highlight the current line
 opt.number = O.number -- set numbered lines
 opt.relativenumber = O.relative_number -- set relative numbered lines
+opt.numberwidth = O.number_width -- set number column width to 2 {default 4}
 opt.signcolumn = "yes" -- always show the sign column, otherwise it would shift the text each time
 opt.wrap = O.wrap_lines -- display lines as one long line