diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index a296ef56..3b028c08 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -10,7 +10,7 @@ local defaults = { -- colorscheme can be a string like `catppuccin` or a function that will load the colorscheme ---@type string|fun() colorscheme = function() - require("tokyonight").load() + require("nightfox").load() end, -- load the default settings defaults = { diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index f7fe57d6..bceae606 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -75,7 +75,7 @@ map("v", "<", "", ">gv") -- lazy -map("n", "l", "Lazy", { desc = "Lazy" }) +-- map("n", "l", "Lazy", { desc = "Lazy" }) -- new file map("n", "fn", "enew", { desc = "New File" }) @@ -135,7 +135,7 @@ map("n", "qq", "qa", { desc = "Quit all" }) map("n", "ui", vim.show_pos, { desc = "Inspect Pos" }) -- LazyVim Changelog -map("n", "L", function() Util.news.changelog() end, { desc = "LazyVim Changelog" }) +-- map("n", "L", function() Util.news.changelog() end, { desc = "LazyVim Changelog" }) -- floating terminal local lazyterm = function() Util.terminal(nil, { cwd = Util.root() }) end diff --git a/lua/lazyvim/plugins/coding.lua b/lua/lazyvim/plugins/coding.lua index c6571433..71fb3314 100644 --- a/lua/lazyvim/plugins/coding.lua +++ b/lua/lazyvim/plugins/coding.lua @@ -55,8 +55,8 @@ return { end, }, mapping = cmp.mapping.preset.insert({ - [""] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }), - [""] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }), + [""] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }), + [""] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }), [""] = cmp.mapping.scroll_docs(-4), [""] = cmp.mapping.scroll_docs(4), [""] = cmp.mapping.complete(), diff --git a/lua/lazyvim/plugins/colorscheme.lua b/lua/lazyvim/plugins/colorscheme.lua index bb63326e..fa6715e7 100644 --- a/lua/lazyvim/plugins/colorscheme.lua +++ b/lua/lazyvim/plugins/colorscheme.lua @@ -7,6 +7,9 @@ return { opts = { style = "moon" }, }, + -- nightfox + { "EdenEast/nightfox.nvim", lazy = true, name = "nightfox" }, + -- catppuccin { "catppuccin/nvim", diff --git a/lua/lazyvim/plugins/editor.lua b/lua/lazyvim/plugins/editor.lua index b5f529e5..a4f7b6a3 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -22,8 +22,10 @@ return { end, desc = "Explorer NeoTree (cwd)", }, - { "e", "fe", desc = "Explorer NeoTree (root dir)", remap = true }, - { "E", "fE", desc = "Explorer NeoTree (cwd)", remap = true }, + -- { "e", "fe", desc = "Explorer NeoTree (root dir)", remap = true }, + -- { "E", "fE", desc = "Explorer NeoTree (cwd)", remap = true }, + { "a", "fe", desc = "Explorer NeoTree (root dir)", remap = true }, + { "A", "fE", desc = "Explorer NeoTree (cwd)", remap = true }, { "ge", function() @@ -44,7 +46,7 @@ return { end, init = function() if vim.fn.argc(-1) == 1 then - local stat = vim.loop.fs_stat(vim.fn.argv(0)) + local stat = vim.loop.fs_stat(vim.f.argv(0)) if stat and stat.type == "directory" then require("neo-tree") end @@ -133,13 +135,16 @@ return { "Telescope buffers sort_mru=true sort_lastused=true", desc = "Switch Buffer", }, - { "/", Util.telescope("live_grep"), desc = "Grep (root dir)" }, + -- { "/", Util.telescope("live_grep"), desc = "Grep (root dir)" }, + { "fw", Util.telescope("live_grep"), desc = "Grep (root dir)" }, { ":", "Telescope command_history", desc = "Command History" }, { "", Util.telescope("files"), desc = "Find Files (root dir)" }, -- find - { "fb", "Telescope buffers sort_mru=true sort_lastused=true", desc = "Buffers" }, + -- { "fb", "Telescope buffers sort_mru=true sort_lastused=true", desc = "Buffers" }, + { "bu", "Telescope buffers sort_mru=true sort_lastused=true", desc = "Buffers" }, { "fc", Util.telescope.config_files(), desc = "Find Config File" }, - { "ff", Util.telescope("files"), desc = "Find Files (root dir)" }, + -- { "ff", Util.telescope("files"), desc = "Find Files (root dir)" }, + { "", Util.telescope("files"), desc = "Find Files (root dir)" }, { "fF", Util.telescope("files", { cwd = false }), desc = "Find Files (cwd)" }, { "fr", "Telescope oldfiles", desc = "Recent" }, { "fR", Util.telescope("oldfiles", { cwd = vim.loop.cwd() }), desc = "Recent (cwd)" }, @@ -289,8 +294,20 @@ return { end, }) end + local actions = require("telescope.actions") opts.defaults = vim.tbl_deep_extend("force", opts.defaults or {}, { - mappings = { n = { s = flash }, i = { [""] = flash } }, + mappings = { + n = { s = flash }, + i = { + [""] = flash, + [""] = actions.cycle_history_next, + [""] = actions.cycle_history_prev, + [""] = actions.move_selection_next, + [""] = actions.move_selection_previous, + [""] = actions.close, + [""] = actions.close, + }, + }, }) end, }, @@ -487,9 +504,11 @@ return { keys = { { "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment" }, { "[t", function() require("todo-comments").jump_prev() end, desc = "Previous todo comment" }, - { "xt", "TodoTrouble", desc = "Todo (Trouble)" }, + -- { "xt", "TodoTrouble", desc = "Todo (Trouble)" }, + { "tt", "TodoTrouble", desc = "Todo (Trouble)" }, { "xT", "TodoTrouble keywords=TODO,FIX,FIXME", desc = "Todo/Fix/Fixme (Trouble)" }, - { "st", "TodoTelescope", desc = "Todo" }, + -- { "st", "TodoTelescope", desc = "Todo" }, + { "tl", "TodoTelescope", desc = "Todo" }, { "sT", "TodoTelescope keywords=TODO,FIX,FIXME", desc = "Todo/Fix/Fixme" }, }, }, diff --git a/lua/lazyvim/plugins/extras/editor/aerial.lua b/lua/lazyvim/plugins/extras/editor/aerial.lua index 440c9fda..2036a55f 100644 --- a/lua/lazyvim/plugins/extras/editor/aerial.lua +++ b/lua/lazyvim/plugins/extras/editor/aerial.lua @@ -22,6 +22,8 @@ return { end local opts = { + min_width = 100, + max_width = { 100, 0.2 }, attach_mode = "global", backends = { "lsp", "treesitter", "markdown", "man" }, show_guides = true, @@ -46,7 +48,7 @@ return { return opts end, keys = { - { "cs", "AerialToggle", desc = "Aerial (Symbols)" }, + { "l", "AerialToggle", desc = "Aerial (Symbols)" }, }, }, diff --git a/lua/lazyvim/plugins/extras/editor/symbols-outline.lua b/lua/lazyvim/plugins/extras/editor/symbols-outline.lua index 32cdd17f..ebdc860a 100644 --- a/lua/lazyvim/plugins/extras/editor/symbols-outline.lua +++ b/lua/lazyvim/plugins/extras/editor/symbols-outline.lua @@ -11,6 +11,7 @@ return { local opts = { symbols = {}, symbol_blacklist = {}, + width = 30, } local filter = Config.kind_filter diff --git a/lua/lazyvim/plugins/extras/lang/go.lua b/lua/lazyvim/plugins/extras/lang/go.lua index aaad0128..2c62e905 100644 --- a/lua/lazyvim/plugins/extras/lang/go.lua +++ b/lua/lazyvim/plugins/extras/lang/go.lua @@ -50,7 +50,8 @@ return { }, usePlaceholders = true, completeUnimported = true, - staticcheck = true, + -- TODO: gopls 版本问题,临时屏蔽 + staticcheck = false, directoryFilters = { "-.git", "-.vscode", "-.idea", "-.vscode-test", "-node_modules" }, semanticTokens = true, }, diff --git a/lua/lazyvim/plugins/extras/vscode.lua b/lua/lazyvim/plugins/extras/vscode.lua index 6f78fd9f..d93a464f 100644 --- a/lua/lazyvim/plugins/extras/vscode.lua +++ b/lua/lazyvim/plugins/extras/vscode.lua @@ -3,9 +3,9 @@ if not vim.g.vscode then end local enabled = { - "flit.nvim", + -- "flit.nvim", "lazy.nvim", - "leap.nvim", + -- "leap.nvim", "mini.ai", "mini.comment", "mini.pairs", diff --git a/lua/lazyvim/plugins/init.lua b/lua/lazyvim/plugins/init.lua index 8c7b5fa1..235b6eef 100644 --- a/lua/lazyvim/plugins/init.lua +++ b/lua/lazyvim/plugins/init.lua @@ -11,6 +11,12 @@ end require("lazyvim.config").init() return { - { "folke/lazy.nvim", version = "*" }, + { + "folke/lazy.nvim", + version = "*", + config = function() + require("lazy").setup({ checker = { enabled = false } }) + end, + }, { "LazyVim/LazyVim", priority = 10000, lazy = false, config = true, cond = true, version = "*" }, } diff --git a/lua/lazyvim/plugins/lsp/keymaps.lua b/lua/lazyvim/plugins/lsp/keymaps.lua index 10e5d86f..f206dcf8 100644 --- a/lua/lazyvim/plugins/lsp/keymaps.lua +++ b/lua/lazyvim/plugins/lsp/keymaps.lua @@ -15,13 +15,13 @@ function M.get() M._keys = { { "cl", "LspInfo", desc = "Lsp Info" }, { "gd", function() require("telescope.builtin").lsp_definitions({ reuse_win = true }) end, desc = "Goto Definition", has = "definition" }, - { "gr", "Telescope lsp_references", desc = "References" }, + { "gi", "Telescope lsp_references", desc = "References" }, { "gD", vim.lsp.buf.declaration, desc = "Goto Declaration" }, { "gI", function() require("telescope.builtin").lsp_implementations({ reuse_win = true }) end, desc = "Goto Implementation" }, { "gy", function() require("telescope.builtin").lsp_type_definitions({ reuse_win = true }) end, desc = "Goto T[y]pe Definition" }, { "K", vim.lsp.buf.hover, desc = "Hover" }, { "gK", vim.lsp.buf.signature_help, desc = "Signature Help", has = "signatureHelp" }, - { "", vim.lsp.buf.signature_help, mode = "i", desc = "Signature Help", has = "signatureHelp" }, + -- { "", vim.lsp.buf.signature_help, mode = "i", desc = "Signature Help", has = "signatureHelp" }, { "ca", vim.lsp.buf.code_action, desc = "Code Action", mode = { "n", "v" }, has = "codeAction" }, { "cA", diff --git a/lua/lazyvim/plugins/treesitter.lua b/lua/lazyvim/plugins/treesitter.lua index e66725c0..8e28e7fc 100644 --- a/lua/lazyvim/plugins/treesitter.lua +++ b/lua/lazyvim/plugins/treesitter.lua @@ -55,6 +55,7 @@ return { indent = { enable = true }, ensure_installed = { "bash", + "go", "c", "diff", "html", diff --git a/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index 50efb153..268a7627 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -4,6 +4,7 @@ return { -- Better `vim.notify()` { "rcarriga/nvim-notify", + enabled = false, keys = { { "un", @@ -287,8 +288,11 @@ return { -- Highly experimental plugin that completely replaces the UI for messages, cmdline and the popupmenu. { "folke/noice.nvim", - event = "VeryLazy", + -- event = "VeryLazy", opts = { + notify = { + enabled = false, + }, lsp = { override = { ["vim.lsp.util.convert_input_to_markdown_lines"] = true,