initial commit
This commit is contained in:
parent
180a864e19
commit
f58d044ada
18 changed files with 747 additions and 1 deletions
177
lua/plugins/user.lua
Normal file
177
lua/plugins/user.lua
Normal file
|
|
@ -0,0 +1,177 @@
|
|||
-- You can also add or configure plugins by creating files in this `plugins/` folder
|
||||
-- PLEASE REMOVE THE EXAMPLES YOU HAVE NO INTEREST IN BEFORE ENABLING THIS FILE
|
||||
-- Here are some examples:
|
||||
|
||||
---@type LazySpec
|
||||
return {
|
||||
|
||||
-- == Examples of Adding Plugins ==
|
||||
|
||||
"andweeb/presence.nvim",
|
||||
{
|
||||
"ray-x/lsp_signature.nvim",
|
||||
event = "BufRead",
|
||||
config = function() require("lsp_signature").setup() end,
|
||||
},
|
||||
|
||||
-- == Examples of Overriding Plugins ==
|
||||
|
||||
-- customize dashboard options
|
||||
{
|
||||
"folke/snacks.nvim",
|
||||
opts = {
|
||||
dashboard = {
|
||||
preset = {
|
||||
header = table.concat({
|
||||
" █████ ███████ ████████ ██████ ██████ ",
|
||||
"██ ██ ██ ██ ██ ██ ██ ██",
|
||||
"███████ ███████ ██ ██████ ██ ██",
|
||||
"██ ██ ██ ██ ██ ██ ██ ██",
|
||||
"██ ██ ███████ ██ ██ ██ ██████ ",
|
||||
"",
|
||||
"███ ██ ██ ██ ██ ███ ███",
|
||||
"████ ██ ██ ██ ██ ████ ████",
|
||||
"██ ██ ██ ██ ██ ██ ██ ████ ██",
|
||||
"██ ██ ██ ██ ██ ██ ██ ██ ██",
|
||||
"██ ████ ████ ██ ██ ██",
|
||||
}, "\n"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- 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
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
keys = {
|
||||
{
|
||||
"<C-PageUp>",
|
||||
function()
|
||||
local ls = require "luasnip"
|
||||
if ls.choice_active() then ls.change_choice(1) end
|
||||
end,
|
||||
},
|
||||
},
|
||||
config = function(plugin, opts)
|
||||
require "astronvim.plugins.configs.luasnip"(plugin, opts) -- include the default astronvim config that calls the setup call
|
||||
-- add more custom luasnip configuration such as filetype extend or custom snippets
|
||||
local ls = require "luasnip"
|
||||
ls.filetype_extend("javascript", { "javascriptreact" })
|
||||
|
||||
require("luasnip.loaders.from_lua").load { paths = { "~/.config/snippets/" } }
|
||||
end,
|
||||
},
|
||||
|
||||
-- {
|
||||
-- "sagen/blink.cmp",
|
||||
-- opts = {
|
||||
-- sources = {
|
||||
-- providers = {
|
||||
-- cmdline = {
|
||||
-- enabled = function()
|
||||
-- -- ignores cmdline completions when executing shell commands
|
||||
-- return vim.fn.getcmdtype ~= ":" or not vim.fn.getcmdline():match "^[%%0-9,'<>%-]*!"
|
||||
-- end,
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
|
||||
{
|
||||
"windwp/nvim-autopairs",
|
||||
config = function(plugin, opts)
|
||||
require "astronvim.plugins.configs.nvim-autopairs"(plugin, opts) -- include the default astronvim config that calls the setup call
|
||||
-- add more custom autopairs configuration such as custom rules
|
||||
local npairs = require "nvim-autopairs"
|
||||
local Rule = require "nvim-autopairs.rule"
|
||||
local cond = require "nvim-autopairs.conds"
|
||||
npairs.add_rules(
|
||||
{
|
||||
Rule("$", "$", { "tex", "latex" })
|
||||
-- don't add a pair if the next character is %
|
||||
:with_pair(cond.not_after_regex "%%")
|
||||
-- don't add a pair if the previous character is xxx
|
||||
:with_pair(
|
||||
cond.not_before_regex("xxx", 3)
|
||||
)
|
||||
-- don't move right when repeat character
|
||||
:with_move(cond.none())
|
||||
-- don't delete if the next character is xx
|
||||
:with_del(cond.not_after_regex "xx")
|
||||
-- disable adding a newline when you press <cr>
|
||||
:with_cr(cond.none()),
|
||||
},
|
||||
-- disable for .vim files, but it work for another filetypes
|
||||
Rule("a", "a", "-vim")
|
||||
)
|
||||
end,
|
||||
},
|
||||
|
||||
-- {
|
||||
-- "vimwiki/vimwiki",
|
||||
-- event = "BufEnter *.md",
|
||||
-- ft = "md",
|
||||
-- lazy = false,
|
||||
-- keys = {
|
||||
-- { "<leader>W", desc = "VimWiki" },
|
||||
-- { "<leader>Ww", "<cmd>VimwikiIndex<cr>", desc = "VimWiki Index" },
|
||||
-- { "<leader>Ws", "<cmd>VimwikiUISelect<cr>", desc = "VimWiki UI Select" },
|
||||
-- { "<leader>Wt", "<cmd>VimwikiTabIndex<cr>", desc = "VimWiki Tab Index" },
|
||||
-- { "<leader>Wi", "<cmd>VimwikiDiaryIndex<cr>", desc = "VimWiki Diary Index" },
|
||||
-- { "<leader>W<leader>", desc = "VimWiki Diary" },
|
||||
-- { "<leader>W<leader>w", "<cmd>VimwikiMakeDiaryNote<cr>", desc = "VimWiki Diary: Today" },
|
||||
-- { "<leader>W<leader>t", "<cmd>VimwikiTabMakeDiaryNote<cr>", desc = "VimWiki Diary: Today (Tab)" },
|
||||
-- { "<leader>W<leader>i", "<cmd>Vimwiki<cr>", desc = "VimWiki Diary: Generate Links" },
|
||||
-- { "<leader>W<leader>m", "<cmd>Vimwiki<cr>", desc = "VimWiki Diary: Tomorrow" },
|
||||
-- { "<leader>W<leader>y", "<cmd>Vimwiki<cr>", desc = "VimWiki Diary: Yesterday" },
|
||||
-- },
|
||||
--
|
||||
-- init = function()
|
||||
-- vim.g.vimwiki_list = { {
|
||||
-- path = "~/vimwiki/",
|
||||
-- syntax = "markdown",
|
||||
-- ext = ".md",
|
||||
-- } }
|
||||
--
|
||||
-- vim.g.vimwiki_ext2syntax = {
|
||||
-- [".md"] = "markdown",
|
||||
-- [".markdown"] = "markdown",
|
||||
-- [".mdown"] = "markdown",
|
||||
-- }
|
||||
--
|
||||
-- vim.g.vimwiki_global_ext = 0
|
||||
-- end,
|
||||
-- },
|
||||
|
||||
{
|
||||
"kylechui/nvim-surround",
|
||||
version = "*",
|
||||
event = "VeryLazy",
|
||||
-- config = function()
|
||||
-- require("nvim-surround").setup {
|
||||
opts = {
|
||||
keymaps = {
|
||||
normal = ",s",
|
||||
normal_line = "gS",
|
||||
delete = "d,s",
|
||||
visual = ",S",
|
||||
visual_line = ",S",
|
||||
change = "c,s",
|
||||
change_line = "c,S",
|
||||
},
|
||||
},
|
||||
-- }
|
||||
-- end,
|
||||
},
|
||||
|
||||
{
|
||||
"stevearc/oil.nvim",
|
||||
keys = {
|
||||
{ "<leader>-", desc = "🛢️Oil toggle", mode = { "n" }, require("oil").toggle_float },
|
||||
},
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue