Added Latex snippets
This commit is contained in:
parent
0920366c9d
commit
b9c54ea4b8
5 changed files with 44 additions and 0 deletions
5
.config/nvim/lua/custom/chadrc.lua
Normal file
5
.config/nvim/lua/custom/chadrc.lua
Normal file
|
@ -0,0 +1,5 @@
|
|||
local M = {}
|
||||
|
||||
M.plugins = require("custom.plugins")
|
||||
|
||||
return M
|
3
.config/nvim/lua/custom/init.lua
Normal file
3
.config/nvim/lua/custom/init.lua
Normal file
|
@ -0,0 +1,3 @@
|
|||
local autocmd = vim.api.nvim_create_autocmd
|
||||
|
||||
vim.g.luasnippets_path = "~/.config/nvim/lua/custom/luasnippets"
|
17
.config/nvim/lua/custom/luasnippets/languages/latex.json
Normal file
17
.config/nvim/lua/custom/luasnippets/languages/latex.json
Normal file
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"Create Split": {
|
||||
"prefix": ["split"],
|
||||
"body": [
|
||||
"\\langle $1 \\rangle$0"
|
||||
],
|
||||
"description": "Create a Split"
|
||||
},
|
||||
|
||||
"Use CP Rule": {
|
||||
"prefix": ["rule"],
|
||||
"body": [
|
||||
"\\equiv \\{Propriedade\\ ${1:Numero_da_propriedade}\\}$0"
|
||||
],
|
||||
"description": "Create a Split"
|
||||
}
|
||||
}
|
11
.config/nvim/lua/custom/luasnippets/package.json
Normal file
11
.config/nvim/lua/custom/luasnippets/package.json
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"name": "My Custom Snippets",
|
||||
"contributes":{
|
||||
"snippets":[
|
||||
{
|
||||
"language":["plaintex","tex"],
|
||||
"path": "./languages/latex.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
8
.config/nvim/lua/custom/plugins/init.lua
Normal file
8
.config/nvim/lua/custom/plugins/init.lua
Normal file
|
@ -0,0 +1,8 @@
|
|||
return {
|
||||
["L3MON4D3/LuaSnip"] = {
|
||||
config = function()
|
||||
require("plugins.configs.others").luasnip()
|
||||
require("luasnip.loaders.from_vscode").lazy_load({ paths = vim.g.luasnippets_path })
|
||||
end
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue