chore: change themes
This commit is contained in:
2
init.lua
2
init.lua
@@ -26,5 +26,3 @@ end
|
||||
require "lazy_setup"
|
||||
require "polish"
|
||||
|
||||
vim.g.copilot_no_tab_map = true
|
||||
|
||||
|
||||
@@ -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("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", {
|
||||
desc = "Disable auto insert comment newline",
|
||||
|
||||
@@ -23,9 +23,6 @@ return function()
|
||||
----------- Utility functions -------------
|
||||
-------------------------------------------
|
||||
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-Del>"] = { "<C-o>dw", desc = "Delete a word backward" }
|
||||
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.v["<Tab>"] = { ">gv", desc = "Indent line" }
|
||||
mappings.v["<S-Tab>"] = { "<gv", desc = "Unindent line" }
|
||||
|
||||
|
||||
-- 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
|
||||
mappings.v["K"] = { "<Nop>", desc = "Ignore error when hover on visual" }
|
||||
|
||||
------ 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" }
|
||||
|
||||
------ My customs keybinding ------
|
||||
mappings.n["<leader>xn"] = { "<Cmd>Telescope notify<CR>", desc = "Notifications" }
|
||||
|
||||
|
||||
return mappings
|
||||
end
|
||||
|
||||
@@ -21,7 +21,7 @@ return {
|
||||
tabstop = 2, -- set the number of space in a tab to 4
|
||||
softtabstop = 2, -- can be differnt from tabstop
|
||||
showtabline = 0, -- always show tabline
|
||||
expandtab = true, -- use spaces instead of tab
|
||||
expandtab = false, -- use spaces instead of tab
|
||||
undofile = true, -- enable persistent undo
|
||||
},
|
||||
-- vim.g.<key>
|
||||
@@ -29,5 +29,6 @@ return {
|
||||
-- configure global vim variables (vim.g)
|
||||
-- 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
|
||||
copilot_no_tab_map = true,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -98,36 +98,6 @@ return {
|
||||
-- mappings to be set up on attaching of a language server
|
||||
mappings = {
|
||||
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
|
||||
@@ -153,7 +123,6 @@ return {
|
||||
end
|
||||
|
||||
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.codeLensProvider = false
|
||||
client.server_capabilities.colorProvider = false
|
||||
@@ -175,7 +144,6 @@ return {
|
||||
client.server_capabilities.workspaceSymbolProvider = false
|
||||
client.server_capabilities.monikerProvider = 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.implementationProvider = false
|
||||
client.server_capabilities.foldingRangeProvider = false
|
||||
@@ -186,9 +154,6 @@ return {
|
||||
workspaceFolders = { 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,
|
||||
},
|
||||
|
||||
@@ -9,7 +9,7 @@ return {
|
||||
---@type AstroUIOpts
|
||||
opts = {
|
||||
-- change colorscheme
|
||||
colorscheme = "bamboo",
|
||||
colorscheme = "bamboo-multiplex",
|
||||
-- AstroUI allows you to easily modify highlight groups easily for any and all colorschemes
|
||||
highlights = require "plugins.configs.ui.highlights",
|
||||
|
||||
|
||||
@@ -1,19 +1,15 @@
|
||||
return {
|
||||
before_init = function(_, c)
|
||||
if not c.settings then
|
||||
c.settings = {}
|
||||
end
|
||||
if not c.settings.python then
|
||||
c.settings.python = {}
|
||||
end
|
||||
c.settings.python.pythonPath = vim.fn.exepath("python")
|
||||
if not c.settings then c.settings = {} end
|
||||
if not c.settings.python then c.settings.python = {} end
|
||||
c.settings.python.pythonPath = vim.fn.exepath "python"
|
||||
end,
|
||||
settings = {
|
||||
basedpyright = {
|
||||
disableLanguageServices = false,
|
||||
disableOrganizeImports = true,
|
||||
disableTaggedHints = true,
|
||||
|
||||
useLibraryCodeForTypes = true,
|
||||
analysis = {
|
||||
autoSearchPath = false,
|
||||
logLevel = "Trace",
|
||||
@@ -21,18 +17,17 @@ return {
|
||||
deprecateTypingAliases = false,
|
||||
inlayHints = {
|
||||
variableTypes = true,
|
||||
callArgumentNames = false,
|
||||
functionReturnTypes = true,
|
||||
callArgumentNames = true,
|
||||
pytestParameters = true,
|
||||
genericTypes = true,
|
||||
},
|
||||
ignore = {
|
||||
"unsloth_compiled_cache",
|
||||
"__pycache__",
|
||||
"**/unsloth_compiled_cache/**",
|
||||
"**/__pycache__/**",
|
||||
"__index__",
|
||||
},
|
||||
useLibraryCodeForTypes = true,
|
||||
},
|
||||
autoImportCompletions = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -12,9 +12,10 @@ return {
|
||||
},
|
||||
workspace = {
|
||||
-- environmentPath = "/home/duckq1u/miniconda3/envs/OCR3/bin/python",
|
||||
environmentPath = vim.fn.exepath("python"),
|
||||
environmentPath = vim.fn.exepath "python",
|
||||
ignore = {
|
||||
"/home/duckq1u/miniconda3/envs/OCR3/lib/python3.11/site-packages/transformers/mode ls/albert/configuration_albert.py",
|
||||
"**/unsloth_compiled_cache/**",
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
@@ -18,15 +18,15 @@ return {
|
||||
},
|
||||
},
|
||||
scope = {
|
||||
enabled = false, -- enable highlighting the current scope
|
||||
enabled = true, -- enable highlighting the current scope
|
||||
priority = 200,
|
||||
char = "",
|
||||
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
|
||||
},
|
||||
chunk = {
|
||||
enabled = true,
|
||||
enabled = false,
|
||||
char = {
|
||||
corner_top = "┏",
|
||||
corner_bottom = "┗",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
-- Treesitter context
|
||||
-- Treesitter context
|
||||
return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter-context",
|
||||
@@ -30,20 +30,22 @@ return {
|
||||
"andersevenrud/nvim_context_vt",
|
||||
event = "User AstroFile",
|
||||
cmd = { "NvimContextVtToggle" },
|
||||
opts = {
|
||||
prefix = " ",
|
||||
-- disable_virtual_lines = true,
|
||||
},
|
||||
dependencies = {
|
||||
"AstroNvim/astrocore",
|
||||
opts = {
|
||||
mappings = {
|
||||
n = {
|
||||
["<Leader>uv"] = {
|
||||
function()
|
||||
require("nvim_context_vt").toggle()
|
||||
end,
|
||||
function() require("nvim_context_vt").toggle() end,
|
||||
desc = "Toggle virutal text context",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ return {
|
||||
-- You can disable default plugins as follows:
|
||||
{ "max397574/better-escape.nvim", enabled = false },
|
||||
{ "andweeb/presence.nvim", enabled = false },
|
||||
{ "s1n7ax/nvim-window-picker", enabled = false },
|
||||
|
||||
-- Disabled formatting plugins
|
||||
{ "rafamadriz/friendly-snippets", enabled = false },
|
||||
@@ -13,6 +14,5 @@ return {
|
||||
-- Disabled development plugins
|
||||
{ "mfussenegger/nvim-dap", enabled = false },
|
||||
{ "jay-babu/mason-nvim-dap.nvim", enabled = false },
|
||||
{"brenton-leighton/multiple-cursors.nvim", enabled = false}
|
||||
{ "brenton-leighton/multiple-cursors.nvim", enabled = false },
|
||||
}
|
||||
|
||||
|
||||
@@ -28,8 +28,8 @@ return {
|
||||
package_installed = " ",
|
||||
package_pending = " ",
|
||||
package_uninstalled = " ",
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ return {
|
||||
["K"] = false,
|
||||
["H"] = false,
|
||||
},
|
||||
width = 50
|
||||
},
|
||||
enable_git_status = false,
|
||||
enable_diagnostics = false,
|
||||
@@ -34,6 +35,5 @@ return {
|
||||
},
|
||||
|
||||
-- Disabled file explorer plugins
|
||||
{ "s1n7ax/nvim-window-picker", enabled = false },
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ return {
|
||||
config = function()
|
||||
require("bamboo").setup {
|
||||
integrations = { mini = true },
|
||||
terminal_colors = false
|
||||
terminal_colors = false,
|
||||
}
|
||||
require("bamboo").load()
|
||||
end,
|
||||
@@ -36,8 +36,6 @@ return {
|
||||
function() require("which-key").show { global = false } end,
|
||||
desc = "Buffer Local Keymaps (which-key)",
|
||||
},
|
||||
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ return {
|
||||
event = "BufRead",
|
||||
opts = {
|
||||
hint_enable = false,
|
||||
doc_lines = 5,
|
||||
doc_lines = 0,
|
||||
},
|
||||
-- config = function() require("lsp_signature").setup() end,
|
||||
},
|
||||
@@ -23,9 +23,7 @@ return {
|
||||
-- customize dashboard options
|
||||
{
|
||||
"folke/snacks.nvim",
|
||||
config = function(_, opts)
|
||||
require("snacks").setup(opts)
|
||||
end,
|
||||
config = function(_, opts) require("snacks").setup(opts) end,
|
||||
opts = {
|
||||
dashboard = {
|
||||
preset = {
|
||||
@@ -33,10 +31,13 @@ return {
|
||||
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
|
||||
{
|
||||
@@ -49,7 +50,6 @@ return {
|
||||
end,
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
"altermo/ultimate-autopair.nvim",
|
||||
event = "InsertEnter",
|
||||
@@ -59,9 +59,7 @@ return {
|
||||
extensions = {
|
||||
cond = {
|
||||
cond = {
|
||||
function(fn)
|
||||
return not fn.in_node("comment")
|
||||
end,
|
||||
function(fn) return not fn.in_node "comment" end,
|
||||
},
|
||||
},
|
||||
fly = {
|
||||
@@ -86,21 +84,14 @@ return {
|
||||
desc = "Toggle Ultimate Autopair",
|
||||
function()
|
||||
local notify = require("astrocore").notify
|
||||
local function bool2str(bool)
|
||||
return bool and "on" or "off"
|
||||
end
|
||||
local function bool2str(bool) return bool and "on" or "off" end
|
||||
local ok, ultimate_autopair = pcall(require, "ultimate-autopair")
|
||||
if ok then
|
||||
ultimate_autopair.toggle()
|
||||
vim.g.ultimate_autopair_enabled = require("ultimate-autopair.core").disable
|
||||
notify(
|
||||
string.format(
|
||||
"ultimate-autopair %s",
|
||||
bool2str(not vim.g.ultimate_autopair_enabled)
|
||||
)
|
||||
)
|
||||
notify(string.format("ultimate-autopair %s", bool2str(not vim.g.ultimate_autopair_enabled)))
|
||||
else
|
||||
notify("ultimate-autopair not available")
|
||||
notify "ultimate-autopair not available"
|
||||
end
|
||||
end,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user