From f58a55717e2d04af5ad0372cb0eb292f4fa61d3c Mon Sep 17 00:00:00 2001 From: srdusr Date: Sat, 4 Feb 2023 23:57:35 +0200 Subject: Squashed '.config/nvim/' changes from 23457da..193f3c2 193f3c2 Enable plugins.modify-blend d957520 Changed relative option = 'cursor' in local win function 6789d92 Commented out various lines 45b6b32 Changed colorscheme to nightfly b5a7704 Changed packer keybindings to then Capital P and whatever corresponding key needed f678a1e Commented out plugins.modify-blend bfad445 Add max_jobs option e95ddcb Changed relative option = 'cursor' in local win function e934c6e Add anchor = 'NE' option to local win e637ecf Moved timelength option to opts.lua 0743806 Moved timelenght option to opts.lua b848312 Commented out 'last search pattern' git-subtree-dir: .config/nvim git-subtree-split: 193f3c2c8f64118403ffde24bb1ce5e6d314409d --- init.lua | 1 + lua/plugins/colorscheme.lua | 26 ++++++++++++++++++- lua/plugins/lsp.lua | 1 - lua/plugins/modify-blend.lua | 61 +++++++++++++++++++++++--------------------- lua/user/keys.lua | 48 +++++++++++++++++----------------- lua/user/opts.lua | 1 + lua/user/pack.lua | 5 ++-- 7 files changed, 86 insertions(+), 57 deletions(-) diff --git a/init.lua b/init.lua index 49397d4..5c49c80 100644 --- a/init.lua +++ b/init.lua @@ -84,6 +84,7 @@ local modules = { "plugins.colorscheme", "plugins.heirline", "plugins.toggleterm", + "plugins.modify-blend", --"plugins.dap", --"plugins.floatterm", } diff --git a/lua/plugins/colorscheme.lua b/lua/plugins/colorscheme.lua index 1f76a40..0ee4364 100644 --- a/lua/plugins/colorscheme.lua +++ b/lua/plugins/colorscheme.lua @@ -1,6 +1,6 @@ -- Colorscheme -- ayu gruvbox molokai onedark srcery everblush vscode edge nightfly doom-one -local colorscheme = "onedark" +local colorscheme = "nightfly" local status_ok, _ = pcall(vim.cmd, "colorscheme " .. colorscheme) if not status_ok then vim.notify("colorscheme " .. colorscheme .. " not found!") @@ -37,3 +37,27 @@ au WinLeave * setl winhl=WinSeparator:WinSeparator require("notify").setup({ background_colour = "#000000", }) +-- let g:terminal_color_0 = '#2e3436' +-- let g:terminal_color_1 = '#cc0000' +-- let g:terminal_color_2 = '#4e9a06' +-- let g:terminal_color_3 = '#c4a000' +-- let g:terminal_color_4 = '#3465a4' +-- let g:terminal_color_5 = '#75507b' +-- let g:terminal_color_6 = '#0b939b' +-- let g:terminal_color_7 = '#d3d7cf' +-- let g:terminal_color_8 = '#555753' +-- let g:terminal_color_9 = '#ef2929' +-- let g:terminal_color_10 = '#8ae234' +-- let g:terminal_color_11 = '#fce94f' +-- let g:terminal_color_12 = '#729fcf' +-- let g:terminal_color_13 = '#ad7fa8' +-- let g:terminal_color_14 = '#00f5e9' +-- let g:terminal_color_15 = '#eeeeec' +-- +-- set background=dark +-- execute "silent! colorscheme base16-eighties" +-- highlight Comment guifg=#585858 +-- highlight Normal guifg=#999999 +-- "highlight TabLine guifg=#333333 guibg=#777777 +-- "highlight TabLineSel guifg=#FA7F7F +-- highlight MatchParen gui=bold guibg=black guifg=limegreen diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 900121f..924db87 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -257,7 +257,6 @@ vim.diagnostic.config({ severity_sort = false, -- default to false }) -vim.o.updatetime = 250 vim.cmd[[ augroup OpenFloat autocmd CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, {focusable = false,}) diff --git a/lua/plugins/modify-blend.lua b/lua/plugins/modify-blend.lua index 7c48815..4cb2bdd 100644 --- a/lua/plugins/modify-blend.lua +++ b/lua/plugins/modify-blend.lua @@ -1,40 +1,43 @@ local ui = vim.api.nvim_list_uis()[1] -local bufnr = vim.api.nvim_create_buf(false, true) +local bufnr = vim.api.nvim_create_buf(true, true) local win = vim.api.nvim_open_win(bufnr, true, { - relative = "editor", + --relative = "editor", + relative = "cursor", width = ui.width, height = ui.height, + anchor = "NE", row = 10, col = 10, style = "minimal", + zindex = 50, }) vim.api.nvim_win_set_option(win, "winblend", 1) - -local blend_start = 15 -local offset = 1 - -CANCEL = false -local timer = vim.loop.new_timer() -timer:start( - 0, - 50, - vim.schedule_wrap(function() - blend_start = blend_start + offset - - if blend_start > 90 then - offset = -1 - elseif blend_start < 10 then - offset = 1 - end - - if CANCEL or not vim.api.nvim_win_is_valid(win) then - timer:close() - timer:stop() - return - end - - vim.cmd([[highlight NormalFloat blend=]] .. tostring(blend_start)) - end) -) +-- +--local blend_start = 15 +--local offset = 1 +-- +--CANCEL = false +--local timer = vim.loop.new_timer() +--timer:start( +-- 0, +-- 50, +-- vim.schedule_wrap(function() +-- blend_start = blend_start + offset +-- +-- if blend_start > 90 then +-- offset = -1 +-- elseif blend_start < 10 then +-- offset = 1 +-- end +-- +-- if CANCEL or not vim.api.nvim_win_is_valid(win) then +-- timer:close() +-- timer:stop() +-- return +-- end +-- +-- vim.cmd([[highlight NormalFloat blend=]] .. tostring(blend_start)) +-- end) +--) diff --git a/lua/user/keys.lua b/lua/user/keys.lua index f01a0c5..8feee85 100644 --- a/lua/user/keys.lua +++ b/lua/user/keys.lua @@ -152,7 +152,7 @@ map("n", "cd", ":cd %:p:h:pwd") map('n', 'o', ':!xdg-open %') -- Unsets the 'last search pattern' register by hitting return -map("n", "", "!silent :noh") +--map("n", "", "!silent :noh") -- Toggle completion map("n", "tc", ":lua require('user.utils').toggle_completion()") @@ -266,11 +266,11 @@ map("n", "", ":call OpenLastClosed() ") ---------------- Plugin Operations ---------------- -- Packer -map("n", "pc", "PackerCompile") -map("n", "pi", "PackerInstall") -map("n", "ps", "PackerSync") -map("n", "pS", "PackerStatus") -map("n", "pu", "PackerUpdate") +map("n", "Pc", "PackerCompile") +map("n", "Pi", "PackerInstall") +map("n", "Ps", "PackerSync") +map("n", "PS", "PackerStatus") +map("n", "Pu", "PackerUpdate") -- Tmux navigation (aserowy/tmux.nvim) map('n', '', 'NavigatorLeft') @@ -358,23 +358,23 @@ end map("n", "ww", ":lua Toggle_autopairs()", term_opts) -- Tabularize -vim.cmd([[ - vnoremap mm ':Tabularize /^\s*\S.*\zs' . split(&commentstring, '%s')[0] . "" - nnoremap mm ':Tabularize /^\s*\S.*\zs' . split(&commentstring, '%s')[0] . "" - "nnoremap i mc40A 080lDgelD`cP - "vnoremap ii mc0f-20i`cdt=j -]]) +--vim.cmd([[ +-- vnoremap mm ':Tabularize /^\s*\S.*\zs' . split(&commentstring, '%s')[0] . "" +-- nnoremap mm ':Tabularize /^\s*\S.*\zs' . split(&commentstring, '%s')[0] . "" +-- "nnoremap i mc40A 080lDgelD`cP +-- "vnoremap ii mc0f-20i`cdt=j +--]]) -- EasyAlign -vim.cmd([[ - " Start interactive EasyAlign in visual mode (e.g. vipga) - xmap ga (EasyAlign) - " Start interactive EasyAlign for a motion/text object (e.g. gaip) - nmap ga (EasyAlign) - if !exists('g:easy_align_delimiters') - let g:easy_align_delimiters = {} - endif - let g:easy_align_delimiters['--'] = { 'pattern': '--', 'ignore_groups': ['String'] } - nnoremap 21A d21\| - imap a -]]) +--vim.cmd([[ +-- " Start interactive EasyAlign in visual mode (e.g. vipga) +-- xmap ga (EasyAlign) +-- " Start interactive EasyAlign for a motion/text object (e.g. gaip) +-- nmap ga (EasyAlign) +-- if !exists('g:easy_align_delimiters') +-- let g:easy_align_delimiters = {} +-- endif +-- let g:easy_align_delimiters['--'] = { 'pattern': '--', 'ignore_groups': ['String'] } +-- nnoremap 21A d21\| +-- imap a +--]]) diff --git a/lua/user/opts.lua b/lua/user/opts.lua index 13e9c1c..90fe0f2 100644 --- a/lua/user/opts.lua +++ b/lua/user/opts.lua @@ -25,6 +25,7 @@ vim.cmd([[ -- Environment --vim.opt.shell = "zsh" -- +vim.o.updatetime = 250 vim.o.shell = "/bin/zsh" vim.scriptencoding = "utf-8" -- vim.opt.encoding = "utf-8" -- diff --git a/lua/user/pack.lua b/lua/user/pack.lua index 43b7a36..1a37d8b 100644 --- a/lua/user/pack.lua +++ b/lua/user/pack.lua @@ -15,7 +15,7 @@ if fn.empty(fn.glob(install_path)) > 0 then vim.cmd([[packadd packer.nvim]]) end --- Autocommand that reloads neovim whenever you save the plugins.lua file +-- Autocommand that reloads neovim whenever you save this file vim.cmd([[ augroup packer_user_config autocmd! @@ -29,9 +29,10 @@ if not status_ok then return end --- Have packer use a popup window +-- Have packer use a popup window and set a maximum number of jobs packer.init({ auto_reload_compiled = true, + max_jobs = 90, display = { open_fn = function() return require("packer.util").float({ border = "rounded" }) -- cgit v1.2.3