chore: change themes
This commit is contained in:
2
init.lua
2
init.lua
@@ -26,5 +26,3 @@ end
|
|||||||
require "lazy_setup"
|
require "lazy_setup"
|
||||||
require "polish"
|
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("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",
|
||||||
|
|||||||
@@ -23,43 +23,21 @@ 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" }
|
||||||
mappings.i["jj"] = { "<Esc>", desc = "Normal mode" }
|
mappings.i["jj"] = { "<Esc>", desc = "Normal mode" }
|
||||||
|
|
||||||
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
|
||||||
|
|||||||
@@ -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,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|
||||||
|
|||||||
@@ -1,38 +1,33 @@
|
|||||||
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
|
end,
|
||||||
c.settings.python = {}
|
settings = {
|
||||||
end
|
basedpyright = {
|
||||||
c.settings.python.pythonPath = vim.fn.exepath("python")
|
disableLanguageServices = false,
|
||||||
end,
|
disableOrganizeImports = true,
|
||||||
settings = {
|
disableTaggedHints = true,
|
||||||
basedpyright = {
|
useLibraryCodeForTypes = true,
|
||||||
disableLanguageServices = false,
|
analysis = {
|
||||||
disableOrganizeImports = true,
|
autoSearchPath = false,
|
||||||
disableTaggedHints = true,
|
logLevel = "Trace",
|
||||||
|
typeCheckingMode = "standard",
|
||||||
analysis = {
|
deprecateTypingAliases = false,
|
||||||
autoSearchPath = false,
|
inlayHints = {
|
||||||
logLevel = "Trace",
|
variableTypes = true,
|
||||||
typeCheckingMode = "standard",
|
callArgumentNames = false,
|
||||||
deprecateTypingAliases = false,
|
functionReturnTypes = true,
|
||||||
inlayHints = {
|
genericTypes = true,
|
||||||
variableTypes = true,
|
},
|
||||||
functionReturnTypes = true,
|
ignore = {
|
||||||
callArgumentNames = true,
|
"**/unsloth_compiled_cache/**",
|
||||||
pytestParameters = true,
|
"**/__pycache__/**",
|
||||||
},
|
"__index__",
|
||||||
ignore = {
|
},
|
||||||
"unsloth_compiled_cache",
|
autoImportCompletions = false,
|
||||||
"__pycache__",
|
},
|
||||||
"__index__",
|
},
|
||||||
},
|
},
|
||||||
useLibraryCodeForTypes = true,
|
|
||||||
},
|
|
||||||
autoImportCompletions = false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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/**",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -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 = "┗",
|
||||||
|
|||||||
@@ -1,49 +1,51 @@
|
|||||||
-- Treesitter context
|
-- Treesitter context
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"nvim-treesitter/nvim-treesitter-context",
|
"nvim-treesitter/nvim-treesitter-context",
|
||||||
event = "User AstroFile",
|
event = "User AstroFile",
|
||||||
cmd = { "TSContext" },
|
cmd = { "TSContext" },
|
||||||
opts = {
|
opts = {
|
||||||
on_attach = function()
|
on_attach = function()
|
||||||
vim.api.nvim_set_hl(0, "TreesitterContext", { underline = true, sp = "Red", bg = "#1e1e3f" })
|
vim.api.nvim_set_hl(0, "TreesitterContext", { underline = true, sp = "Red", bg = "#1e1e3f" })
|
||||||
end,
|
end,
|
||||||
max_lines = 2,
|
max_lines = 2,
|
||||||
},
|
},
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"AstroNvim/astrocore",
|
"AstroNvim/astrocore",
|
||||||
opts = {
|
opts = {
|
||||||
mappings = {
|
mappings = {
|
||||||
n = {
|
n = {
|
||||||
["<Leader>uT"] = {
|
["<Leader>uT"] = {
|
||||||
"<cmd>TSContext toggle<CR>",
|
"<cmd>TSContext toggle<CR>",
|
||||||
desc = "Toggle treesitter context",
|
desc = "Toggle treesitter context",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Virtual text context
|
-- Virtual text context
|
||||||
{
|
{
|
||||||
"andersevenrud/nvim_context_vt",
|
"andersevenrud/nvim_context_vt",
|
||||||
event = "User AstroFile",
|
event = "User AstroFile",
|
||||||
cmd = { "NvimContextVtToggle" },
|
cmd = { "NvimContextVtToggle" },
|
||||||
dependencies = {
|
opts = {
|
||||||
"AstroNvim/astrocore",
|
prefix = " ",
|
||||||
opts = {
|
-- disable_virtual_lines = true,
|
||||||
mappings = {
|
},
|
||||||
n = {
|
dependencies = {
|
||||||
["<Leader>uv"] = {
|
"AstroNvim/astrocore",
|
||||||
function()
|
opts = {
|
||||||
require("nvim_context_vt").toggle()
|
mappings = {
|
||||||
end,
|
n = {
|
||||||
desc = "Toggle virutal text context",
|
["<Leader>uv"] = {
|
||||||
},
|
function() require("nvim_context_vt").toggle() end,
|
||||||
},
|
desc = "Toggle virutal text context",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
return {
|
return {
|
||||||
{ "Wansmer/treesj", enabled = false },
|
{ "Wansmer/treesj", enabled = false },
|
||||||
|
|
||||||
-- 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 },
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,8 +28,8 @@ return {
|
|||||||
package_installed = " ",
|
package_installed = " ",
|
||||||
package_pending = " ",
|
package_pending = " ",
|
||||||
package_uninstalled = " ",
|
package_uninstalled = " ",
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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 },
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,19 +6,19 @@ 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,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"rebelot/heirline.nvim",
|
"rebelot/heirline.nvim",
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
opts.statusline = require("plugins.configs.ui.heirline").statusline
|
opts.statusline = require("plugins.configs.ui.heirline").statusline
|
||||||
opts.winbar = require("plugins.configs.ui.heirline").winbar
|
opts.winbar = require("plugins.configs.ui.heirline").winbar
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"folke/which-key.nvim",
|
"folke/which-key.nvim",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
opts = {
|
opts = {
|
||||||
@@ -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)",
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ return {
|
|||||||
"ray-x/lsp_signature.nvim",
|
"ray-x/lsp_signature.nvim",
|
||||||
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,11 +31,14 @@ 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
|
||||||
{
|
{
|
||||||
"L3MON4D3/LuaSnip",
|
"L3MON4D3/LuaSnip",
|
||||||
@@ -49,72 +50,62 @@ return {
|
|||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
{
|
"altermo/ultimate-autopair.nvim",
|
||||||
"altermo/ultimate-autopair.nvim",
|
event = "InsertEnter",
|
||||||
event = "InsertEnter",
|
-- branch = "v0.6",
|
||||||
-- branch = "v0.6",
|
opts = {
|
||||||
opts = {
|
cmap = false,
|
||||||
cmap = false,
|
extensions = {
|
||||||
extensions = {
|
cond = {
|
||||||
cond = {
|
cond = {
|
||||||
cond = {
|
function(fn) return not fn.in_node "comment" end,
|
||||||
function(fn)
|
},
|
||||||
return not fn.in_node("comment")
|
},
|
||||||
end,
|
fly = {
|
||||||
},
|
nofilter = true,
|
||||||
},
|
},
|
||||||
fly = {
|
},
|
||||||
nofilter = true,
|
config_internal_pairs = {
|
||||||
},
|
{ '"', '"', fly = true },
|
||||||
},
|
{ "'", "'", fly = true },
|
||||||
config_internal_pairs = {
|
{ "[", "]", fly = true },
|
||||||
{ '"', '"', fly = true },
|
{ "{", "}", fly = true },
|
||||||
{ "'", "'", fly = true },
|
{ "(", ")", fly = true },
|
||||||
{ "[", "]", fly = true },
|
},
|
||||||
{ "{", "}", fly = true },
|
},
|
||||||
{ "(", ")", fly = true },
|
dependencies = {
|
||||||
},
|
{
|
||||||
},
|
"AstroNvim/astrocore",
|
||||||
dependencies = {
|
opts = {
|
||||||
{
|
mappings = {
|
||||||
"AstroNvim/astrocore",
|
n = {
|
||||||
opts = {
|
["<Leader>ua"] = {
|
||||||
mappings = {
|
desc = "Toggle Ultimate Autopair",
|
||||||
n = {
|
function()
|
||||||
["<Leader>ua"] = {
|
local notify = require("astrocore").notify
|
||||||
desc = "Toggle Ultimate Autopair",
|
local function bool2str(bool) return bool and "on" or "off" end
|
||||||
function()
|
local ok, ultimate_autopair = pcall(require, "ultimate-autopair")
|
||||||
local notify = require("astrocore").notify
|
if ok then
|
||||||
local function bool2str(bool)
|
ultimate_autopair.toggle()
|
||||||
return bool and "on" or "off"
|
vim.g.ultimate_autopair_enabled = require("ultimate-autopair.core").disable
|
||||||
end
|
notify(string.format("ultimate-autopair %s", bool2str(not vim.g.ultimate_autopair_enabled)))
|
||||||
local ok, ultimate_autopair = pcall(require, "ultimate-autopair")
|
else
|
||||||
if ok then
|
notify "ultimate-autopair not available"
|
||||||
ultimate_autopair.toggle()
|
end
|
||||||
vim.g.ultimate_autopair_enabled = require("ultimate-autopair.core").disable
|
end,
|
||||||
notify(
|
},
|
||||||
string.format(
|
},
|
||||||
"ultimate-autopair %s",
|
},
|
||||||
bool2str(not vim.g.ultimate_autopair_enabled)
|
},
|
||||||
)
|
},
|
||||||
)
|
},
|
||||||
else
|
specs = {
|
||||||
notify("ultimate-autopair not available")
|
{
|
||||||
end
|
"windwp/nvim-autopairs",
|
||||||
end,
|
optional = true,
|
||||||
},
|
enabled = false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
|
||||||
},
|
|
||||||
specs = {
|
|
||||||
{
|
|
||||||
"windwp/nvim-autopairs",
|
|
||||||
optional = true,
|
|
||||||
enabled = false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user