New Taskbar, Window Manager & Neovim config
This commit is contained in:
@@ -1,44 +1,47 @@
|
||||
{
|
||||
"LuaSnip": { "branch": "master", "commit": "1def35377854535bb3b0f4cc7a33c083cdb12571" },
|
||||
"LuaSnip": { "branch": "master", "commit": "de1a287c9cb525ae52bc846e8f6207e5ef1da5ac" },
|
||||
"ReplaceWithRegister": { "branch": "master", "commit": "832efc23111d19591d495dc72286de2fb0b09345" },
|
||||
"alpha-nvim": { "branch": "main", "commit": "29074eeb869a6cbac9ce1fbbd04f5f5940311b32" },
|
||||
"bufferline.nvim": { "branch": "main", "commit": "1a3397556d194bb1f2cc530b07124ccc512c5501" },
|
||||
"alpha-nvim": { "branch": "main", "commit": "41283fb402713fc8b327e60907f74e46166f4cfd" },
|
||||
"bufferline.nvim": { "branch": "main", "commit": "73540cb95f8d95aa1af3ed57713c6720c78af915" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
|
||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
||||
"comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
|
||||
"dracula.nvim": { "branch": "main", "commit": "7200e64c589f899d29f8963aad7543856d1c2545" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "53d3df271d031c405255e99410628c26a8f0d2b0" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "6ef8c54fb526bf3a0bc4efb0b2fe8e6d9a7daed2" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" },
|
||||
"lspkind.nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "2248ef254d0a1488a72041cfb45ca9caada6d994" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "41674c9d50f23cfa3e11f0ca964eb9100c2a8922" },
|
||||
"mason-null-ls.nvim": { "branch": "main", "commit": "d1f7258f80867f718d643d88eee66959671a4bef" },
|
||||
"mason-tool-installer.nvim": { "branch": "main", "commit": "e4f34741daa9cf95de68a603d3e7a6844a69fdf0" },
|
||||
"mason.nvim": { "branch": "main", "commit": "41e75af1f578e55ba050c863587cffde3556ffa6" },
|
||||
"neorg": { "branch": "main", "commit": "f4466457396717d10d2d235d019e0a80e1770087" },
|
||||
"noice.nvim": { "branch": "main", "commit": "92433164e2f7118d4122c7674c3834d9511722ba" },
|
||||
"none-ls.nvim": { "branch": "main", "commit": "3a4826687da4310af379515086d71faca4d21288" },
|
||||
"nui.nvim": { "branch": "main", "commit": "257dccc43b4badc735978f0791d216f7d665b75a" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "0f04d78619cce9a5af4f355968040f7d675854a1" },
|
||||
"nvim-bufdel": { "branch": "main", "commit": "96c4f7ab053ddab0025bebe5f7c71e4795430e47" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "0b751f6beef40fd47375eaf53d3057e0bfa317e4" },
|
||||
"nvim-lint": { "branch": "master", "commit": "6f589cb93560581dc2a3b9693658afe865e5649e" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "fcf153fbbf1facd16a71d46b92be8be495123a9f" },
|
||||
"nvim-notify": { "branch": "master", "commit": "e4a2022f4fec2d5ebc79afa612f96d8b11c627b3" },
|
||||
"nvim-surround": { "branch": "main", "commit": "0855a89e00a5822c3a482a82e5223fcf2e9ede13" },
|
||||
"nvim-tree.lua": { "branch": "master", "commit": "05f55c1fd6470b31627655c528245794e3cd4b2c" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "36f81e698ee67cba76f698a5a86fb7c6ecdeb7b0" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "c71406807b545f4a2c17310197a8c88b976f338d" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "5efb8bd06841f91f97c90e16de85e96d57e9c862" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" },
|
||||
"telescope.nvim": { "branch": "0.1.x", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" },
|
||||
"vim-fugitive": { "branch": "master", "commit": "46eaf8918b347906789df296143117774e827616" },
|
||||
"dracula.nvim": { "branch": "main", "commit": "8d8bddb8814c3e7e62d80dda65a9876f97eb699c" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "dd2fd1281d4b22e7b4a5bfafa3e142d958e251f2" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "805610a9393fa231f2c2b49cb521bfa413fadb3d" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "c717ab88ff47830845a1e422a1d6495c764fac1d" },
|
||||
"lspkind.nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "9ae570e206360e47d30b4c35a4550c165f4ea7b7" },
|
||||
"mason-null-ls.nvim": { "branch": "main", "commit": "de19726de7260c68d94691afb057fa73d3cc53e7" },
|
||||
"mason-tool-installer.nvim": { "branch": "main", "commit": "c1fbdcb0d8d1295314f1612c4a247253e70299d9" },
|
||||
"mason.nvim": { "branch": "main", "commit": "49ff59aded1047a773670651cfa40e76e63c6377" },
|
||||
"noice.nvim": { "branch": "main", "commit": "4a691f630c75966397f7a67c6860c03ae5da643f" },
|
||||
"none-ls-extras.nvim": { "branch": "main", "commit": "336e84b9e43c0effb735b08798ffac382920053b" },
|
||||
"none-ls.nvim": { "branch": "main", "commit": "37671797d6e5f9bd0ee3ab965ab2e6de251e1930" },
|
||||
"nui.nvim": { "branch": "main", "commit": "b1b3dcd6ed8f355c78bad3d395ff645be5f8b6ae" },
|
||||
"nvim-FeMaco.lua": { "branch": "main", "commit": "96bbf843595dbe865838b3f2484b73557f34700c" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "b0b79e42a28f09719a7da9534c3731fa37319d9b" },
|
||||
"nvim-bufdel": { "branch": "main", "commit": "523d58e94e7212fff3e05c247b962dc8f93bcfde" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "5260e5e8ecadaf13e6b82cf867a909f54e15fd07" },
|
||||
"nvim-lint": { "branch": "master", "commit": "1f98d6c863f91706369d74aeb2eb3f02b2e96861" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "6d2ae9fdc3111a6e8fd5db2467aca11737195a30" },
|
||||
"nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" },
|
||||
"nvim-surround": { "branch": "main", "commit": "79aaa42da1f698ed31bcbe7f83081f69dca7ba17" },
|
||||
"nvim-tree.lua": { "branch": "master", "commit": "2bc725a3ebc23f0172fb0ab4d1134b81bcc13812" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "1eabe69bfa8f78e14fcf5d42a2b3881babaca30a" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "5f9bf4b1ead7707e4e74e5319ee56bdc81fb73db" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "e37bb1feee9e7320c76050a55443fa843b4b6f83" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "08e301982b9a057110ede7a735dd1b5285eb341f" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" },
|
||||
"telescope-live-grep-args.nvim": { "branch": "master", "commit": "731a046da7dd3adff9de871a42f9b7fb85f60f47" },
|
||||
"telescope.nvim": { "branch": "0.1.x", "commit": "6312868392331c9c0f22725041f1ec2bef57c751" },
|
||||
"vim-fugitive": { "branch": "master", "commit": "5a9bd42dd8dd127779f3cd8982a0419b7ca9c7f5" },
|
||||
"vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" },
|
||||
"vim-tmux-navigator": { "branch": "master", "commit": "7db70e08ea03b3e4d91f63713d76134512e28d7e" },
|
||||
"vimtex": { "branch": "master", "commit": "941485f8b046ac00763dad2546f0701e85e5e02c" },
|
||||
"vim-tmux-navigator": { "branch": "master", "commit": "a26954a585b02a2ac02f87145e204f8798a7cbc2" },
|
||||
"vimtex": { "branch": "master", "commit": "9665df7f51ee24aa81dbd81782e0a22480209753" },
|
||||
"vimwiki": { "branch": "dev", "commit": "69318e74c88ef7677e2496fd0a836446ceac61e8" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" }
|
||||
}
|
||||
@@ -11,6 +11,14 @@ opt.autoindent = true
|
||||
opt.ignorecase = true
|
||||
opt.smartcase = true
|
||||
|
||||
opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
|
||||
opt.undofile = true
|
||||
|
||||
opt.hlsearch = false
|
||||
opt.incsearch = true
|
||||
|
||||
opt.scrolloff = 999
|
||||
|
||||
opt.termguicolors = true
|
||||
opt.background = "dark"
|
||||
opt.signcolumn = "yes"
|
||||
|
||||
8
.config/nvim/lua/jirr02/plugins/femaco.lua
Normal file
8
.config/nvim/lua/jirr02/plugins/femaco.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
return {
|
||||
"AckslD/nvim-FeMaco.lua",
|
||||
config = function()
|
||||
local femaco = require("femaco")
|
||||
|
||||
femaco.setup({})
|
||||
end,
|
||||
}
|
||||
@@ -24,7 +24,7 @@ return {
|
||||
mason_tool_installer.setup({
|
||||
ensure_installed = {
|
||||
"mypy",
|
||||
"ruff",
|
||||
"ruff_lsp",
|
||||
"black",
|
||||
"clang-format",
|
||||
"stylua",
|
||||
|
||||
@@ -2,6 +2,7 @@ return {
|
||||
"nvimtools/none-ls.nvim",
|
||||
dependencies = {
|
||||
"jay-babu/mason-null-ls.nvim",
|
||||
"nvimtools/none-ls-extras.nvim",
|
||||
},
|
||||
config = function()
|
||||
local mason_null_ls = require("mason-null-ls")
|
||||
@@ -25,7 +26,7 @@ return {
|
||||
return { "--python-executable", virtual .. "/bin/python3" }
|
||||
end,
|
||||
}),
|
||||
diagnostics.ruff,
|
||||
-- diagnostics.ruff_lsp,
|
||||
diagnostics.vale,
|
||||
},
|
||||
on_attach = function(current_client, bufnr)
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
return {
|
||||
"nvim-neorg/neorg",
|
||||
build = ":Neorg sync-parsers",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
config = function()
|
||||
local neorg = require("neorg")
|
||||
|
||||
neorg.setup({
|
||||
load = {
|
||||
["core.defaults"] = {},
|
||||
["core.completion"] = {
|
||||
config = {
|
||||
engine = "nvim-cmp",
|
||||
},
|
||||
},
|
||||
["core.integrations.treesitter"] = {},
|
||||
["core.concealer"] = {},
|
||||
["core.dirman"] = {
|
||||
config = {
|
||||
workspaces = {
|
||||
code = "~/Projects/Private/neorg_code",
|
||||
edu = "~/Projects/Private/neorg_edu",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
@@ -7,6 +7,10 @@ return {
|
||||
config = function()
|
||||
local noice = require("noice")
|
||||
|
||||
noice.setup()
|
||||
noice.setup({
|
||||
presets = {
|
||||
long_message_to_split = true,
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -4,9 +4,9 @@ return {
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-buffer",
|
||||
"hrsh7th/cmp-path",
|
||||
"L3MON4D3/LuaSnip",
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
"rafamadriz/friendly-snippets",
|
||||
"L3MON4D3/LuaSnip", -- snippet engine
|
||||
"saadparwaiz1/cmp_luasnip", -- for autocompletion
|
||||
"rafamadriz/friendly-snippets", -- useful snippets
|
||||
"onsails/lspkind.nvim",
|
||||
},
|
||||
config = function()
|
||||
@@ -15,6 +15,9 @@ return {
|
||||
local lspkind = require("lspkind")
|
||||
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
require("luasnip.loaders.from_lua").load({ paths = "~/.config/nvim/snippets/" })
|
||||
|
||||
luasnip.filetype_extend("vimwiki", { "markdown" })
|
||||
|
||||
cmp.setup({
|
||||
completion = {
|
||||
@@ -31,12 +34,16 @@ return {
|
||||
["<C-b>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||
["<C-Space>"] = cmp.mapping.complete(), -- show completion suggestions
|
||||
["<C-e>"] = cmp.mapping.abort(), -- close completion window
|
||||
["<C-s>"] = cmp.mapping.abort(), -- close completion window
|
||||
["<CR>"] = cmp.mapping.confirm({ select = false }),
|
||||
["<C-n>"] = cmp.config.disable,
|
||||
["<C-p>"] = cmp.config.disable,
|
||||
["<C-h>"] = cmp.config.disable,
|
||||
["<C-e>"] = cmp.config.disable,
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" }, -- snippets
|
||||
{ name = "nvim_lsp" }, -- LSP
|
||||
{ name = "buffer" }, -- text within current buffer
|
||||
{ name = "path" }, -- file system paths
|
||||
}),
|
||||
@@ -47,5 +54,26 @@ return {
|
||||
}),
|
||||
},
|
||||
})
|
||||
luasnip.config.set_config({
|
||||
history = true,
|
||||
updateevents = "TextChanged, TextChangedI",
|
||||
enable_autosnippets = true,
|
||||
})
|
||||
|
||||
vim.keymap.set({ "i" }, "<C-e>", function()
|
||||
luasnip.expand()
|
||||
end, { silent = true })
|
||||
vim.keymap.set({ "i", "s" }, "<C-l>", function()
|
||||
luasnip.jump(1)
|
||||
end, { silent = true })
|
||||
vim.keymap.set({ "i", "s" }, "<C-h>", function()
|
||||
luasnip.jump(-1)
|
||||
end, { silent = true })
|
||||
vim.keymap.set({ "i", "s" }, "<C-n>", function()
|
||||
luasnip.change_choice(1)
|
||||
end, { silent = true })
|
||||
vim.keymap.set({ "i", "s" }, "<C-p>", function()
|
||||
luasnip.change_choice(-1)
|
||||
end, { silent = true })
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ return {
|
||||
"nvim-lua/plenary.nvim",
|
||||
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" },
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
"nvim-telescope/telescope-live-grep-args.nvim",
|
||||
},
|
||||
config = function()
|
||||
local telescope = require("telescope")
|
||||
|
||||
@@ -7,6 +7,34 @@ return {
|
||||
select = {
|
||||
enable = true,
|
||||
lookahead = true,
|
||||
keymaps = {
|
||||
["a="] = { query = "@assignment.outer", desc = "Select outer part of an assignment" },
|
||||
["i="] = { query = "@assignment.inner", desc = "Select inner part of an assignment" },
|
||||
["l="] = { query = "@assignment.lhs", desc = "Select left hand side of an assignment" },
|
||||
["r="] = { query = "@assignment.rhs", desc = "Select right hand side of an assignment" },
|
||||
["a:"] = { query = "@property.outer", desc = "Select outer part of an object property" },
|
||||
["i:"] = { query = "@property.inner", desc = "Select inner part of an object property" },
|
||||
["l:"] = { query = "@property.lhs", desc = "Select left part of an object property" },
|
||||
["r:"] = { query = "@property.rhs", desc = "Select right part of an object property" },
|
||||
["aa"] = { query = "@parameter.outer", desc = "Select outer part of a parameter/argument" },
|
||||
["ia"] = { query = "@parameter.inner", desc = "Select inner part of a parameter/argument" },
|
||||
["ai"] = { query = "@conditional.outer", desc = "Select outer part of a conditional" },
|
||||
["ii"] = { query = "@conditional.inner", desc = "Select inner part of a conditional" },
|
||||
["al"] = { query = "@loop.outer", desc = "Select outer part of a loop" },
|
||||
["il"] = { query = "@loop.inner", desc = "Select inner part of a loop" },
|
||||
["af"] = { query = "@call.outer", desc = "Select outer part of a function call" },
|
||||
["if"] = { query = "@call.inner", desc = "Select inner part of a function call" },
|
||||
["am"] = {
|
||||
query = "@function.outer",
|
||||
desc = "Select outer part of a method or function definition",
|
||||
},
|
||||
["im"] = {
|
||||
query = "@function.inner",
|
||||
desc = "Select inner part of a method or function definition",
|
||||
},
|
||||
["ac"] = { query = "@class.outer", desc = "Select outer part of a class" },
|
||||
["ic"] = { query = "@class.inner", desc = "Select inner part of a class" },
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
@@ -1,11 +1,40 @@
|
||||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
build = ":TSUpdate",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||
},
|
||||
config = function()
|
||||
local treesitter = require("nvim-treesitter.configs")
|
||||
|
||||
treesitter.setup({})
|
||||
treesitter.setup({
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = { "latex" },
|
||||
},
|
||||
indent = {
|
||||
enable = true,
|
||||
},
|
||||
ensure_installed = {
|
||||
"python",
|
||||
"cpp",
|
||||
"lua",
|
||||
"markdown_inline",
|
||||
"html",
|
||||
"css",
|
||||
"bash",
|
||||
"latex",
|
||||
},
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = "<C-space>",
|
||||
node_incremental = "<C-space>",
|
||||
scope_incremental = false,
|
||||
node_decremental = "<bs>",
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -1,3 +1,23 @@
|
||||
return {
|
||||
"lervag/vimtex",
|
||||
config = function()
|
||||
local wk = require("which-key")
|
||||
|
||||
vim.g.tex_flavor = "latex"
|
||||
vim.g.vimtex_view_method = "zathura"
|
||||
vim.g.vimtex_quickfix_mode = 0
|
||||
vim.g.vimtex_compiler_latexmk = {
|
||||
options = {
|
||||
"-pdf",
|
||||
},
|
||||
}
|
||||
|
||||
wk.register({
|
||||
v = {
|
||||
name = "vimtex",
|
||||
c = { ":VimtexCompile", "Compile LaTex File" },
|
||||
v = { ":!zathura main.pdf &>/dev/null &", "Open compiled PDF in Zathura" },
|
||||
},
|
||||
}, { prefix = "<leader>" })
|
||||
end,
|
||||
}
|
||||
|
||||
9
.config/nvim/lua/jirr02/plugins/vimwiki.lua
Normal file
9
.config/nvim/lua/jirr02/plugins/vimwiki.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
return {
|
||||
"vimwiki/vimwiki",
|
||||
init = function()
|
||||
vim.g.vimwiki_list = {
|
||||
{ path = "/Users/jirayu/Projects/Private/vimwiki_code/", syntax = "markdown", ext = ".md" },
|
||||
{ path = "/Users/jirayu/Projects/Private/vimwiki_edu/", syntax = "markdown", ext = ".md" },
|
||||
}
|
||||
end,
|
||||
}
|
||||
@@ -8,13 +8,6 @@ return {
|
||||
config = function()
|
||||
local wk = require("which-key")
|
||||
|
||||
wk.setup({
|
||||
opts = {
|
||||
defaults = {
|
||||
["<leader>t"] = { name = "+vimtex" },
|
||||
},
|
||||
},
|
||||
})
|
||||
wk.register({
|
||||
n = {
|
||||
name = "vim",
|
||||
|
||||
20
.config/nvim/snippets/boilerplate.lua
Normal file
20
.config/nvim/snippets/boilerplate.lua
Normal file
@@ -0,0 +1,20 @@
|
||||
local ls = require("luasnip") --{{{
|
||||
local s = ls.s
|
||||
local i = ls.i
|
||||
local t = ls.t
|
||||
|
||||
local d = ls.dynamic_node
|
||||
local c = ls.choice_node
|
||||
local f = ls.function_node
|
||||
local sn = ls.snippet_node
|
||||
|
||||
local fmt = require("luasnip.extras.fmt").fmt
|
||||
local rep = require("luasnip.extras").rep
|
||||
|
||||
local snippets, autosnippets = {}, {} --}}}
|
||||
|
||||
-- Start Snippets --
|
||||
|
||||
-- End Snippets --
|
||||
|
||||
return snippets, autosnippets
|
||||
54
.config/nvim/snippets/lua.lua
Normal file
54
.config/nvim/snippets/lua.lua
Normal file
@@ -0,0 +1,54 @@
|
||||
local ls = require("luasnip") --{{{
|
||||
local s = ls.s
|
||||
local i = ls.i
|
||||
local t = ls.t
|
||||
|
||||
local d = ls.dynamic_node
|
||||
local c = ls.choice_node
|
||||
local f = ls.function_node
|
||||
local sn = ls.snippet_node
|
||||
|
||||
local fmt = require("luasnip.extras.fmt").fmt
|
||||
local rep = require("luasnip.extras").rep
|
||||
|
||||
local snippets, autosnippets = {}, {} --}}}
|
||||
|
||||
-- Start Snippets --
|
||||
|
||||
local snip = s(
|
||||
{ trig = "snip", desc = "Snippet for LuaSnip" },
|
||||
fmt(
|
||||
[=[
|
||||
local {} = s(
|
||||
{{ trig = "{}", {}desc = "{}"}},
|
||||
fmt(
|
||||
[[
|
||||
{}
|
||||
]],
|
||||
{{
|
||||
{}
|
||||
}}
|
||||
){}
|
||||
)
|
||||
table.insert({}, {})
|
||||
{}
|
||||
]=],
|
||||
{
|
||||
i(1, "Name of Snippet"),
|
||||
i(2, "Trigger"),
|
||||
c(3, { t(""), t("regTrig = true, ") }),
|
||||
i(4, "Description"),
|
||||
i(5, "Snippet"),
|
||||
i(6, "Nodes"),
|
||||
c(7, { t(""), t({ ",", " {", " condition = math,", " show_condition=math,", " }" }) }),
|
||||
c(8, { t("snippets"), t("autosnippets") }),
|
||||
rep(1),
|
||||
i(0),
|
||||
}
|
||||
)
|
||||
)
|
||||
table.insert(snippets, snip)
|
||||
|
||||
-- End Snippets --
|
||||
|
||||
return snippets, autosnippets
|
||||
35
.config/nvim/snippets/markdown.lua
Normal file
35
.config/nvim/snippets/markdown.lua
Normal file
@@ -0,0 +1,35 @@
|
||||
local ls = require("luasnip") --{{{
|
||||
local s = ls.s
|
||||
local i = ls.i
|
||||
local t = ls.t
|
||||
|
||||
local d = ls.dynamic_node
|
||||
local c = ls.choice_node
|
||||
local f = ls.function_node
|
||||
local sn = ls.snippet_node
|
||||
|
||||
local fmt = require("luasnip.extras.fmt").fmt
|
||||
local rep = require("luasnip.extras").rep
|
||||
|
||||
local snippets, autosnippets = {}, {} --}}}
|
||||
|
||||
-- Start Snippets --
|
||||
|
||||
local code = s(
|
||||
{ trig = "code", desc = "Code Section" },
|
||||
fmt(
|
||||
[[
|
||||
```{}
|
||||
|
||||
```
|
||||
]],
|
||||
{
|
||||
i(1, "Language"),
|
||||
}
|
||||
)
|
||||
)
|
||||
table.insert(autosnippets, code)
|
||||
|
||||
-- End Snippets --
|
||||
|
||||
return snippets, autosnippets
|
||||
1372
.config/nvim/snippets/tex.lua
Normal file
1372
.config/nvim/snippets/tex.lua
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user