From acd130badc0649699812d317f909e97fcff8b085 Mon Sep 17 00:00:00 2001 From: mzpx Date: Sat, 27 Jun 2026 17:18:56 +0200 Subject: [PATCH] Cleanup the config and colorizer added --- lua/mzpx/core/plugins.lua | 32 ++++++++++++++++++-------------- lua/mzpx/plug/color.lua | 3 ++- lua/mzpx/plug/nvim-colorizer.lua | 17 +++++++++++++++++ lua/mzpx/plug/treesitter.lua | 3 ++- readme.md | 5 +++++ 5 files changed, 44 insertions(+), 16 deletions(-) create mode 100755 lua/mzpx/plug/nvim-colorizer.lua diff --git a/lua/mzpx/core/plugins.lua b/lua/mzpx/core/plugins.lua index 0d336c6..13404c6 100755 --- a/lua/mzpx/core/plugins.lua +++ b/lua/mzpx/core/plugins.lua @@ -164,14 +164,9 @@ return packer.startup(function(use) "akinsho/bufferline.nvim", tag = "*", requires = "nvim-tree/nvim-web-devicons", - - --- vim.opt.termguicolors = true config = function() --- require("bufferline").setup{} require("mzpx.plug.bufferline") end - } -- -------------------------------------------------------------------------------------------- @@ -185,11 +180,13 @@ return packer.startup(function(use) -- -------------------------------------------------------------------------------------------- -- nvim-treesitter - mz -- -------------------------------------------------------------------------------------------- - -- use { - -- 'nvim-treesitter/nvim-treesitter', - -- branch = "master", - -- run = ':TSUpdate', -- This automatically updates parsers on install/update - -- } + use { + 'nvim-treesitter/nvim-treesitter', + run = function() + local ts_update = require('nvim-treesitter.install').update({ with_sync = true }) + ts_update() + end, + } -- -------------------------------------------------------------- -- render-markdown - mz @@ -226,14 +223,21 @@ return packer.startup(function(use) -- maximizer - 2026-05-31 -- -------------------------------------------------------------------------------------------- use { - "0x00-ketsu/maximizer.nvim", - config = function() + "0x00-ketsu/maximizer.nvim", + config = function() require("maximizer").setup { -- your configuration comes here -- or leave it empty to use the default settings -- refer to the configuration section below - } - end + } + end + } + + use { + "norcalli/nvim-colorizer.lua", + config = function() + require( "mzpx.plug.nvim-colorizer" ) + end } -- -------------------------------------------------------------------------------------------- diff --git a/lua/mzpx/plug/color.lua b/lua/mzpx/plug/color.lua index 8adbe64..3d5af4a 100755 --- a/lua/mzpx/plug/color.lua +++ b/lua/mzpx/plug/color.lua @@ -12,7 +12,8 @@ local custom_highlight = vim.api.nvim_set_hl( 0, "Comment", { fg = "#808080", italic = false }) vim.api.nvim_set_hl( 0, "Function", { fg = "#82aaff", italic = false }) vim.api.nvim_set_hl( 0, "CursorLineNr", { fg = "#82aaff", italic = false }) - vim.api.nvim_set_hl( 0, "Delimiter", { fg = "#ff0000", italic = false }) + -- vim.api.nvim_set_hl( 0, "Delimiter", { fg = "#ff0000", italic = false }) + vim.api.nvim_set_hl( 0, "Delimiter", { fg = "#aaaaaa", italic = false }) end, group = custom_highlight, diff --git a/lua/mzpx/plug/nvim-colorizer.lua b/lua/mzpx/plug/nvim-colorizer.lua new file mode 100755 index 0000000..06de9dd --- /dev/null +++ b/lua/mzpx/plug/nvim-colorizer.lua @@ -0,0 +1,17 @@ + +require'colorizer'.setup( + {'*';}, + { + RGB = true; -- #RGB hex codes + RRGGBB = true; -- #RRGGBB hex codes + names = true; -- "Name" codes like Blue + RRGGBBAA = false; -- #RRGGBBAA hex codes + rgb_fn = false; -- CSS rgb() and rgba() functions + hsl_fn = false; -- CSS hsl() and hsla() functions + css = false; -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB + css_fn = false; -- Enable all CSS *functions*: rgb_fn, hsl_fn + -- Available modes: foreground, background + mode = 'background'; -- Set the display mode. + } +) + diff --git a/lua/mzpx/plug/treesitter.lua b/lua/mzpx/plug/treesitter.lua index eb9f86f..d508463 100755 --- a/lua/mzpx/plug/treesitter.lua +++ b/lua/mzpx/plug/treesitter.lua @@ -16,7 +16,8 @@ require('nvim-treesitter.configs').setup { highlight = { enable = true, -- false will disable the whole extension - additional_vim_regex_highlighting = false, + disable = { "" } + additional_vim_regex_highlighting = ture, }, indent = { diff --git a/readme.md b/readme.md index fe65074..4c70108 100755 --- a/readme.md +++ b/readme.md @@ -4,3 +4,8 @@ after switching to another branch, the following folders must be deleted - delete `%XDG_CACHE_HOME%\nvim` folder - delete `%XDG_CONFIG_HOME%\nvim\plugin` folder - delete `%XDG_DATA_HOME%\nvim-data` folder + +## For test +```sh +ls /etc/ppp/ +```