diff options
author | max397574 <[email protected]> | 2021-11-06 16:13:34 +0100 |
---|---|---|
committer | max397574 <[email protected]> | 2021-11-06 16:13:34 +0100 |
commit | c01f4bbee1fa5581d84f09f840ccd0ba57056397 (patch) | |
tree | d4144402fd82cc7cbb61beaadbc4cf2e89c2a3e4 /lua | |
parent | 56e7c30c81660f936b10ecc2366082000869b063 (diff) |
feat(cursor): ✨expose cursor column
Diffstat (limited to 'lua')
-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 |
4 files changed, 14 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]] |