Fix and add snippets
This commit is contained in:
parent
9368fdb570
commit
ec5ee7ccaa
8 changed files with 67 additions and 83 deletions
36
.config/nvim/UltiSnips/tex.snippets
Normal file
36
.config/nvim/UltiSnips/tex.snippets
Normal file
|
@ -0,0 +1,36 @@
|
|||
snippet templateHs "Start file with template"
|
||||
\documentclass{article}
|
||||
|
||||
%imports
|
||||
|
||||
%include polycode.fmt
|
||||
\usepackage[all]{xy}
|
||||
\usepackage{mathtools}
|
||||
\usepackage{graphicx}
|
||||
|
||||
\title{\Huge{Some Class}}
|
||||
\author{\huge{Afonso Franco}}
|
||||
\date{}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\maketitle
|
||||
\newpage
|
||||
|
||||
\tableofcontents
|
||||
\pagebreak
|
||||
|
||||
$1
|
||||
|
||||
\end{document}
|
||||
endsnippet
|
||||
|
||||
snippet rule "Add CP rule"
|
||||
\equiv \\{\text{Propriedade ${1:Nome/Numero}}\\}\\\\
|
||||
endsnippet
|
||||
|
||||
snippet split "Add CP split"
|
||||
\langle $1 \rangle
|
||||
endsnippet
|
||||
|
||||
|
|
@ -19,10 +19,5 @@ Config = {
|
|||
}
|
||||
}
|
||||
|
||||
-- Theme
|
||||
|
||||
vim.wo.number=true
|
||||
vim.wo.relativenumber= true
|
||||
vim.g.luasnippets_path = "~/.config/nvim/lua/plugins/configs/luasnippets"
|
||||
|
||||
|
||||
-- Mapping
|
||||
require("mappings")
|
||||
|
|
4
.config/nvim/lua/mappings.lua
Normal file
4
.config/nvim/lua/mappings.lua
Normal file
|
@ -0,0 +1,4 @@
|
|||
--Relative line numbers
|
||||
vim.wo.number=true
|
||||
vim.wo.relativenumber= true
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
local present, luasnip = pcall(require, "luasnip")
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
|
@ -1,23 +0,0 @@
|
|||
{
|
||||
"Create Split": {
|
||||
"prefix": ["split"],
|
||||
"body": [
|
||||
"\\langle $1 \\rangle$0"
|
||||
],
|
||||
"description": "Create a Split"
|
||||
},
|
||||
"Use CP Rule": {
|
||||
"prefix": ["rule"],
|
||||
"body": [
|
||||
"\\equiv \\{\\text{Propriedade ${1:Numero_da_propriedade}}\\\\}\\\\\\\\$0"
|
||||
],
|
||||
"description": "Create a Split"
|
||||
},
|
||||
"Use conditional": {
|
||||
"prefix": ["cond"],
|
||||
"body": [
|
||||
"${1:p} \\implies ${2:f},${3:g}$0"
|
||||
],
|
||||
"description": "Create an implication"
|
||||
}
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"name": "My Custom Snippets",
|
||||
"contributes":{
|
||||
"snippets":[
|
||||
{
|
||||
"language":["plaintex","tex"],
|
||||
"path": "./languages/latex.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
|
@ -17,12 +17,6 @@ local plugins = packer.startup({function(use)
|
|||
end
|
||||
}
|
||||
|
||||
use{ "L3MON4D3/LuaSnip",
|
||||
config = function()
|
||||
require "plugins.luasnip"
|
||||
end
|
||||
}
|
||||
|
||||
use { "ggandor/leap.nvim",
|
||||
config = function ()
|
||||
require('leap').add_default_mappings()
|
||||
|
@ -75,6 +69,7 @@ local plugins = packer.startup({function(use)
|
|||
use {"neoclide/coc.nvim",
|
||||
config = function() require("plugins.nvim-coc") end
|
||||
}
|
||||
|
||||
end,
|
||||
|
||||
config = {
|
||||
|
|
|
@ -74,12 +74,6 @@ end
|
|||
time([[try_loadstring definition]], false)
|
||||
time([[Defining packer_plugins]], true)
|
||||
_G.packer_plugins = {
|
||||
LuaSnip = {
|
||||
config = { "\27LJ\2\n/\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\20plugins.luasnip\frequire\0" },
|
||||
loaded = true,
|
||||
path = "/home/afonso/.local/share/nvim/site/pack/packer/start/LuaSnip",
|
||||
url = "https://github.com/L3MON4D3/LuaSnip"
|
||||
},
|
||||
["bufferline.nvim"] = {
|
||||
config = { "\27LJ\2\n<\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\15bufferline\frequire\0" },
|
||||
loaded = true,
|
||||
|
@ -163,22 +157,38 @@ _G.packer_plugins = {
|
|||
}
|
||||
|
||||
time([[Defining packer_plugins]], false)
|
||||
-- Config for: mason.nvim
|
||||
time([[Config for mason.nvim]], true)
|
||||
try_loadstring("\27LJ\2\n-\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\18plugins.mason\frequire\0", "config", "mason.nvim")
|
||||
time([[Config for mason.nvim]], false)
|
||||
-- Config for: LuaSnip
|
||||
time([[Config for LuaSnip]], true)
|
||||
try_loadstring("\27LJ\2\n/\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\20plugins.luasnip\frequire\0", "config", "LuaSnip")
|
||||
time([[Config for LuaSnip]], false)
|
||||
-- Config for: packer.nvim
|
||||
time([[Config for packer.nvim]], true)
|
||||
require("plugins.packer")
|
||||
time([[Config for packer.nvim]], false)
|
||||
-- Config for: mason.nvim
|
||||
time([[Config for mason.nvim]], true)
|
||||
try_loadstring("\27LJ\2\n-\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\18plugins.mason\frequire\0", "config", "mason.nvim")
|
||||
time([[Config for mason.nvim]], false)
|
||||
-- Config for: nvim-autopairs
|
||||
time([[Config for nvim-autopairs]], true)
|
||||
try_loadstring("\27LJ\2\n@\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\19nvim-autopairs\frequire\0", "config", "nvim-autopairs")
|
||||
time([[Config for nvim-autopairs]], false)
|
||||
-- Config for: leap.nvim
|
||||
time([[Config for leap.nvim]], true)
|
||||
try_loadstring("\27LJ\2\nA\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\25add_default_mappings\tleap\frequire\0", "config", "leap.nvim")
|
||||
time([[Config for leap.nvim]], false)
|
||||
-- Config for: coc.nvim
|
||||
time([[Config for coc.nvim]], true)
|
||||
try_loadstring("\27LJ\2\n0\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\21plugins.nvim-coc\frequire\0", "config", "coc.nvim")
|
||||
time([[Config for coc.nvim]], false)
|
||||
-- Config for: vimtex
|
||||
time([[Config for vimtex]], true)
|
||||
try_loadstring("\27LJ\2\n.\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\19plugins.vimtex\frequire\0", "config", "vimtex")
|
||||
time([[Config for vimtex]], false)
|
||||
-- Config for: bufferline.nvim
|
||||
time([[Config for bufferline.nvim]], true)
|
||||
try_loadstring("\27LJ\2\n<\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\15bufferline\frequire\0", "config", "bufferline.nvim")
|
||||
time([[Config for bufferline.nvim]], false)
|
||||
-- Config for: nvim-lspconfig
|
||||
time([[Config for nvim-lspconfig]], true)
|
||||
try_loadstring("\27LJ\2\n1\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\22plugins.lspconfig\frequire\0", "config", "nvim-lspconfig")
|
||||
time([[Config for nvim-lspconfig]], false)
|
||||
-- Config for: nvim-tree.lua
|
||||
time([[Config for nvim-tree.lua]], true)
|
||||
try_loadstring("\27LJ\2\n7\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\14nvim-tree\frequire\0", "config", "nvim-tree.lua")
|
||||
|
@ -187,26 +197,6 @@ time([[Config for nvim-tree.lua]], false)
|
|||
time([[Config for nvim-treesitter]], true)
|
||||
try_loadstring("\27LJ\2\n2\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\23plugins.treesitter\frequire\0", "config", "nvim-treesitter")
|
||||
time([[Config for nvim-treesitter]], false)
|
||||
-- Config for: nvim-lspconfig
|
||||
time([[Config for nvim-lspconfig]], true)
|
||||
try_loadstring("\27LJ\2\n1\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\22plugins.lspconfig\frequire\0", "config", "nvim-lspconfig")
|
||||
time([[Config for nvim-lspconfig]], false)
|
||||
-- Config for: coc.nvim
|
||||
time([[Config for coc.nvim]], true)
|
||||
try_loadstring("\27LJ\2\n0\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\21plugins.nvim-coc\frequire\0", "config", "coc.nvim")
|
||||
time([[Config for coc.nvim]], false)
|
||||
-- Config for: bufferline.nvim
|
||||
time([[Config for bufferline.nvim]], true)
|
||||
try_loadstring("\27LJ\2\n<\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\15bufferline\frequire\0", "config", "bufferline.nvim")
|
||||
time([[Config for bufferline.nvim]], false)
|
||||
-- Config for: leap.nvim
|
||||
time([[Config for leap.nvim]], true)
|
||||
try_loadstring("\27LJ\2\nA\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\25add_default_mappings\tleap\frequire\0", "config", "leap.nvim")
|
||||
time([[Config for leap.nvim]], false)
|
||||
-- Config for: vimtex
|
||||
time([[Config for vimtex]], true)
|
||||
try_loadstring("\27LJ\2\n.\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\19plugins.vimtex\frequire\0", "config", "vimtex")
|
||||
time([[Config for vimtex]], false)
|
||||
|
||||
_G._packer.inside_compile = false
|
||||
if _G._packer.needs_bufread == true then
|
||||
|
|
Loading…
Reference in a new issue