Skip to content

Commit

Permalink
Title: Added enhancements.
Browse files Browse the repository at this point in the history
Description:
Updated highlighting configs. Added keymaps for
toggling line numbers and search results
highlighting. Removed cc config from optconfig
since smartercolumnnvimconfig is managing cc.
Updated overlengthnvimconfig and
retrailnvimconfig as well.

CID: #10
  • Loading branch information
HacksPloiter committed Jan 1, 2024
1 parent f553ffd commit b60687d
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 10 deletions.
4 changes: 3 additions & 1 deletion init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
<Leader>wt = Whitespace Trimmer
<Leader>wh = Whitespace Highlighter
<Leader>tt = Toggle toggleterm
<Leader>/ = Toggle search highlights
<Leader>nn = Toggle line numbers
]]
--================================-> END <-===================================--

Expand Down Expand Up @@ -42,7 +44,7 @@ require('nvimlspconfig') -- Plugin nvim-lspconfig configs
require('commentnvimconfig') -- Plugin Comment.Nvim configurations
require('retrailnvimconfig') -- Plugin retrail.nvim configurations
require('overlengthnvimconfig') -- Plugin overlength.nvim configurations
require('smartcolumnnvimconfig') -- Plugin smartcolumn.nvim configurations
require('smartercolumnnvimconfig') -- Plugin smartcolumn.nvim configurations
-- Shell Apps Configs
require('lazygitconfig') -- Lazygit app configs
--================================-> END <-===================================--
Expand Down
20 changes: 18 additions & 2 deletions lua/keycommandconfig.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
--================================-> START <-=================================--
-- Key Configs --
--------------------------------------------------------------------------------
-- [[ Yank To Clipboard ]]
vim.api.nvim_set_option("clipboard","unnamed")

-- [[ Timeout ]]
vim.o.timeout = true
vim.o.timeoutlen = 5000
Expand All @@ -29,19 +32,32 @@ vim.api.nvim_set_keymap('n',
':bn<CR>',
{noremap = true, silent = true})

-- [[ Shift + q quits a buffer ]]
vim.api.nvim_set_keymap('n',
'<S-q>',
':Bd<CR>',
{noremap = true, silent = true})

-- [[ TODO ]]
-- To make numpad keys work for keybindings.
-- [[ Toggle line numbers using <leader>nn ]]
vim.api.nvim_set_keymap("n",
"<leader>nn",
":set number! number?<CR>",
{desc = "Toggle line numbers"})

-- [[ Toggle search highlights]]
vim.api.nvim_set_keymap("n",
"<leader>/",
":set hlsearch! hlsearch?<CR>",
{desc = "Toggle search highlighting"})
-- [[ Shift + Numpad 0 closes a buffer ]]
-- Mapping Shift + Numpad 0 to execute the command MyBd
-- vim.api.nvim_set_keymap('n',
-- '<S-k0>',
-- ':lua vim.cmd("Bd")<CR>',
-- { noremap = true, silent = true })

-- [[ TODO ]]
-- To make numpad keys work for keybindings.
--================================-> END <-===================================--


Expand Down
2 changes: 1 addition & 1 deletion lua/lazyconfig.lua
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ else
},
{'kaplanz/retrail.nvim',},
{'lcheylus/overlength.nvim'},
{'HacksPloiter/smartcolumn.nvim'},
{'HacksPloiter/smartercolumn.nvim'},

-- Plugins End --
-- Themes Start --
Expand Down
2 changes: 1 addition & 1 deletion lua/lualineconfig.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ else
--custom_fname.apply_icon = require('lualine.components.filetype').apply_icon
local highlight = require'lualine.highlight'
local default_status_colors = { saved = 'none', modified = 'white' }
function custom_fname:init(options)
custom_fname.super.init(self, options)
self.status_colors = {
Expand Down
2 changes: 1 addition & 1 deletion lua/optconfig.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
-- Opt Configs --
--------------------------------------------------------------------------------
-- [[ Context ]]
vim.opt.colorcolumn = '81' -- str: Show col for max line length
-- vim.opt.colorcolumn = '81' -- Smartercolumn.nvim is managing.
vim.opt.number = true -- bool: Show line numbers
vim.opt.numberwidth = 1 -- bool: Sets space before line numbers.
vim.opt.scrolloff = 5 -- int: Scroll when near 5 lines of top/bottom
Expand Down
3 changes: 2 additions & 1 deletion lua/overlengthnvimconfig.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ else
highlight_to_eol = true,
-- List of filetypes to disable overlength highlighting
disable_ft = {'qf', 'help', 'man', 'checkhealth', 'lazy', 'packer',
'NvimTree', 'Telescope', 'WhichKey', 'dashboard',},
'NvimTree', 'Telescope', 'WhichKey', 'dashboard',
'toggleterm'},
})
end
--=================================-> END <-==================================--
1 change: 1 addition & 0 deletions lua/retrailnvimconfig.lua
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ else
"TelescopePrompt",
"Trouble",
"WhichKey",
"toggleterm",
},
},
-- Enabled buftypes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@
--================================-> START <-=================================--
-- Plugin Smartcolumn.Nvim Configs --
--------------------------------------------------------------------------------
local status_ok, configs = pcall(require, "smartcolumn")
local status_ok, configs = pcall(require, "smartercolumn")
if not status_ok then
return
else
configs.setup {
-- colorcolumn = "50", --> Override colorcolumn specified anywhere else
colorcolumn = "81",
disabled_filetypes = { "NvimTree", "lazy", "mason", "help", "checkhealth",
"lspinfo", "noice", "Trouble", "fish", "zsh",
"dashboard",},
custom_colorcolumn = {},
scope = "file",
underlengthcc = 'true',
--underlengthhex = "#00FFFF",
underlengthhex = "#2e333c",
overlengthcc = 'true',
overlengthhex = "#f92672",
}
Expand Down

0 comments on commit b60687d

Please sign in to comment.