chore: change themes

This commit is contained in:
huyjaky
2025-08-24 22:14:35 +07:00
parent 44d2f8999a
commit 04c5dcd06a
15 changed files with 172 additions and 243 deletions

View File

@@ -26,5 +26,3 @@ end
require "lazy_setup" require "lazy_setup"
require "polish" require "polish"
vim.g.copilot_no_tab_map = true

View File

@@ -5,7 +5,7 @@ vim.api.nvim_create_augroup("auto_wrap", { clear = true })
vim.api.nvim_create_augroup("disable_suspend_with_c_z", { clear = true }) vim.api.nvim_create_augroup("disable_suspend_with_c_z", { clear = true })
vim.api.nvim_create_augroup("clear_last_search", { clear = true }) vim.api.nvim_create_augroup("clear_last_search", { clear = true })
vim.keymap.set("v", "K", "<Nop>", { silent = true }) -- vim.keymap.set("v", "K", "<Nop>", { silent = true })
vim.api.nvim_create_autocmd("BufEnter", { vim.api.nvim_create_autocmd("BufEnter", {
desc = "Disable auto insert comment newline", desc = "Disable auto insert comment newline",

View File

@@ -23,9 +23,6 @@ return function()
----------- Utility functions ------------- ----------- Utility functions -------------
------------------------------------------- -------------------------------------------
mappings.n["<C-z>"] = { "u", desc = "Undo" } mappings.n["<C-z>"] = { "u", desc = "Undo" }
-- mappings.n["<S-k>"] = { "u", desc = "Undo" }
-- mappings.n["K"] = { function() vim.lsp.buf.hover() end, desc = "Hover symbol details"}
mappings.i["<C-z>"] = { "<C-o>u", desc = "Undo" } mappings.i["<C-z>"] = { "<C-o>u", desc = "Undo" }
mappings.i["<C-Del>"] = { "<C-o>dw", desc = "Delete a word backward" } mappings.i["<C-Del>"] = { "<C-o>dw", desc = "Delete a word backward" }
mappings.i["<C-s>"] = { "<Cmd>w!<CR>", desc = "Save file" } mappings.i["<C-s>"] = { "<Cmd>w!<CR>", desc = "Save file" }
@@ -34,32 +31,13 @@ return function()
mappings.i["<S-Tab>"] = { "<C-d>", desc = "Unindent line" } mappings.i["<S-Tab>"] = { "<C-d>", desc = "Unindent line" }
mappings.v["<Tab>"] = { ">gv", desc = "Indent line" } mappings.v["<Tab>"] = { ">gv", desc = "Indent line" }
mappings.v["<S-Tab>"] = { "<gv", desc = "Unindent line" } mappings.v["<S-Tab>"] = { "<gv", desc = "Unindent line" }
mappings.v["K"] = { "<Nop>", desc = "Ignore error when hover on visual" }
-- Separate cut and delete motion
-- for key, map in pairs {
-- ["d"] = { '"_d', desc = "Delete" },
-- ["X"] = { "d", desc = "Cut" },
-- } do
-- mappings.n[key] = map
-- mappings.v[key] = map
-- end
------ Motions related to jumping or selecting ------ ------ Motions related to jumping or selecting ------
-- for key, map in pairs {
-- ["H"] = { "^", desc = "Jump to beginning of line" },
-- ["L"] = { "$", desc = "Jump to end of line" },
-- ["K"] = { "5k", desc = "Move up 5 lines" },
-- ["J"] = { "5j", desc = "Move down 5 lines" },
-- } do
-- mappings.n[key] = map
-- mappings.v[key] = map
-- end
mappings.n["<C-a>"] = { "ggVG", desc = "Select all lines" } mappings.n["<C-a>"] = { "ggVG", desc = "Select all lines" }
------ My customs keybinding ------ ------ My customs keybinding ------
mappings.n["<leader>xn"] = { "<Cmd>Telescope notify<CR>", desc = "Notifications" } mappings.n["<leader>xn"] = { "<Cmd>Telescope notify<CR>", desc = "Notifications" }
return mappings return mappings
end end

View File

@@ -21,7 +21,7 @@ return {
tabstop = 2, -- set the number of space in a tab to 4 tabstop = 2, -- set the number of space in a tab to 4
softtabstop = 2, -- can be differnt from tabstop softtabstop = 2, -- can be differnt from tabstop
showtabline = 0, -- always show tabline showtabline = 0, -- always show tabline
expandtab = true, -- use spaces instead of tab expandtab = false, -- use spaces instead of tab
undofile = true, -- enable persistent undo undofile = true, -- enable persistent undo
}, },
-- vim.g.<key> -- vim.g.<key>
@@ -29,5 +29,6 @@ return {
-- configure global vim variables (vim.g) -- configure global vim variables (vim.g)
-- NOTE: `mapleader` and `maplocalleader` must be set in the AstroNvim opts or before `lazy.setup` -- NOTE: `mapleader` and `maplocalleader` must be set in the AstroNvim opts or before `lazy.setup`
-- This can be found in the `lua/lazy_setup.lua` file -- This can be found in the `lua/lazy_setup.lua` file
copilot_no_tab_map = true,
}, },
} }

View File

@@ -98,36 +98,6 @@ return {
-- mappings to be set up on attaching of a language server -- mappings to be set up on attaching of a language server
mappings = { mappings = {
n = { n = {
gh = {
function()
vim.lsp.buf.hover()
end,
desc = "Hover symbol details",
cond = "textDocument/hover",
},
gl = {
function()
vim.diagnostic.open_float()
end,
desc = "Hover diagnostics",
},
-- a `cond` key can provided as the string of a server capability to be required to attach, or a function with `client` and `bufnr` parameters from the `on_attach` that returns a boolean
gD = {
function()
vim.lsp.buf.declaration()
end,
desc = "Declaration of current symbol",
cond = "textDocument/declaration",
},
["<Leader>uY"] = {
function()
require("astrolsp.toggles").buffer_semantic_tokens()
end,
desc = "Toggle LSP semantic highlight (buffer)",
cond = function(client)
return client.server_capabilities.semanticTokensProvider and vim.lsp.semantic_tokens
end,
},
}, },
}, },
-- A custom `on_attach` function to be run after the default `on_attach` function -- A custom `on_attach` function to be run after the default `on_attach` function
@@ -153,7 +123,6 @@ return {
end end
if client.name == "basedpyright" then if client.name == "basedpyright" then
-- Tắt hết các dịch vụ, chỉ giữ lại diagnostics và inlay hints
client.server_capabilities.completionProvider = false client.server_capabilities.completionProvider = false
client.server_capabilities.codeLensProvider = false client.server_capabilities.codeLensProvider = false
client.server_capabilities.colorProvider = false client.server_capabilities.colorProvider = false
@@ -175,7 +144,6 @@ return {
client.server_capabilities.workspaceSymbolProvider = false client.server_capabilities.workspaceSymbolProvider = false
client.server_capabilities.monikerProvider = false client.server_capabilities.monikerProvider = false
client.server_capabilities.semanticTokensProvider = false client.server_capabilities.semanticTokensProvider = false
-- Tắt thêm các capabilities khác có thể có
client.server_capabilities.referencesProvider = false client.server_capabilities.referencesProvider = false
client.server_capabilities.implementationProvider = false client.server_capabilities.implementationProvider = false
client.server_capabilities.foldingRangeProvider = false client.server_capabilities.foldingRangeProvider = false
@@ -186,9 +154,6 @@ return {
workspaceFolders = { supported = false }, workspaceFolders = { supported = false },
fileOperations = { supported = false } fileOperations = { supported = false }
} }
-- Giữ lại diagnostics và inlay hints
-- client.server_capabilities.diagnosticProvider = true (mặc định)
-- client.server_capabilities.inlayHintProvider = true (mặc định)
end end
end, end,
}, },

View File

@@ -9,7 +9,7 @@ return {
---@type AstroUIOpts ---@type AstroUIOpts
opts = { opts = {
-- change colorscheme -- change colorscheme
colorscheme = "bamboo", colorscheme = "bamboo-multiplex",
-- AstroUI allows you to easily modify highlight groups easily for any and all colorschemes -- AstroUI allows you to easily modify highlight groups easily for any and all colorschemes
highlights = require "plugins.configs.ui.highlights", highlights = require "plugins.configs.ui.highlights",

View File

@@ -1,19 +1,15 @@
return { return {
before_init = function(_, c) before_init = function(_, c)
if not c.settings then if not c.settings then c.settings = {} end
c.settings = {} if not c.settings.python then c.settings.python = {} end
end c.settings.python.pythonPath = vim.fn.exepath "python"
if not c.settings.python then
c.settings.python = {}
end
c.settings.python.pythonPath = vim.fn.exepath("python")
end, end,
settings = { settings = {
basedpyright = { basedpyright = {
disableLanguageServices = false, disableLanguageServices = false,
disableOrganizeImports = true, disableOrganizeImports = true,
disableTaggedHints = true, disableTaggedHints = true,
useLibraryCodeForTypes = true,
analysis = { analysis = {
autoSearchPath = false, autoSearchPath = false,
logLevel = "Trace", logLevel = "Trace",
@@ -21,18 +17,17 @@ return {
deprecateTypingAliases = false, deprecateTypingAliases = false,
inlayHints = { inlayHints = {
variableTypes = true, variableTypes = true,
callArgumentNames = false,
functionReturnTypes = true, functionReturnTypes = true,
callArgumentNames = true, genericTypes = true,
pytestParameters = true,
}, },
ignore = { ignore = {
"unsloth_compiled_cache", "**/unsloth_compiled_cache/**",
"__pycache__", "**/__pycache__/**",
"__index__", "__index__",
}, },
useLibraryCodeForTypes = true,
},
autoImportCompletions = false, autoImportCompletions = false,
}, },
}, },
},
} }

View File

@@ -12,9 +12,10 @@ return {
}, },
workspace = { workspace = {
-- environmentPath = "/home/duckq1u/miniconda3/envs/OCR3/bin/python", -- environmentPath = "/home/duckq1u/miniconda3/envs/OCR3/bin/python",
environmentPath = vim.fn.exepath("python"), environmentPath = vim.fn.exepath "python",
ignore = { ignore = {
"/home/duckq1u/miniconda3/envs/OCR3/lib/python3.11/site-packages/transformers/mode ls/albert/configuration_albert.py", "/home/duckq1u/miniconda3/envs/OCR3/lib/python3.11/site-packages/transformers/mode ls/albert/configuration_albert.py",
"**/unsloth_compiled_cache/**",
}, },
}, },

View File

@@ -18,15 +18,15 @@ return {
}, },
}, },
scope = { scope = {
enabled = false, -- enable highlighting the current scope enabled = true, -- enable highlighting the current scope
priority = 200, priority = 200,
char = "󰥓", char = "",
underline = false, -- underline the start of the scope underline = false, -- underline the start of the scope
only_current = false, -- only show scope in the current window only_current = false, -- only show scope in the current window
hl = "SnacksIndentScope", ---@type string|string[] hl group for scopes hl = "SnacksIndentScope", ---@type string|string[] hl group for scopes
}, },
chunk = { chunk = {
enabled = true, enabled = false,
char = { char = {
corner_top = "", corner_top = "",
corner_bottom = "", corner_bottom = "",

View File

@@ -1,4 +1,4 @@
-- Treesitter context -- Treesitter context
return { return {
{ {
"nvim-treesitter/nvim-treesitter-context", "nvim-treesitter/nvim-treesitter-context",
@@ -30,20 +30,22 @@ return {
"andersevenrud/nvim_context_vt", "andersevenrud/nvim_context_vt",
event = "User AstroFile", event = "User AstroFile",
cmd = { "NvimContextVtToggle" }, cmd = { "NvimContextVtToggle" },
opts = {
prefix = "",
-- disable_virtual_lines = true,
},
dependencies = { dependencies = {
"AstroNvim/astrocore", "AstroNvim/astrocore",
opts = { opts = {
mappings = { mappings = {
n = { n = {
["<Leader>uv"] = { ["<Leader>uv"] = {
function() function() require("nvim_context_vt").toggle() end,
require("nvim_context_vt").toggle()
end,
desc = "Toggle virutal text context", desc = "Toggle virutal text context",
}, },
}, },
}, },
}, },
}, },
} },
} }

View File

@@ -4,6 +4,7 @@ return {
-- You can disable default plugins as follows: -- You can disable default plugins as follows:
{ "max397574/better-escape.nvim", enabled = false }, { "max397574/better-escape.nvim", enabled = false },
{ "andweeb/presence.nvim", enabled = false }, { "andweeb/presence.nvim", enabled = false },
{ "s1n7ax/nvim-window-picker", enabled = false },
-- Disabled formatting plugins -- Disabled formatting plugins
{ "rafamadriz/friendly-snippets", enabled = false }, { "rafamadriz/friendly-snippets", enabled = false },
@@ -13,6 +14,5 @@ return {
-- Disabled development plugins -- Disabled development plugins
{ "mfussenegger/nvim-dap", enabled = false }, { "mfussenegger/nvim-dap", enabled = false },
{ "jay-babu/mason-nvim-dap.nvim", enabled = false }, { "jay-babu/mason-nvim-dap.nvim", enabled = false },
{"brenton-leighton/multiple-cursors.nvim", enabled = false} { "brenton-leighton/multiple-cursors.nvim", enabled = false },
} }

View File

@@ -28,8 +28,8 @@ return {
package_installed = "", package_installed = "",
package_pending = "", package_pending = "",
package_uninstalled = "", package_uninstalled = "",
} },
} },
}, },
}, },
} }

View File

@@ -26,6 +26,7 @@ return {
["K"] = false, ["K"] = false,
["H"] = false, ["H"] = false,
}, },
width = 50
}, },
enable_git_status = false, enable_git_status = false,
enable_diagnostics = false, enable_diagnostics = false,
@@ -34,6 +35,5 @@ return {
}, },
-- Disabled file explorer plugins -- Disabled file explorer plugins
{ "s1n7ax/nvim-window-picker", enabled = false },
} }

View File

@@ -6,7 +6,7 @@ return {
config = function() config = function()
require("bamboo").setup { require("bamboo").setup {
integrations = { mini = true }, integrations = { mini = true },
terminal_colors = false terminal_colors = false,
} }
require("bamboo").load() require("bamboo").load()
end, end,
@@ -36,8 +36,6 @@ return {
function() require("which-key").show { global = false } end, function() require("which-key").show { global = false } end,
desc = "Buffer Local Keymaps (which-key)", desc = "Buffer Local Keymaps (which-key)",
}, },
}, },
} },
} }

View File

@@ -13,7 +13,7 @@ return {
event = "BufRead", event = "BufRead",
opts = { opts = {
hint_enable = false, hint_enable = false,
doc_lines = 5, doc_lines = 0,
}, },
-- config = function() require("lsp_signature").setup() end, -- config = function() require("lsp_signature").setup() end,
}, },
@@ -23,9 +23,7 @@ return {
-- customize dashboard options -- customize dashboard options
{ {
"folke/snacks.nvim", "folke/snacks.nvim",
config = function(_, opts) config = function(_, opts) require("snacks").setup(opts) end,
require("snacks").setup(opts)
end,
opts = { opts = {
dashboard = { dashboard = {
preset = { preset = {
@@ -33,10 +31,13 @@ return {
keys = {}, keys = {},
}, },
}, },
indent = require( "plugins.configs.ui.indent" ), indent = require "plugins.configs.ui.indent",
}, dim = { enabled = false },
}, terminal = { enabled = false },
profiler = { enabled = false },
},
},
-- You can also easily customize additional setup of plugins that is outside of the plugin's setup call -- You can also easily customize additional setup of plugins that is outside of the plugin's setup call
{ {
@@ -49,7 +50,6 @@ return {
end, end,
}, },
{ {
"altermo/ultimate-autopair.nvim", "altermo/ultimate-autopair.nvim",
event = "InsertEnter", event = "InsertEnter",
@@ -59,9 +59,7 @@ return {
extensions = { extensions = {
cond = { cond = {
cond = { cond = {
function(fn) function(fn) return not fn.in_node "comment" end,
return not fn.in_node("comment")
end,
}, },
}, },
fly = { fly = {
@@ -86,21 +84,14 @@ return {
desc = "Toggle Ultimate Autopair", desc = "Toggle Ultimate Autopair",
function() function()
local notify = require("astrocore").notify local notify = require("astrocore").notify
local function bool2str(bool) local function bool2str(bool) return bool and "on" or "off" end
return bool and "on" or "off"
end
local ok, ultimate_autopair = pcall(require, "ultimate-autopair") local ok, ultimate_autopair = pcall(require, "ultimate-autopair")
if ok then if ok then
ultimate_autopair.toggle() ultimate_autopair.toggle()
vim.g.ultimate_autopair_enabled = require("ultimate-autopair.core").disable vim.g.ultimate_autopair_enabled = require("ultimate-autopair.core").disable
notify( notify(string.format("ultimate-autopair %s", bool2str(not vim.g.ultimate_autopair_enabled)))
string.format(
"ultimate-autopair %s",
bool2str(not vim.g.ultimate_autopair_enabled)
)
)
else else
notify("ultimate-autopair not available") notify "ultimate-autopair not available"
end end
end, end,
}, },