diff --git a/.config/nvim/UltiSnips/tex.snippets b/.config/nvim/UltiSnips/tex.snippets new file mode 100644 index 0000000..e78a544 --- /dev/null +++ b/.config/nvim/UltiSnips/tex.snippets @@ -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 + + diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 61dae3c..27229cd 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -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") diff --git a/.config/nvim/lua/mappings.lua b/.config/nvim/lua/mappings.lua new file mode 100644 index 0000000..e5abc50 --- /dev/null +++ b/.config/nvim/lua/mappings.lua @@ -0,0 +1,4 @@ +--Relative line numbers +vim.wo.number=true +vim.wo.relativenumber= true + diff --git a/.config/nvim/lua/plugins/luasnip.lua b/.config/nvim/lua/plugins/luasnip.lua deleted file mode 100644 index 2f599b7..0000000 --- a/.config/nvim/lua/plugins/luasnip.lua +++ /dev/null @@ -1,2 +0,0 @@ -local present, luasnip = pcall(require, "luasnip") -require("luasnip.loaders.from_vscode").lazy_load() diff --git a/.config/nvim/lua/plugins/luasnippets/languages/latex.json b/.config/nvim/lua/plugins/luasnippets/languages/latex.json deleted file mode 100644 index 181ee6c..0000000 --- a/.config/nvim/lua/plugins/luasnippets/languages/latex.json +++ /dev/null @@ -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" - } -} diff --git a/.config/nvim/lua/plugins/luasnippets/package.json b/.config/nvim/lua/plugins/luasnippets/package.json deleted file mode 100644 index ad50ef8..0000000 --- a/.config/nvim/lua/plugins/luasnippets/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "My Custom Snippets", - "contributes":{ - "snippets":[ - { - "language":["plaintex","tex"], - "path": "./languages/latex.json" - } - ] - } -} diff --git a/.config/nvim/lua/plugins/packer.lua b/.config/nvim/lua/plugins/packer.lua index 59ba379..728987b 100644 --- a/.config/nvim/lua/plugins/packer.lua +++ b/.config/nvim/lua/plugins/packer.lua @@ -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 = { diff --git a/.config/nvim/plugin/packer_compiled.lua b/.config/nvim/plugin/packer_compiled.lua index 695bb92..a663909 100644 --- a/.config/nvim/plugin/packer_compiled.lua +++ b/.config/nvim/plugin/packer_compiled.lua @@ -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