From 1187947f5c0f184a371501cc3ec963d4c985ad65 Mon Sep 17 00:00:00 2001 From: Zynh0722 Date: Sat, 18 Mar 2023 23:49:58 -0700 Subject: [PATCH] update config --- after/plugin/comment.lua | 6 +++- after/plugin/fugitive.lua | 1 + after/plugin/lualine.lua | 27 +++++++++++------- after/plugin/rose-pine.lua | 19 ++++++++----- lua/zynh/autos.lua | 1 + lua/zynh/packer.lua | 57 ++++++++++++++++++++++++++++++-------- lua/zynh/set.lua | 2 +- 7 files changed, 83 insertions(+), 30 deletions(-) diff --git a/after/plugin/comment.lua b/after/plugin/comment.lua index dc30d8c..c659f59 100644 --- a/after/plugin/comment.lua +++ b/after/plugin/comment.lua @@ -1,2 +1,6 @@ -- Enable Comment.nvim -require('Comment').setup() +require('Comment').setup({ + options = { + theme = 'rose-pine' + } +}) diff --git a/after/plugin/fugitive.lua b/after/plugin/fugitive.lua index 80c9070..2f751c2 100644 --- a/after/plugin/fugitive.lua +++ b/after/plugin/fugitive.lua @@ -1 +1,2 @@ vim.keymap.set("n", "gs", vim.cmd.Git) +vim.keymap.set("n", "fo", function() vim.cmd('Git pull') end) diff --git a/after/plugin/lualine.lua b/after/plugin/lualine.lua index a3d8e0d..67c93bf 100644 --- a/after/plugin/lualine.lua +++ b/after/plugin/lualine.lua @@ -1,10 +1,17 @@ --- Set lualine as statusline --- See `:help lualine.txt` -require('lualine').setup { - options = { - icons_enabled = false, - theme = 'onedark', - component_separators = '|', - section_separators = '', - }, -} +-- local theme = require("lualine.themes.rose-pine") +-- local modes = { "normal", "insert", "visual", "replace", "command", "inactive" } +-- for _, mode in ipairs(modes) do +-- theme[mode].c.bg = "NONE" +-- end +-- +-- +-- -- Set lualine as statusline +-- -- See `:help lualine.txt` +-- require('lualine').setup { +-- options = { +-- icons_enabled = false, +-- theme = 'rose-pine', +-- component_separators = '|', +-- section_separators = '', +-- }, +-- } diff --git a/after/plugin/rose-pine.lua b/after/plugin/rose-pine.lua index 77a3195..843b85d 100644 --- a/after/plugin/rose-pine.lua +++ b/after/plugin/rose-pine.lua @@ -1,7 +1,12 @@ -require('rose-pine').setup({ - groups = { - background = 'none' - } -}) - -vim.cmd('colorscheme rose-pine') +-- require('rose-pine').setup({ +-- groups = { +-- background = 'none' +-- }, +-- highlight_groups = { +-- MsgArea = { bg = 'none' }, +-- } +-- }) +-- +-- vim.cmd('colorscheme rose-pine') +-- +-- diff --git a/lua/zynh/autos.lua b/lua/zynh/autos.lua index 7737f15..f2ded2c 100644 --- a/lua/zynh/autos.lua +++ b/lua/zynh/autos.lua @@ -1,4 +1,5 @@ local highlight_group = vim.api.nvim_create_augroup('YankHighlight', { clear = true }) +vim.g.netrw_list_hide = ".DS_Store" vim.api.nvim_create_autocmd('TextYankPost', { callback = function() vim.highlight.on_yank() diff --git a/lua/zynh/packer.lua b/lua/zynh/packer.lua index 95a584e..c860095 100644 --- a/lua/zynh/packer.lua +++ b/lua/zynh/packer.lua @@ -19,6 +19,18 @@ return require('packer').startup(function(use) use { 'rose-pine/neovim', as = 'rose-pine', + config = function() + require('rose-pine').setup({ + groups = { + background = 'none' + }, + highlight_groups = { + MsgArea = { bg = 'none' }, + } + }) + + vim.cmd('colorscheme rose-pine') + end } use('nvim-treesitter/nvim-treesitter', { run = ':TSUpdate' }) @@ -34,29 +46,52 @@ return require('packer').startup(function(use) use 'tpope/vim-fugitive' use 'lewis6991/gitsigns.nvim' - use 'nvim-lualine/lualine.nvim' -- Fancier statusline - use 'numToStr/Comment.nvim' -- "gc" to comment visual regions/lines + use { + 'nvim-lualine/lualine.nvim', + after = 'rose-pine', + config = function() + local theme = require("lualine.themes.rose-pine") + local modes = { "normal", "insert", "visual", "replace", "command", "inactive" } + for _, mode in ipairs(modes) do + theme[mode].c.bg = "none" + end - use 'windwp/nvim-ts-autotag' -- autoclose html tags + + -- Set lualine as statusline + -- See `:help lualine.txt` + require('lualine').setup { + options = { + icons_enabled = false, + theme = 'rose-pine', + component_separators = '|', + section_separators = '', + }, + } + end + } -- Fancier statusline + + use 'numToStr/Comment.nvim' -- "gc" to comment visual regions/lines + + use 'windwp/nvim-ts-autotag' -- autoclose html tags use { 'VonHeikemen/lsp-zero.nvim', requires = { -- LSP Support - { 'neovim/nvim-lspconfig' }, -- Required - { 'williamboman/mason.nvim' }, -- Optional + { 'neovim/nvim-lspconfig' }, -- Required + { 'williamboman/mason.nvim' }, -- Optional { 'williamboman/mason-lspconfig.nvim' }, -- Optional -- Autocompletion - { 'hrsh7th/nvim-cmp' }, -- Required - { 'hrsh7th/cmp-nvim-lsp' }, -- Required - { 'hrsh7th/cmp-buffer' }, -- Optional - { 'hrsh7th/cmp-path' }, -- Optional + { 'hrsh7th/nvim-cmp' }, -- Required + { 'hrsh7th/cmp-nvim-lsp' }, -- Required + { 'hrsh7th/cmp-buffer' }, -- Optional + { 'hrsh7th/cmp-path' }, -- Optional { 'saadparwaiz1/cmp_luasnip' }, -- Optional - { 'hrsh7th/cmp-nvim-lua' }, -- Optional + { 'hrsh7th/cmp-nvim-lua' }, -- Optional -- Snippets - { 'L3MON4D3/LuaSnip' }, -- Required + { 'L3MON4D3/LuaSnip' }, -- Required { 'rafamadriz/friendly-snippets' }, -- Optional } } diff --git a/lua/zynh/set.lua b/lua/zynh/set.lua index 613e9cb..ae80410 100644 --- a/lua/zynh/set.lua +++ b/lua/zynh/set.lua @@ -29,7 +29,7 @@ vim.opt.isfname:append("@-@") vim.opt.updatetime = 50 -vim.opt.colorcolumn = "80" +vim.opt.colorcolumn = "80,120" vim.opt.conceallevel = 2