chore: Fix and add snippets
This commit is contained in:
parent
2785d9fce9
commit
147531f9cf
7 changed files with 43 additions and 49 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
|
-- Mapping
|
||||||
|
require("mappings")
|
||||||
vim.wo.number=true
|
|
||||||
vim.wo.relativenumber= true
|
|
||||||
vim.g.luasnippets_path = "~/.config/nvim/lua/plugins/configs/luasnippets"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
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
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
use{ "L3MON4D3/LuaSnip",
|
|
||||||
config = function()
|
|
||||||
require "plugins.luasnip"
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
use { "ggandor/leap.nvim",
|
use { "ggandor/leap.nvim",
|
||||||
config = function ()
|
config = function ()
|
||||||
require('leap').add_default_mappings()
|
require('leap').add_default_mappings()
|
||||||
|
@ -75,6 +69,7 @@ local plugins = packer.startup({function(use)
|
||||||
use {"neoclide/coc.nvim",
|
use {"neoclide/coc.nvim",
|
||||||
config = function() require("plugins.nvim-coc") end
|
config = function() require("plugins.nvim-coc") end
|
||||||
}
|
}
|
||||||
|
|
||||||
end,
|
end,
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
|
Loading…
Add table
Reference in a new issue