From 64c396f93659ff7a8511b902a286a56e47c610cb Mon Sep 17 00:00:00 2001 From: Franciszek Malinka Date: Wed, 4 Jan 2023 12:35:22 +0100 Subject: Some updates --- lua/user/colorscheme.lua | 23 +++++++++++++++++++++++ lua/user/config.lua | 4 ++-- lua/user/keymaps.lua | 4 ++-- lua/user/lualine.lua | 6 ++++-- lua/user/nnp.lua | 22 ++++++++++++++++++++++ lua/user/options.lua | 1 + lua/user/plugins.lua | 10 +++++++++- lua/user/zen-mode.lua | 10 ++++++++++ 8 files changed, 73 insertions(+), 7 deletions(-) create mode 100644 lua/user/colorscheme.lua create mode 100644 lua/user/nnp.lua create mode 100644 lua/user/zen-mode.lua (limited to 'lua') diff --git a/lua/user/colorscheme.lua b/lua/user/colorscheme.lua new file mode 100644 index 0000000..135e768 --- /dev/null +++ b/lua/user/colorscheme.lua @@ -0,0 +1,23 @@ +local status_ok, ayu = pcall(require, "ayu") +if not status_ok then + return +end + +ayu.setup({ + mirage = true, +}) + +vim.cmd [[let ayucolor="mirage"]] +vim.cmd [[colorscheme ayu]] + + +local function set_colorscheme() + local bg = vim.o.background + if bg == "light" then + vim.cmd [[colorscheme github]] + else + vim.cmd [[colorscheme ayu]] + end +end + +vim.api.nvim_create_autocmd("OptionSet", {pattern = "background", callback = set_colorscheme}) diff --git a/lua/user/config.lua b/lua/user/config.lua index bbd3a65..18eef82 100644 --- a/lua/user/config.lua +++ b/lua/user/config.lua @@ -1,6 +1,6 @@ vim.opt.termguicolors = true -vim.o.background = "dark" -- or "light" for light mode -vim.cmd([[colorscheme darkplus]]) +-- vim.cmd [[let ayucolor="mirage"]] +-- vim.cmd [[colorscheme ayu]] vim.cmd [[autocmd BufWinLeave *.* mkview]] vim.cmd [[autocmd BufWinLeave *.* silent loadview]] diff --git a/lua/user/keymaps.lua b/lua/user/keymaps.lua index e6fa25c..477863b 100644 --- a/lua/user/keymaps.lua +++ b/lua/user/keymaps.lua @@ -65,5 +65,5 @@ keymap("n", "so", "SessionManager load_session", opts) keymap("n", "q", "Bdelete", opts) -- Random -keymap("n", "b", ":colorscheme gruvbox:set background=light", opts) -keymap("n", "n", ":colorscheme darkplus:set background=daret background=light", opts) +keymap("n", "b", ":colorscheme ayu-light", opts) +keymap("n", "n", ":colorscheme ayu-mirage", opts) diff --git a/lua/user/lualine.lua b/lua/user/lualine.lua index 1bfec63..22c7900 100644 --- a/lua/user/lualine.lua +++ b/lua/user/lualine.lua @@ -1,4 +1,3 @@ - local status_ok, lualine = pcall(require, "lualine") if not status_ok then return @@ -13,5 +12,8 @@ lualine.setup { file_status=false, }, }, - } + }, + options = { + theme = 'ayu', + }, } diff --git a/lua/user/nnp.lua b/lua/user/nnp.lua new file mode 100644 index 0000000..41f68d7 --- /dev/null +++ b/lua/user/nnp.lua @@ -0,0 +1,22 @@ +local status_ok, nnp = pcall(require, "no-neck-pain") +if not status_ok then + return +end + +nnp.setup({ + enableOnVimEnter = false, +}) + +nnp.bufferOptions = { + enabled = false, +} + +local config_group = vim.api.nvim_create_augroup('MyConfigGroup', {}) -- A global group for all your config autocommands + +vim.api.nvim_create_autocmd({ 'User' }, { + pattern = "SessionLoadPost", + group = config_group, + callback = function() + nnp.enable() + end, +}) diff --git a/lua/user/options.lua b/lua/user/options.lua index aea781e..5331714 100644 --- a/lua/user/options.lua +++ b/lua/user/options.lua @@ -22,6 +22,7 @@ local options = { smartcase = true, mouse = "a", fileencoding = "utf-8", + termguicolors = true, } local gopts = { diff --git a/lua/user/plugins.lua b/lua/user/plugins.lua index 2e363ec..a97dd9a 100644 --- a/lua/user/plugins.lua +++ b/lua/user/plugins.lua @@ -68,11 +68,16 @@ return packer.startup(function(use) run = ":TSUpdate", } + -- colorschems use 'cxw42/editorconfig-vim' use 'morhetz/gruvbox' use "lunarvim/colorschemes" + use "Shatur/neovim-ayu" use "freeo/vim-kalisi" - -- use "ellisonleao/gruvbox.nvim" + use "rakr/vim-one" + use "aonemd/quietlight.vim" + use "cormacrelf/vim-colors-github" + use "NLKNguyen/papercolor-theme" use 'rhlobo/vim-super-retab' use "ahmedkhalf/project.nvim" @@ -89,6 +94,9 @@ return packer.startup(function(use) use "goolord/alpha-nvim" use "Shatur/neovim-session-manager" + use { "shortcuts/no-neck-pain.nvim", tag = "*" } + use "folke/zen-mode.nvim" + use "lewis6991/gitsigns.nvim" if PACKER_BOOTSTRAP then diff --git a/lua/user/zen-mode.lua b/lua/user/zen-mode.lua new file mode 100644 index 0000000..88616bb --- /dev/null +++ b/lua/user/zen-mode.lua @@ -0,0 +1,10 @@ +local status_ok, zen_mode = pcall(require, 'zen-mode') +if not status_ok then + return +end + +zen_mode.setup({ + window = { + width = 90 + } +}) -- cgit v1.2.3