diff options
-rw-r--r-- | lua/startup/themes/default.lua | 1 | ||||
-rw-r--r-- | lua/startup/themes/evil_startup.lua | 1 | ||||
-rw-r--r-- | lua/startup/themes/startify.lua | 1 | ||||
-rw-r--r-- | lua/startup/utils.lua | 13 | ||||
-rw-r--r-- | readme.md | 3 |
5 files changed, 17 insertions, 2 deletions
diff --git a/lua/startup/themes/default.lua b/lua/startup/themes/default.lua index 1e80dfc..1041ecf 100644 --- a/lua/startup/themes/default.lua +++ b/lua/startup/themes/default.lua @@ -59,6 +59,7 @@ local settings = { options = { mapping_keys = true, + cursor_column = 0.5, empty_lines_between_mappings = true, disable_statuslines = true, paddings = { 1, 3, 3, 0 }, diff --git a/lua/startup/themes/evil_startup.lua b/lua/startup/themes/evil_startup.lua index 390ba83..d417cbf 100644 --- a/lua/startup/themes/evil_startup.lua +++ b/lua/startup/themes/evil_startup.lua @@ -106,6 +106,7 @@ local settings = { options = { mapping_keys = true, + cursor_column = 0.5, empty_lines_between_mappings = true, disable_statuslines = true, paddings = { 0, 1, 1, 1, 1, 1, 1 }, diff --git a/lua/startup/themes/startify.lua b/lua/startup/themes/startify.lua index 0a335b3..3744a51 100644 --- a/lua/startup/themes/startify.lua +++ b/lua/startup/themes/startify.lua @@ -55,6 +55,7 @@ local settings = { }, options = { mapping_keys = false, + cursor_column = 0.25, empty_line_between_mappings = false, disable_statuslines = true, paddings = { 1, 2, 2, 3 }, diff --git a/lua/startup/utils.lua b/lua/startup/utils.lua index de686c9..7822900 100644 --- a/lua/startup/utils.lua +++ b/lua/startup/utils.lua @@ -1,6 +1,5 @@ U = {} local flag = false -local settings = require "startup.config" local new_cursor_pos -- local startup = require"startup" @@ -31,6 +30,7 @@ function U.spaces(amount) end function U.key_help() + local settings = require("startup").settings local buf = vim.api.nvim_create_buf(false, true) vim.api.nvim_buf_set_option(buf, "bufhidden", "wipe") vim.api.nvim_buf_set_keymap( @@ -123,7 +123,15 @@ function U.get_oldfiles_directory(amount) end local column = function() - return(math.floor(vim.o.columns / 2)) + local settings = require("startup").settings + local column_calc + if settings.options.cursor_column < 1 then + column_calc = math.floor(vim.o.columns * settings.options.cursor_column) + else + column_calc = settings.options.cursor_column + end + print(column_calc) + return column_calc end local function move_up() @@ -245,6 +253,7 @@ function U.create_hls() end function U.set_buf_options() + local settings = require("startup").settings vim.api.nvim_buf_set_option(0, "bufhidden", "wipe") vim.api.nvim_buf_set_option(0, "buftype", "nofile") vim.cmd [[set wrap]] @@ -75,6 +75,9 @@ settings = { section_2 = <section> options = { mapping_keys = true/false, -- display mapping (e.g. <leader>ff) + -- if < 0 fraction of screen width + -- if > 0 numbers of column + cursor_column = <number> empty_lines_between_mappings = true/false, -- add an empty line between mapping/commands disable_statuslines = true/false -- disable status and bufferlines paddings = <paddings>, |