From c14541a752f06af490ca79a340475d8c25b49280 Mon Sep 17 00:00:00 2001 From: huyjaky Date: Sat, 23 Aug 2025 01:50:39 +0700 Subject: [PATCH] copilot when blink suggest --- lua/plugins/astroui.lua | 1 + lua/plugins/cmps.lua | 6 ++++-- lua/plugins/configs/ui/heirline.lua | 4 ++-- lua/plugins/configs/ui/icons.lua | 4 ++-- lua/plugins/configs/ui/indent.lua | 25 ++++++++++++++++++++++ lua/plugins/developments.lua | 5 ----- lua/plugins/disabled.lua | 17 +++++++++++++++ lua/plugins/motions.lua | 4 ---- lua/plugins/none-ls.lua | 4 ---- lua/plugins/user.lua | 32 ++--------------------------- 10 files changed, 53 insertions(+), 49 deletions(-) create mode 100644 lua/plugins/configs/ui/indent.lua create mode 100644 lua/plugins/disabled.lua diff --git a/lua/plugins/astroui.lua b/lua/plugins/astroui.lua index ce5a5a4..752079e 100644 --- a/lua/plugins/astroui.lua +++ b/lua/plugins/astroui.lua @@ -12,6 +12,7 @@ return { colorscheme = "bamboo", -- AstroUI allows you to easily modify highlight groups easily for any and all colorschemes highlights = require "plugins.configs.ui.highlights", + -- Icons can be configured throughout the interface icons = require "plugins.configs.ui.icons", status = require "plugins.configs.ui.status", diff --git a/lua/plugins/cmps.lua b/lua/plugins/cmps.lua index 49764bd..b438721 100644 --- a/lua/plugins/cmps.lua +++ b/lua/plugins/cmps.lua @@ -6,10 +6,13 @@ return { vim.api.nvim_set_keymap("i", "", 'copilot#Accept("\\")', { expr = true, silent = true }) end, }, - { "Saghen/blink.cmp", opts = { + keymap = { + preset = "default", + [""] = false, + }, completion = { list = { selection = { preselect = true, auto_insert = true } }, ghost_text = { @@ -31,7 +34,6 @@ return { return hl end, }, - }, }, }, diff --git a/lua/plugins/configs/ui/heirline.lua b/lua/plugins/configs/ui/heirline.lua index aa9ba51..1a680be 100644 --- a/lua/plugins/configs/ui/heirline.lua +++ b/lua/plugins/configs/ui/heirline.lua @@ -30,7 +30,7 @@ M.statusline = { }, }, status.component.git_branch { - padding = { left = 0, right = 1 }, + padding = { left = 1, right = 1 }, surround = { separator = "none", color = "bg", @@ -52,7 +52,7 @@ M.statusline = { }, }, status.component.git_diff { - padding = { left = 1 }, + padding = { left = 0 }, surround = { separator = "none", color = "bg", diff --git a/lua/plugins/configs/ui/icons.lua b/lua/plugins/configs/ui/icons.lua index b7a37bf..906d004 100644 --- a/lua/plugins/configs/ui/icons.lua +++ b/lua/plugins/configs/ui/icons.lua @@ -16,9 +16,9 @@ return { -- Git Github = "  ", GitAdd = " ", - GitBranch = " ", + GitBranch = "", GitChange = " ", - GitConflict = " ", + GitConflict = "", GitDelete = " ", GitIgnored = " ", GitRenamed = " ", diff --git a/lua/plugins/configs/ui/indent.lua b/lua/plugins/configs/ui/indent.lua new file mode 100644 index 0000000..148f916 --- /dev/null +++ b/lua/plugins/configs/ui/indent.lua @@ -0,0 +1,25 @@ +return { + priority = 1, + enabled = true, -- enable indent guides + only_scope = true, -- only show indent guides of the scope + only_current = false, -- only show indent guides in the current window + hl = "SnacksIndent", ---@type string|string[] hl groups for indent guides + + animate = { + enabled = vim.fn.has("nvim-0.10") == 1, + style = "up_down", + easing = "linear", + duration = { + step = 50, -- ms per step + total = 500, -- maximum duration + }, + }, + scope = { + enabled = true, -- enable highlighting the current scope + priority = 200, + char = "󰥓", + underline = false, -- underline the start of the scope + only_current = false, -- only show scope in the current window + hl = "SnacksIndentScope", ---@type string|string[] hl group for scopes + }, +} diff --git a/lua/plugins/developments.lua b/lua/plugins/developments.lua index e16006e..5e9780c 100644 --- a/lua/plugins/developments.lua +++ b/lua/plugins/developments.lua @@ -85,7 +85,6 @@ return { end end, }, - -- DAP Virtual Text (disabled) { "theHamsta/nvim-dap-virtual-text", @@ -99,8 +98,4 @@ return { virt_text_pos = "eol", }, }, - - -- Disabled development plugins - { "mfussenegger/nvim-dap", enabled = false }, - { "jay-babu/mason-nvim-dap.nvim", enabled = false }, } diff --git a/lua/plugins/disabled.lua b/lua/plugins/disabled.lua new file mode 100644 index 0000000..2ce3128 --- /dev/null +++ b/lua/plugins/disabled.lua @@ -0,0 +1,17 @@ +return { + { "Wansmer/treesj", enabled = false }, + + -- You can disable default plugins as follows: + { "max397574/better-escape.nvim", enabled = false }, + { "andweeb/presence.nvim", enabled = false }, + + -- Disabled formatting plugins + { "rafamadriz/friendly-snippets", enabled = false }, + { "JoosepAlviste/nvim-ts-context-commentstring", enabled = false }, + { "windwp/nvim-ts-autotag", enabled = false }, + + -- Disabled development plugins + { "mfussenegger/nvim-dap", enabled = false }, + { "jay-babu/mason-nvim-dap.nvim", enabled = false }, +} + diff --git a/lua/plugins/motions.lua b/lua/plugins/motions.lua index 9852e3d..ad00f9e 100644 --- a/lua/plugins/motions.lua +++ b/lua/plugins/motions.lua @@ -120,8 +120,4 @@ return { }, }, }, - - -- Disabled motion plugins - { "Wansmer/treesj", enabled = false }, - } diff --git a/lua/plugins/none-ls.lua b/lua/plugins/none-ls.lua index fe1c63d..cc59816 100644 --- a/lua/plugins/none-ls.lua +++ b/lua/plugins/none-ls.lua @@ -17,8 +17,4 @@ return { end, }, - -- Disabled formatting plugins - { "rafamadriz/friendly-snippets", enabled = false }, - { "JoosepAlviste/nvim-ts-context-commentstring", enabled = false }, - { "windwp/nvim-ts-autotag", enabled = false }, } diff --git a/lua/plugins/user.lua b/lua/plugins/user.lua index 82d3c2b..26ba0d6 100644 --- a/lua/plugins/user.lua +++ b/lua/plugins/user.lua @@ -29,38 +29,10 @@ return { keys = {}, }, }, - - indent = { - priority = 1, - enabled = true, -- enable indent guides - -- char = "l", - only_scope = true, -- only show indent guides of the scope - only_current = false, -- only show indent guides in the current window - hl = "SnacksIndent", ---@type string|string[] hl groups for indent guides - - animate = { - enabled = vim.fn.has("nvim-0.10") == 1, - style = "out", - easing = "linear", - duration = { - step = 10, -- ms per step - total = 500, -- maximum duration - }, - }, - scope = { - enabled = true, -- enable highlighting the current scope - priority = 200, - char = "󰥓", - underline = false, -- underline the start of the scope - only_current = false, -- only show scope in the current window - hl = "SnacksIndentScope", ---@type string|string[] hl group for scopes - }, - }, + indent = require( "plugins.configs.ui.indent" ), }, }, - -- You can disable default plugins as follows: - { "max397574/better-escape.nvim", enabled = false }, -- You can also easily customize additional setup of plugins that is outside of the plugin's setup call { @@ -77,7 +49,7 @@ return { { "altermo/ultimate-autopair.nvim", event = "InsertEnter", - branch = "v0.6", + -- branch = "v0.6", opts = { cmap = false, extensions = {