From ebd7ba3f825327f0478721691fdf39003ae60df1 Mon Sep 17 00:00:00 2001 From: BBBoy01 <1156678002@qq.com> Date: Fri, 15 Dec 2023 13:03:37 +0800 Subject: [PATCH] refactor: minify nvim options --- lazy-lock.json | 12 ++++++------ lua/config/options.lua | 14 ++++++-------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 5cfd442..d868dab 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,5 +1,5 @@ { - "LuaSnip": { "branch": "master", "commit": "954c81b53989097faaff0fabc11c29575288c3e1" }, + "LuaSnip": { "branch": "master", "commit": "6a001360cea89df50f7c5cc8c7a75e6a21f1ef5c" }, "bufferline.nvim": { "branch": "main", "commit": "e48ce1805697e4bb97bc171c081e849a65859244" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" }, @@ -19,15 +19,15 @@ "mini.comment": { "branch": "main", "commit": "3d9c8009615857e982f09bc5357fc95f2a2175f3" }, "mini.pairs": { "branch": "main", "commit": "71f117fd57f930da6ef4126b24f594dd398bac26" }, "mini.surround": { "branch": "main", "commit": "af8129efcabe95fc08a233e9f91569829bed031f" }, - "neodev.nvim": { "branch": "main", "commit": "c4ce017bd4bacf60bf59330cec9e93c5d5e104a6" }, + "neodev.nvim": { "branch": "main", "commit": "ef351fae5df2559956398923c5d38c9b64e7d898" }, "neogen": { "branch": "main", "commit": "70127baaff25611deaf1a29d801fc054ad9d2dc1" }, "noice.nvim": { "branch": "main", "commit": "92433164e2f7118d4122c7674c3834d9511722ba" }, "none-ls.nvim": { "branch": "main", "commit": "45d0e8fa9094dcc3fabad9065a5822af9cf099c7" }, "nui.nvim": { "branch": "main", "commit": "c9b4de623d19a85b353ff70d2ae9c77143abe69c" }, - "nvim-cmp": { "branch": "main", "commit": "41d7633e4146dce1072de32cea31ee31b056a131" }, - "nvim-lspconfig": { "branch": "master", "commit": "f451052bd6804e9e5ccd0ac874d7df8d3d4c55b9" }, + "nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" }, + "nvim-lspconfig": { "branch": "master", "commit": "84f2dd42efffa20d505ac44c78568d778ca7e0a1" }, "nvim-tree.lua": { "branch": "master", "commit": "141c0f97c35f274031294267808ada59bb5fb08e" }, - "nvim-treesitter": { "branch": "master", "commit": "42381aae7c1f785e4658cdb34a750be9851ba9af" }, + "nvim-treesitter": { "branch": "master", "commit": "ab818bf5a2ee21515ade9afcf428e98056b6197b" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "ec1c5bdb3d87ac971749fa6c7dbc2b14884f1f6a" }, "nvim-ts-autotag": { "branch": "main", "commit": "8515e48a277a2f4947d91004d9aa92c29fdc5e18" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "1277b4a1f451b0f18c0790e1a7f12e1e5fdebfee" }, @@ -38,7 +38,7 @@ "playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" }, "plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" }, "promise-async": { "branch": "main", "commit": "94f6f03c6c1e2aab551aacdf0c1e597a7269abb6" }, - "schemastore.nvim": { "branch": "main", "commit": "177cae4f44ddf7c166ef263956378ae308ff77ff" }, + "schemastore.nvim": { "branch": "main", "commit": "3927fbff75d5777660bfc4d29ff8d5b4a0cae2af" }, "solarized-osaka.nvim": { "branch": "main", "commit": "83b7026ac7a4e185d4ecbe99926fd94b5735e2ea" }, "statuscol.nvim": { "branch": "main", "commit": "7d593a285d83c1a865219e4e7e1e5aedf4e0dd9c" }, "telescope-file-browser.nvim": { "branch": "master", "commit": "8e0543365fe5781c9babea7db89ef06bcff3716d" }, diff --git a/lua/config/options.lua b/lua/config/options.lua index 092a33b..e6497f8 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -11,8 +11,8 @@ opt.completeopt = 'menu,menuone,noselect' opt.laststatus = 3 -- Global statusline opt.list = true -- Show some invisible characters (tabs... -opt.pumheight = 15 -opt.pumblend = 10 +opt.pumheight = 15 -- Maximum number of entries in a popup +opt.pumblend = 10 -- Popup blend opt.listchars = { tab = '»·', nbsp = '+', trail = '·', extends = '→', precedes = '←' } opt.undofile = true @@ -40,12 +40,10 @@ opt.termguicolors = true -- True color support opt.mouse = '' -- Disable mouse action -opt.formatoptions:append({ 'r' }) +opt.grepformat = '%f:%l:%c:%m,%f:%l:%m' +opt.grepprg = 'rg --vimgrep --no-heading --smart-case' -if vim.fn.executable('rg') == 1 then - opt.grepformat = '%f:%l:%c:%m,%f:%l:%m' - opt.grepprg = 'rg --vimgrep --no-heading --smart-case' -end +opt.formatoptions = 'jcroqlnt' -- tcqj +opt.clipboard = 'unnamedplus' -- Sync with system clipboard -vim.opt.clipboard:append({ 'unnamedplus' }) vim.g.skip_ts_context_commentstring_module = true