diff --git a/lua/rua/core/options.lua b/lua/rua/core/options.lua index 2d024e9..f200e78 100644 --- a/lua/rua/core/options.lua +++ b/lua/rua/core/options.lua @@ -78,7 +78,6 @@ opt.number = true -- 显示行号 opt.pumblend = 10 -- 弹出菜单透明度 opt.pumheight = 10 -- 弹出菜单最大条目数 opt.relativenumber = true -- 显示相对行号 -opt.scrolloff = 4 -- 滚动时保留的行数 opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize", "help", "globals", "skiprtp", "folds" } opt.shiftround = true -- 缩进取整 opt.shiftwidth = 2 -- 缩进大小 diff --git a/lua/rua/plugins/bufferline.lua b/lua/rua/plugins/bufferline.lua deleted file mode 100644 index 8e22a56..0000000 --- a/lua/rua/plugins/bufferline.lua +++ /dev/null @@ -1,36 +0,0 @@ -return { - -- "akinsho/bufferline.nvim", - -- event = { "BufRead", "BufNew" }, - -- dependencies = { "nvim-tree/nvim-web-devicons" }, - -- version = "*", - -- opts = { - -- options = { - -- diagnostics = "nvim_lsp", - -- show_buffer_close_icons = false, - -- themable = true, - -- indicator = { - -- icon = "", - -- style = "none", - -- }, - -- offsets = { - -- { - -- filetype = "NvimTree", - -- text = "", - -- text_align = "left", - -- separator = true, - -- }, - -- }, - -- }, - -- }, - -- config = function(_, opts) - -- require("bufferline").setup(opts) - -- - -- local map = vim.keymap.set - -- map("n", "la", ":BufferLineCloseOthers", { silent = true }) - -- map("n", "x", ":bp|bd# ", { silent = true }) - -- map("n", "", ":BufferLineCycleNext", { silent = true }) - -- map("n", "", ":BufferLineCyclePrev", { silent = true }) - -- map("n", "", ":BufferLineMoveNext", { silent = true }) - -- map("n", "", ":BufferLineMovePrev", { silent = true }) - -- end, -} diff --git a/lua/rua/plugins/git.lua b/lua/rua/plugins/git.lua index 4035010..7d9a20e 100644 --- a/lua/rua/plugins/git.lua +++ b/lua/rua/plugins/git.lua @@ -47,6 +47,9 @@ return { { "lewis6991/gitsigns.nvim", event = { "BufReadPre", "BufNewFile" }, + cond = function() + return vim.fn.isdirectory(".git") == 1 + end, opts = { on_attach = function(bufnr) local gs = package.loaded.gitsigns diff --git a/lua/rua/plugins/ui.lua b/lua/rua/plugins/ui.lua index 5f03e4e..c74b109 100644 --- a/lua/rua/plugins/ui.lua +++ b/lua/rua/plugins/ui.lua @@ -1,23 +1,4 @@ return { - -- { - -- "echasnovski/mini.icons", - -- lazy = true, - -- opts = { - -- file = { - -- [".keep"] = { glyph = "󰊢", hl = "MiniIconsGrey" }, - -- ["devcontainer.json"] = { glyph = "", hl = "MiniIconsAzure" }, - -- }, - -- filetype = { - -- dotenv = { glyph = "", hl = "MiniIconsYellow" }, - -- }, - -- }, - -- init = function() - -- package.preload["nvim-web-devicons"] = function() - -- require("mini.icons").mock_nvim_web_devicons() - -- return package.loaded["nvim-web-devicons"] - -- end - -- end, - -- }, { "nvim-pack/nvim-spectre", opts = {}, @@ -146,6 +127,42 @@ return { }, }, }, + { + "folke/todo-comments.nvim", + opts = {}, + }, + { + "j-hui/fidget.nvim", -- lsp messages + event = "VeryLazy", + opts = { + integration = { + ["nvim-tree"] = { + enable = false, -- Integrate with nvim-tree/nvim-tree.lua (if installed) + }, + ["xcodebuild-nvim"] = { + enable = false, -- Integrate with wojciech-kulik/xcodebuild.nvim (if installed) + }, + }, + notification = { + window = { + winblend = 0, -- Background color opacity in the notification window + }, + }, + }, + }, + { + "folke/which-key.nvim", + event = "VeryLazy", + init = function() + vim.o.timeout = true + vim.o.timeoutlen = 500 + end, + opts = { + -- your configuration comes here + -- or leave it empty to use the default settings + -- refer to the configuration section below + }, + }, -- { -- "echasnovski/mini.indentscope", -- version = false, @@ -176,27 +193,23 @@ return { -- }) -- end, -- }, - { - "folke/todo-comments.nvim", - opts = {}, - }, - { - "j-hui/fidget.nvim", -- lsp messages - event = "VeryLazy", - opts = { - integration = { - ["nvim-tree"] = { - enable = false, -- Integrate with nvim-tree/nvim-tree.lua (if installed) - }, - ["xcodebuild-nvim"] = { - enable = false, -- Integrate with wojciech-kulik/xcodebuild.nvim (if installed) - }, - }, - notification = { - window = { - winblend = 0, -- Background color opacity in the notification window - }, - }, - }, - }, + -- { + -- "echasnovski/mini.icons", + -- lazy = true, + -- opts = { + -- file = { + -- [".keep"] = { glyph = "󰊢", hl = "MiniIconsGrey" }, + -- ["devcontainer.json"] = { glyph = "", hl = "MiniIconsAzure" }, + -- }, + -- filetype = { + -- dotenv = { glyph = "", hl = "MiniIconsYellow" }, + -- }, + -- }, + -- init = function() + -- package.preload["nvim-web-devicons"] = function() + -- require("mini.icons").mock_nvim_web_devicons() + -- return package.loaded["nvim-web-devicons"] + -- end + -- end, + -- }, } diff --git a/lua/rua/plugins/which-key.lua b/lua/rua/plugins/which-key.lua deleted file mode 100644 index d004051..0000000 --- a/lua/rua/plugins/which-key.lua +++ /dev/null @@ -1,13 +0,0 @@ -return { - "folke/which-key.nvim", - event = "VeryLazy", - init = function() - vim.o.timeout = true - vim.o.timeoutlen = 500 - end, - opts = { - -- your configuration comes here - -- or leave it empty to use the default settings - -- refer to the configuration section below - }, -}